MATHS: ADD

MATHS FUNCTIONS: ADD

The first Maths_Argument, and the one that appears on every new Maths node, is Add. This does exactly what you would expect, adding together Value_1 and Value_2. Things get more interesting when you plug other nodes into one or both of the inputs. In that case, the nodes you input are multiplied by the value settings, and then added together. This can be very usefully for merging two nodes.

Figure 1 shows the add node being used to combine two brick nodes to get a more complex result, in this case taking the normal two coloured brick and creating a three colour version. The only difference between the two Brick nodes is the Mortar_Width, set to 0.15 on the right and 0.6 in the middle node. These two nodes are then plugged into an Add node, with both Value_1 and Value_2 set to 0.5. Remember, white is equal to 1 and black to 0. White areas on the Brick nodes become 50% gray after being multiplied by 0.5. Areas that are white in both Brick and Brick_2 remain white (0.5+0.5=1). Areas white in one node only become gray, areas black in both remain black.

This output could be used for interesting displacement effects, bump maps or transparency. Try changing the softness of the bricks to get smoother, more interesting results (see also the Subtract function).


Fig 1: Merging nodes with Add

A frequent use for the add node is to provide a constant - a fixed number that can be plugged into other nodes. This constant can be used to control a series of related values in other nodes, allowing you to change one number instead of several (I find this most useful with the tile node - plug a simple add node into the Tile_Width, Tile_Height and Mortar_Width nodes to allow you to create different sized tiles by changing a single value).

Despite its simplicity, the Add function can perform some powerful tricks by itself. The key to most of these is the correct use of the Value_1 and Value_2 attributes. The example below (figure 2) takes a Turbulence node whose output ranges from 0 to 1 and plugs it into Value_1. Both Value_1 and Value_2 are then set to 0.5. The result of this is to squeeze all of the detail in the Turbulence node into the range 0.5 to 1, eliminating the darker areas but keeping the same pattern. The resulting pattern could be used to give texture to a tile or for some interesting transparency effects. Used with a 2D texture it can produce some interesting results.


Fig 2: Maths on one input

Suggested Uses

Use the add node with two different 3D or fractal nodes to produce more variety. If you make sure that Value_1+Value_2=1 then your result will be within the range 0 to 1.

Try adding a brick node with a value of 0.8 to a fractal or fbm node with a value of 0.2 to get rough surfaced bricks.


PoserWorld