Compute Normal

Started by efflux, December 23, 2006, 12:31:34 AM

Previous topic - Next topic


When you choose displacement direction there are options for Vertical only, Lateral only and Lateral normalized. In brackets it says requires computed normal. What does this mean and how do we use it? I know there is a node for compute normal but how do we use that?



The normal of the terrain is computed by the Compute Terrain shader at the end of the Terrain network group. So a normal of the terrain shape up to that point is available from that point on. However *if* you change the terrain shape *after* that node (using displacement in the Shaders group, in a Surface Layer for example), then you would need to recompute the normal to get absolutely correct results.

If the displacement you have done in Shaders is minimal (e.g. small bumps of less than 1 meter) then you generally don't need to worry about it unless your displacement will also be very small. But if the displacement in Shaders made significant changes to the terrain shape you will have to use a Compute Normal, increasing render time, but giving you an accurate normal to work with from that point on. This is why it's generally best (although not always feasible) to do the majority of your terrain shape adjustment in the Terrain group.

- Oshyan