Hi silver

In our project we have a driving simulator using rear view mirrors. And we had 
the same issues about what should be seen in the mirror and what in the main 
view. First we had no shadows and light effects in the mirrors, but after some 
time, we figured that light effects are essential in the mirrors to, but 
shadows are to expensive...

So we ended up having the following scene graph:

RootNode
- PostProcessingNode
- MainView PreRenderer
- VisualRootNode
  - ShadowedScene
    - Terrain
    - Models
  - Particles
  - Environment (Sky, Clouds)
  - Common PreRenderers (LightMap, Tracks, etc)

So in other words we defined an VisualRootNode that holds all the Content that 
is common for every viewer (main or mirror). The upper most RootNode contains 
all the Postpro stuff and Prerenderers that are only for the main view.

Then to render the Mirrors we created PreRender Cameras that are not owned by 
the scenegraph but share the same GraphicsContext. This is an important Point. 
They work like the StatsHandler or HelpHandler with their apropriate PostRender 
Cameras, which never appear in a scene graph but still the use the main 
GraphicsContext...
These cameras render the VisualRootNode Content to a texture, and this texture 
can then be applied to a mirror geometry somewhere in our car model.

So there is a decision you have to take what you want to display in the main 
view and what in the mirrors. 

I hope this gave you some ideas.

Now I have a question for you: How did you integrate SpeedTree? Can you provide 
your implementation? I am working on it, but stuck somehow.You can also write 
to me personnaly...

Cheers,
Daniel

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





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

Reply via email to