David Glenn wrote:
Greetings!

I know that I've been through this before, but I have a little more that I can 
show off, and a little more understanding what to ask.

I'm trying to draw lines about my terrain. I'm using my ellipsoid model to help 
draw on top of things. but as you can see from my example below, even though I 
can successfully draw above my terrain, when I zoom in my camera for it appears 
that the near clipping plain is cutting off the lines and not the polygon 
terrain below.

 [Image: http://www.dglenn.com/osgpics/test_example_1.png ]

I first I figured that it was that I was not setting my near far planes right, but I've been experimenting with that and even used some settings that some of you suggested. I can't figure this one out! The only other things that come to mind is the camera manipulator I'm using. I've ruled out other elements -like the terrain. I have some example code that I can post here that I used to test this that I can post - I just don't what to upload too much stuff and jam things up, you understand!

Interesting. Why would you suspect the projection matrix (near far planes)? Cause if you're using the same projection matrix for the lines as you are for the terrain, then the terrain would also be clipped. Are you using a different Camera node to render the lines? If so, why? This this could result in a different projection matrix, causing your geometry to not share the same z mapping. This would break your z buffer, of course.

I'm not convinced the problem isn't that the lines are "under" the terrain and therefore losing the z test. If your lines are drawn last (via render bins) then you could disable depth testing just to check to see if this is the case. Set the depth test to GL_ALWAYS for the lines and see if they appear on top of the terrain.

--
  -Paul Martz      Skew Matrix Software
                   http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to