Redirect Shader and Lateral Displacement

User Rating: / 3
PoorBest 

The following is an exerpt from a post written by Matt Fairclough, explaning the difference between using a redirect shader along x and z, and a powerfractal displacing along lateral.

Heavy tech talk beyond this point

The Redirect Shader "tricks" the shaders which are attached to it into thinking that the surface normal points along the positive X axis, positive Y axis or positive Z axis. Basically it modifies the shading state variable for the surface normal before calling the shaders, so that they think they are displacing a surface with a different normal. Any shader that displaces along the normal will then displace along these directions. Displacement in the negative X,Y,Z directions is accomplished if the displacement shader displaces negatively (e.g. if it indents a surface rather than raising it).

Some shaders make more complicated decisions about the displacement direction, or they let you choose. The Power Fractal defaults to displacing "Along Normal", but some of its other settings allow for interesting effects. "Lateral Only" still uses the surface normal, but it cancels out any amount of displacement which occurs directly upwards/downwards away from the planet's centre. On a level surface, the surface normal points directly upwards, and the displacement will be completely cancelled out. On the side of a cliff, however, where the surface normal points away from the usual up-down direction, the displacement is much stronger. They only displacement allowed is displacement not in the up-down direction. It's a simple way to get the appearance of horizontal layers in your displacements, especially if you combine it with XYZ stretching of the noise pattern.

"Lateral Normalized" is similar to "Lateral Only" except that the magnitude (length) of the displacement is kept, and only the direction of the displacement is changed. This means that the displacement won't fade out on surfaces which are nearly pointing upwards, and you'll always get strong lateral displacement.

"Vertical Only" is the opposite to "Lateral Only", and cancels out any displacement which does not occur along the up-down vector which points away from the centre of the planet.

"Along Vertical" ignores the surface normal completely, and uses the up-down vector which points away from the centre of the planet.

Some of these names include the words "requires computed normal". A Compute Terrain node is sufficient to give you a computed normal anywhere downstream from that node. You don't need another Compute Normal node.

 

NWDA Premier Shop


List All Products


Advanced Search





Lost Password?
Forgot your username?
No account yet? Register

Download Area
Show Cart
Your Cart is currently empty.
Go to top