[osg-users] Searcing for raytracer implementation based on OSG

Jean-Sébastien Guay jean-sebastien.guay at polymtl.ca
Thu Oct 11 07:08:56 PDT 2007

Hello Joachim,

> I mean, there's absolutely NO POINT in raytracing if you can't reproduce
> the exact result (plus global illumination, that is) OSG delivers
> natively with OpenGL rasterization!

That depends on what you're trying to achieve... In my case, I am just  
trying to precompute some shadows (and other things) so I can just use  
simple intersection tests and do the rest of the rendering with the  
normal OpenGL pipeline. I don't need to reproduce everything, but I  
agree that's not a complete raytracer.

> Personally, I think interfacing to a different rendering backend might
> be more promising.

In the beginning of my project I tried to create an interface between  
OSG and yafaray (the next generation of yafray, Blender's integrated  
raytracer). The problem was propagating changes in the OSG scene graph  
to yafaray's internal data structures. yafaray was not created for  
this purpose, so for example it does not store transformation  
matrices, just the raw vertices with transformations baked in. So it  
would have implied either adding transformation matrices to yafaray  
(which the author did not agree on), or re-transforming all the  
vertices each time (which would be slow).

That's just an example, the end result is that eevn though it would  
have been cool, I decided I did not need a complete raytracer  
integration. So I settled on just using intersection testing and doing  
the rest myself.

> Maybe a translation from the OSG scene description language to Renderman
> or PovRay might do the job...

That would do for raytracing static scenes, but what would be even  
better would be to integrate a raytracer into OSG so that it can track  
the changes to the scene graph and work on the same scene as the  
realtime portion, as described above.

We're not there yet, but I think Adrian's changes are a step in the  
right direction.

Once I finish my Masters, I hope I will be able to help on this. There  
have been lots of publications lately on developing so-called realtime  
raytracers, and if OSG can go in that direction (in addition to being  
the great scenegraph that it is), we could give an engine like OpenRT  
[1], which is not Open Source despite its name, a run for its money  
(so to speak). Imagine, getting a realtime engine like Direct3D but  
cross-platform, and a realtime raytracer like OpenRT but Open  
Source... Taht would kick serious arse. :-)

We'll see what the future holds...


[1] http://www.openrt.de/
Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca

This message was sent using IMP, the Internet Messaging Program.

More information about the osg-users mailing list