![]() |
|
MATHS: GAIN |
| Home | Tutorial Links | My Tutorials | Sample Materials | Freebies |
MATHS: GAINThis function is effectively the contrast node. Plug whatever node you want to alter into the Value_1 input. The Value_2 attribute controls the level of gain, or rather whether you increase or decrease the contrast. Increasing the contrast makes bright colours brighter and dark colours brighter, making highlights and shadows stand out more. Decreasing the contrast produces a more washed out picture, with every colour moving towards grey.
If you see a gain attribute on any other node (such as the turbulence node), this has the same effect as the maths function, although in some cases it is not entirely clear what result you will achieve (have a look at the weave node to see this). The following figures show the results of different gain settings, with the results applied to a flat surface as a displacement map (see Figure 3). Figure 1 shows the results of a gain node set to 0.2. Here, both dark and light colours are moved towards gray, reducing the contrast between them. Figure 2 shows the same thing with a gain setting of 0.8. Here, the dark areas are getting darker, the bright areas brighter. This increases the difference (contrast) between them, often increasing the amount of detail visable in a picture. Figure 3 shows the node setup used to create these effects. The Displacement figure is set very high to produce the exaggerated visuals we need to see what is happening. Our unmodifed U node produces the simple slope, with black at the left and white at the right. The green curved surface shows how the brightness is modified by the gain. Figure 4 shows the results of a gain node set to 0.8 acting on a greyscale photo. This has increased the contrast in the picture - the dark shades are dark, the light shades light, so they contrast more sharply with each other. Suggested UsesTry setting value_2 to 1, and then plugging a V node into it. This will result in high contrast at the top of the output and the low contrast at the base. |