Hi John,

A few things come to mind that might help:

1) Make sure when you do your calculations, everything is in the same space.  
For example, if you wanna get the direction from the vertex to the light in 
view space (lightPos - vertex) then both the light position and the vertex need 
to already be in view space before you take the difference.

2) View space is characterized by having the camera centered at the origin and 
facing down the -z axis (in OpenGL).  This means that the vector (0.0, 0.0, 
-1.0) is your forward vector in view space.

3) It helps to be familiar with the characteristics of coordinate systems at 
each transformation stage: local/world/view/clip (after 
projection)/NDC(normalized device coordinates), and finally screen coordinates. 
 I'm sure there's a ton of good information about this on the web or one of the 
many 3d graphics books.

Good luck,
Michael

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45201#45201





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to