This operator computes the modulo of two values.
The sign of the modulus operation matches the behavior in Python. Using modulus to clamp a number to range will work as expected.
mod(-3, 5) == 2
mod(a, b) is always in the range
[0, b), so if
b is negative, the result is
also always negative.
The following examples include this node.
This example simulates grass being pushed down by an RBD object. Fur Objects are used to represent the blades of grass and Wire Objects are used to simulate the motion. When a single Fur Object is used to represent the grass, neighbouring blades of grass will have similar motion. Additional objects with different stiffness values can be used to make the motion less uniform. When "Complex Mode" is enabled, two objects are used to represent the grass. The stiffness of each set of curves can be controlled by adjusting the "Angular Spring Constant" and "Linear Spring Constant" parameters on the corresponding Wire Objects.
This example demonstrates how the Fur SOP and Mantra Fur Procedural can be applied to an animated skin geometry. CVEX shaders are used to apply a custom look to the hairs based upon attributes assigned to the geometry.
This example shows how to use the Volume Resample SOP to increase and decrease the resolution of a volume. It also shows how the different sampling options affect the quality of the resulting volume.