modulation #
While blend functions combine the colors from two visual sources, modulate functions use the colors from one source to affect the geometry of the second source. This creates a sort of warping or distorting effect. An analogy in the real world would be looking through a texture glass window.
modulate() does not change color or luminosity but distorts one visual source using another visual source. Note how modulation is to geometry what blending is to color.
All geometry transformations have corresponding modulate functions that allow you to use one source to warp another source. For example, .modulateRotate() is similar to .rotate(), but it allows you to apply different amounts of rotation to different parts of the visual source. See the function reference for more examples.
Some modulation transforms #
modulate #
Related to scroll, it will warp the image moving it upwards and leftwards in modulator’s bright areas. You can also set the amount of warping. Negative values will have move towards the opposite direction.
modulate( texture, amount = 0.1 )
modulateRotate #
Related to rotate, it will rotate the image more or less according to the modulator. You can set the amount of warping and a rotation offset.
modulateRotate( texture, multiple = 1, offset )
modulateScrollX #
Related to scrollX, scrolls the image horizontally according to the modulator. You can set the amount of warping and an independent scrolling speed.
modulateScrollX( texture, scrollX = 0.5, speed )
modulateScrollY #
Related to scrollY, scrolls the image vertically according to the modulator. You can set the amount of warping and an independent scrolling speed.
modulateScrollY( texture, scrollY = 0.5, speed )
modulateScale #
Related to scale, zooms in (or out) of the image according to the modulator. You can set the amount of zooming and a scaling offset. Negative values will down to -1 will scale down.
modulateScale( texture, multiple = 1, offset = 1 )
modulateHue #
Modulate hue is special. It will warp the image according to the relation between the channels of the modulator. To be precise, it will warp horizontally according to the difference between green and red, and vertically according to the difference between blue and green. This isn’t intuitive but it’s an easy way of creating complex motion using colorful modulators.
modulateHue( texture, amount = 1 )
Much more #
Check the modulation section in the interactive function reference for a glossary of all the modulation functions.