Compute terrain VS Compute normal

Started by dhavalmistry, April 02, 2007, 11:48:15 PM

Previous topic - Next topic

dhavalmistry

I just wanted to know what these both nodes do in particular

Compute Terrain

Compute Normal
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

child@play

would like to know that too, i know that i have to use compute terrain when i used heavy displacement and want to place objects, but what's compute normal for?
perfection is not when there's nothing more to add, it's reached when nothing more can be left out


Harvey Birdman

Just a guess - required input for lighting/bump mapping shaders, in the same sense that compute terrain is a required input for placing objects?

child@play

yes, but when let's say, compute normal only computes the surface, while compute terrain computes the whole terrain, we could use both for placing objects (surface), but compute normal would take much less time.

am i right here, or do these nodes do completely different things?
perfection is not when there's nothing more to add, it's reached when nothing more can be left out


Harvey Birdman

#4
Compute terrain determines terrain position; compute normal computes the normal vector for a given terrain position. Compute normal does not 'compute the surface', not in the sense you're thinking. At least that would be my guess.

<edit>

Using Compute Normal to place objects probably wouldn't work very well.

</edit>

rcallicotte

Oshyan, we need you.  This is something we could use a real clear definition/example to understand.
So this is Disney World.  Can we live here?

child@play

 ;D couldn't have said it better myself  :)
perfection is not when there's nothing more to add, it's reached when nothing more can be left out


Harvey Birdman

You guys DO know what normal vectors are, right?

???

child@play

nah, i'm just playing around, tehehe  ;D
perfection is not when there's nothing more to add, it's reached when nothing more can be left out


Harvey Birdman

So I, err, take it you noticed that big 'Sucker!' tattoo on my forehead.

:)

child@play

huh, whatever you say dude :)

but i was serious, hehe, i mean, i can imagine what that is, i think i remember vectors from math long time ago, but i don't know for sure.  ;D
perfection is not when there's nothing more to add, it's reached when nothing more can be left out


rcallicotte

A vector is an English minister, right?   ::)

Seriously, I think there must be a clear definition between the two and I, for one, need it.  This hasn't helped me.  Sorry, Harvey.
So this is Disney World.  Can we live here?

Njen

The surface normal is a vector which tells all the lights and cameras how to interact with the point that the vector is emitting from (which direction it looks like it's facing) when it's being shaded or rendered.

The geometric normal (in Terragen 2 this is referred to as 'terrain') Is that actual direction that the polygon (triangle) is pointing at.

Thus on a single polygon you can have the geometric normal facing one direction, and the surface normal facing another, and when it comes time to render, ther renderer shades the surface based on which direction the surface normal is pointing at.

Harvey Birdman

If my assumption is correct (and we all know what happens when one assumes...), Compute Terrain determines the positional coordinates (x, y, z) of a given bit of terrain. I imagine it's output is originally detemermined by the 'planet' radius and is modified by the displacement values of the shaders you heap on the surface.

Vectors, without getting into the mathematical definition, may be thought of for this purpose as simple arrows, perpendicular to the surface at every point. Typically one composes/defines surfaces with a series of vertices (positions) and normals (one at each vertex). The normals are all of the same length (1.0 unit) and vary only in their direction, which is determined by the slope of the surface at that point (remember, the normals are always perpendicular to the surface). The normals are used primarily in lighting computations; if the normal vector is pointed directly at the light source, the surface is perpendicular to the source, and will receive a maximum amount of light. As the surface moves away from perpendicular, the normal points further and further away from the light, and the lighting calculations will result in the surface at that point being less illuminated.

Clear as mud, right?

;)

rcallicotte

Thanks to Harvey and njen.  This is helping me.

One question to clear up my muddy eyes - Is then the main difference between these two (Compute Normal and Compute Terrain) a way of calculating how the light reaches the camera?  One (Compute Normal) keeps the light directly parallel from the terrain to the camera and the other (Compute Terrain) includes lighting that points the light in various directions to compute the actual roughness/plainness of the terrain. 

Right or worse yet? 
So this is Disney World.  Can we live here?