Paul Martz writes: > On 9/28/2011 9:22 AM, Jean-Sébastien Guay wrote: >> Hi Jeremy, >> >>> My question is how do I render these objects? Should I treat them >>> specially (for example, adding them in a post render camera) or should I >>> simply position them properly to be rendered in the main frame? I'm >>> looking for some "gotchas" from other people who have done something >>> similar. >> >> I'd render them as a separate camera, simply because they're very >> close to the eye and so might affect your depth range and precision >> pretty drastically. If you render them as a separate camera, you'll >> then have a main camera with a z range starting at over 1m (probably >> the ground will be the closest object most of the time) and a >> post-render camera with a very small near distance but a very close >> far distance too, so that's ideal. You can even keep automatic >> near-far calculation on for both, and it will likely work really >> well. > > I agree with J-S. If you use ABSOLUTE_RF and an identity view matrix, > you should be able to draw these scene elements directly in eye space > (you're looking down the -z axis with +y up). In OSG parlance, it's > effectively a "HUD". > > In OpenGL, the pattern looks like: push the modelview matrix, set it > to identity, draw, then pop. Whenever rendering calls for this OpenGL > pattern, in OSG you should immediately think "Camera".
Hi all, Just a question about this: shouldn't you clear the depth buffer also? If the near and far planes are different between cameras, aren't the contents of the depth buffer nonsense for the other camera? Or is it possible to make some assumption for this particular case? -- Alberto _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org