![]() |
|
COLOR MATHS: THE BASICS |
| Home | Tutorial Links | My Tutorials | Sample Materials | Freebies |
The color maths node provides a wide variety of different maths functions that can be carried out in full colour. The normal maths nodes are generally easier to understand, but can only work in shades of grey, limiting their potential. The colour maths node can be more powerful, although they sometimes need more nodes to perform the same functions as simple maths.
The simplest use of the color maths node is to perform what might be seen as 'real' colour maths - adding together two colours. In figure one we see red and green being added together to produce yellow. Of itself this would appear to be of very little use, as you could simply provide yellow, but one or both of the input colours can come from other nodes, pictures, variables or be directly controled in an animation, allowing you much more control.
Fig 1: Simple Color Maths
This is the simplest use for the color maths functions. Most other nodes need to be looked at in a different way. While normal maths nodes works on a single number, the colour maths nodes work on each colour channel (red, green and blue) seperatly. For many functions this means that the second value isn't really being used as a colour, but to provide three numbers to control the maths.
Fig 2: Controlled Color Maths
Figure Two shows this in action. The User Defined colour node is providing three input values that are being multiplied with the original picture. This use of the User_Defined node is an important concept in colour maths, as it allows you to provide values over one, the maximum value that you can provide as part of a simple colour. Here, the level of red is being halved, the green is unaffected and the blue is being slightly increased.
You can perform colour maths without the extra user_defined node. If you know that none of the value_2 settings need to go over a value of one, then you can simply alter the colour directly. However, the user_defined node will always give you finer control over your maths.
Sometimes you will need to use several colour nodes in a row to perform a function performed by one normal maths node. Figure three shows an example of this. To produce a similar effect with normal maths would require one maths node. The image would be plugged into value_1, and value_1 set to two to multiply the input range and produce our sine wave. Here, to get the same effect we have had to add a multiply color_maths node, controled by a user_defined colour, allowing us to double the input values. We will return to this effect in a later tutorial to demonstrate one way to increase the dynamic range of your textures using two colour maths nodes.
Fig 3: Multi-node colour maths
For more infomation on colour maths, see the following articles. The first group will explain each of the maths arguments, explaining how they work and what they might be used for. The second set will show you how to combine several color maths nodes to produce more complex effects.