Take Samples



Table of contents:


Description:
This node will re-evaluate the input "Color" as many times as defined by the "Samples" setting. Consequently, you can create your own sampled shaders in the node editor without having to learn a programming language like C. It's best to use the random number generator node as some kind of input for the nodes connected to the input "Color".

The upper picture on the right shows a Wood2 procedural applied to a test object.
The lower one shows the same procedural processed by this node. A Random node with the range set to [0, 0.5] is plugged into the Z rotation channel of the Wood2 procedural.
The output of that node is then plugged into the Take Samples node which is set to 24 average samples/passes.
No further processing except adaptive sampling has been done to the image (no motion blur!).
Example

Example


Location:
The node will be added to the "Pom's Nodes/Surfacing" menu under the name "Take Samples".
Settings:

Mode:
Average: All samples will be added together and after the last one they will be divided by the number of samples given.

Minimum / Maximum: The lowest/highest value of all samples will be used (on a per channel basis).

Darkest / Brightest: The darkest/brightest color will be used. Brightness = (R + G + B) / 3.

Additive: All samples will be added together.

Subtractive: All samples will be subtracted from each other.

Multiply: All samples will be multiplied with each other.

Samples:
The number of how many samples will be taken.

R/G/B Shift:
A value which will be added to each sample (not just the final output).

R/G/B Clamp Low / High:
Clamps the value of each sample (not just the final output) to the given values. Only useful for shift-values not equal to 0.


Take Samples