P Node Sample 1

Home Tutorial Links My Tutorials Freebies
Home > My Tutorials
P-Node settings

SAMPLE MATERIAL ONE: SLIME NEAR GROUND


Fig 1: P based material

This sample material uses the P Node to create a stone wall with green slime at ground level (technically, we have a green slime material that turns into bricks away from ground level). To create the split, we have plugged a blender node into the diffuse colour input of a cylinder. Input 1 is set to green, and will appear whenever the blending input is around zero. Input 2 is set to white and then has the brick material plugged in. This will appear whenever the blending input is around one. Between zero and one we will get a blending of the two. Below zero, we get pure green, above one we get pure brick.

The blending input of the blender node is set to one, and the P-Node is now plugged into it. We now need to modify the P-Node so that it only outputs the Y position, for height. To do this, we set X=0 and Z=0. At the moment, the green belt will be tiny. Remember, the P-Node output is in thousandths of Poser units, so X=0, y=1, z=0 will reach a value of one only 2.5 mm off the ground. We will set Y to 0.02. This will divide the original Y output by 50, spreading our green band further out - the output of the P-Node will now reach 1 when it is roughly ten cm above above ground level (slightly above ankle level on Jessie).


Fig 2: Node layout for material

Variants

To spread the green further up the material, decrease the P-Node Y value.

To reduce the amount of green, increase the P-Node Y value.

To move the slime up or down the material, you will need to add another maths node to the material. Plug a normal maths function node into the blending input of the Blender. Plug the output of the P-Node into Input 1 of the maths node. Leave the function as add. To move the boundary up the post, set Input 2 to negative numbers. TO move the boundary down, set Input 2 to postive numbers. This is because of the way the Blender node works. Everywhere below zero will be green, everywhere above 1 will be brick. If we subtract 1 from the blender input, then what was zero becomes -1, and green. What was 1 is now zero, and still green. The brick now starts blending in, but only takes over totally when the P-Node output reaches 2.


PoserWorld