Hello Steven,
I would like to display these BRLCAD models by ray trace in
Openscenegraph (yes, it will be slow!). I have done some searches
through the archives and have not found a lot of info. It appears that
I am going to have to use glReadPixels and glWritePixels prior to the
swapbuffers (I am not using osgViewer yet). Does anyone know of a
better method to render via ray trace in Openscenegraph?
If all you need is to ray trace an image, you could use a textured quad
instead of glWritePixels. I would probably be faster, especially if you
can somehow render to the same memory buffer as you use for the OpenGL
texture. But in any case, displaying the result of the raytrace is not
likely to be your bottleneck...
Note that in that case (as with glWritePixels), all you get is a 2D
image of your render. So if the user changes the point of view, you have
to re-render. Whereas your previous method, rendering to a point cloud,
at least gave you some 3D positions which you could orbit around and
examine. As long as you don't need specular shading (reflections, etc)
and your scene doesn't change, you don't need to re-render. Diffuse
shading is view independent, and with static geometry, the resulting 3D
points would stay valid even if the viewpoint changes.
It's a case of what you want to do at a higher level. I guess I don't
see the point of rendering to an image to display that image in OSG...
What do you use OSG for in that case? Is the viewpoint fixed? (just
curious...)
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org