blending #
Blend transforms allow you to combine the colors of two visual sources. There are many ways of operating with them. There are multiple blend modes in Hydra, similar to the blend modes you might find in raster graphics programs such as Photoshop or GNU-IMP. All blend functions take in a texture which can be a source, a patch or a framebuffer (such as o0, o1, s0, etc).
Some blend transforms #
blend #
The simple blend
functions mixes the colors from two sources to create a third source. You can also specify how much of the second texture you mix in. Inputting 0
will output the original texture unaffected, 0.5
(the default) mixes them 50%/50%, and 1
will only show the secondary texture. Going outside this range will create broken mixes, which can be interesting too.
blend( texture, amount = 0.5 )
add #
Adds the color channels of two images. You can multiply the second image with the amount
argument, so you can add more or less from it. Using negative amounts will effectively subtract values instead of adding.
add( texture, amount = 1 )
sub #
Subtracts the color channels of one image to another.
sub( texture, amount = 1 )
mult #
Multiplies the original image by the incoming one.
mult( texture, amount = 1 )
diff #
Shows the difference between two textures. In other words: abs(img1 - img2)
.
diff( texture )
layer #
Places a texture over another one using its transparency values.
layer( texture )
mask #
Uses a texture as a mask for the visual. Works in the same way a mask works in Photoshop or other raster graphics software: bright parts will make the image opace, while dark parts will make it more transparent.
mask( texture )
Reference #
Remember you can check the interactive function reference for a quick glossary of all the functions.