Jump to content

[SOLVED] Dynamically switching stereo


photo

Recommended Posts

Hi,

 

I am trying to use stereo 3D in my Unigine powered visualizer, but I can't figure how to enable it at runtime.

Is it a way to switch between stereo/non-stereo rendering, or is it absolutely required to restart the whole engine ?

 

Thanks

 

Link to comment

Hell, Nicolas!

 

Actually, if you take a look at core/scripts/system/stereo.h file you'll find a source code full of preprocessor switches. So the way it was designed meant that user had to restart the engine and run it with different set of defines in order to change stereo mode.

 

Yet it's possible to switch between several stereo modes at runtime like horizontal, vertical, anaglyph, interlaced or separate. It's all about how you set post materials and render_stereo console variable. Also, if you want to go that way you need to get rid of our stereo handling and handle it by yourself. That means you must not call stereoInit, stereoShutdown, stereoUpdate and stereoRender functions and must provide your own control scheme.

 

There're also some parameters which can be tuned at runtime such as stereo distance, radius and offset. However, it's not possible to switch between NVIDIA 3D Vision and other stereo modes.

  • Like 1
Link to comment

Thank you Unclebob, your very complete answer makes everything a lot more clear for me :)

 

I will try to modify the stereo script you mentioned to fit my needs.

Link to comment
×
×
  • Create New...