The Edge Blend Node
|Home||Tutorial Links||My Tutorials||Sample Materials||Freebies|
The Edge Blend Node
Despite the name, this node has nothing directly to do with edges. It is actually concerned with the angle between a surface and the current camera. It has three attributes - Inner Color, Outer Color and Attenuation.
Inner color is used for surfaces that are facing towards the camera.
Outer color is used for surfaces that are not facing towards the camera (the instruction book says surfaces facing away from the camera - but if you have a reflection in your scene Poser treats items facing away from the camera but reflected as if they were pointing towards the camera. This allows for reflections of edge blend based toon effects - see more here)
Attenuation decides how quickly the Inner color fades into the Outer colour. At attenuation=0, only the inner colour is used. As attenuation increases, more of the outer colour is used. With very high values (try 100), the Inner color begins to resemble a specular highlight facing towards the camera.
With negative values of attenuation, a smudge of the Outer colour appears on surfaces facing towards the camera.
Here we have plugged an edge blend node into the Ambient colour attribute of the PoserSurface, and turned off the diffuse and specular colours, so we can see exactly what is going on. Figure 2 shows our shader tree.
Figure 1 demonstrates why this node can be used to find edges. Most Poser models - people and their cloths - are nicely rounded (there are exceptions - finger nails or hats spring to mind). This means that towards the edge of the model, the surfaces are facing away from the camera. However, on sharp edged objects, such as the cube, this is not the case. Here we can see a slight gradient from left to right across the cube as the angle to the camera changes, but no clear edges.
Edge blend can be combined with some simple maths to provide sharp 'toon' edges.
Figure 3 shows the same three primitives with sharp edges. This can be done by combining the Edge_blend node with any either the Round or Floor maths functions. Here we have used a Round function, set to 0.8. The lower the number used here, the more black (outer) we would see in our result, until with values below 0.5 we lose the inner color completely.
If you want to use colours other than black and white, the most reliable method is to use a blender node. You can replace the normal maths round with a colour maths round, but that introduces a whole new realm of complications (more on that here ), as each of the three colour channels change between the inner and outer colours, and combine with the colour round.
Figure 5 shows a shader tree that will produce a two tone toon - light pink on areas facing the camera, mid-brown on areas facing away from the camera. Figure 6 shows that shader applied to a hand.