MATERIAL: PADDED CUSHIONS

PADDED CUSHIONS

This time we are going to create a displacement map based material that could be used for upholstered sofas, airbed or even padded cells. We will be using the sine function to create waves (cosine would do just as good a job), then combining and altering the results to produce our final result.


Fig 1: Padded cushions

First we need to create our stripes. Figure 2 shows our vertical stripes. We don't really need the middle multiply node, but it does make controlling the final result easier. What we are doing is feeding the U variable into the Sine maths function to produce a sine wave. We could use the Value_1 setting of the Sin function to control how many times the wave repeats - if we set Value_1 of the Sine function to 6.2831 then we will get a single complete sine wave.

I have inserted the multiply function to control how many times the sine wave repeats. Value_1 is set to PI (3.141493 to six decimal places). Poser measures angles in radians. There are two times PI radians in a circle, so our sine wave repeats once the input value reached 2*PI. Thus, if we set value_2 of the multiply node to 6, we get three complete sine waves. If we set Value_2 to seven, then we get three complete sine waves and one half of the next wave.


Fig 2: Sine based stripes

We need to produce two sets of stripes - vertical as seen in figure 2, and horizontal. The horizontal stripes are created in the exact same way as in figure 2, but with a V node instead of a U node. In Figure 3 below the vertical stripes are created in the three nodes on the top right, the horizontal stripes in the bottom right.


Fig 3: The complete shader tree

We now need to combine our horizontal and vertical stripes to produce the final result. The two sets of waves produce values between -1 and 1. We want our final result to move between 0 and 1, making it easier to use the same output to control other parts of a larger shader tree, such as a blender controlled colour scheme.

The first step is to merge the two waves. We do that in Math_Functions_8, the middle node on the right hand side. This is an add node, with both Value_1 and Value_2 set to 0.5, and the two waves plugged into the two inputs. Each wave is thus transformed to the range -0.5 to 0.5, before they are added together. The range of the combined waves now runs from -1 to +1.

Next, we bring our wave into the range 0 to 1. To do this we create another Add node (bottom left). Once again both Value_1 and Value_2 are set to 0.5. The output from our previous node is plugged into Value_1. The result of this is to multiply our combined wave by 0.5, to produce a wave that runs from -0.5 to 0.5, then Value_2 adds 0.5 to that wave, resulting in a wave that runs from 0 to 1.

Finally, we want to get our cushioned effect. To do this, we take the output of our second Add node and plug it into a Bias node. This is Poser's brightness node. Value_2 set to 0.8 brightens the picture, but leaves the darkest areas dark, giving us our smooth cushions with deep holes for the buttons.

Plug this into the displacement input of the PoserSurface, make sure you have the 'use displacement maps' option turned on, and render. You will probably need to experiment to find the right value for the displacement value and for the number of waves to use depending on the size of your prop.

Suggested Variants

Try altering Value_2 of the bias node to get different results. Higher values flatten out the result, lower values produce an 'egg carton' look, negative numbers produce spikes.

Change bias to gain to get another set of very different results. Here low numbers produce sharp spikes and deep holes, high values produce more of a checkerboard result.

In Maths_Function_8 (the join between the two sets of stripes), try setting Value_1 to 0.75 and Value_0.25 to 0.25 to produce figure 4


Fig 4: Alternative pattern


PoserWorld