Re: [osg-users] Real3D on LG Optimus with OpenSceneGraph 3.0.0
Thanks Robert and Rafa, Looks I had set the display settings on the viewer correctly but I was not actually rendering with the main camera in the scene graph, I only had an ortho2d camera rendering a HUD underneath the root node. Once I had placed some geometry underneath the root node to be rendered by the perspective camera, the stereoscopic display worked properly. When I set the display settings for the ortho2d camera to do stereo, it still did not work. Is that because ortho cameras do not support stereo? thinking about it hurts my head a bit, since ortho does not have a focal point... I ended up creating another camera for the HUD that simply renders everything into the other half of the viewport. Thanks -Oren Ps. Thanks Rafa for referring me to your interesting project, I will definitely check out! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49938#49938 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Real3D on LG Optimus with OpenSceneGraph 3.0.0
Hi Oren, I already developed something for LG Optimus 3D and the DisplaySetting worked as expected. Maybe you need assign the DisplaySettings to the Viewer if it's already realized. Some days ago I released osgAndroid (https://gitorious.org/osgandroid) to make life easier for android developers and OSG. I made use of the DisplaySettings class in osgAndroid for my project in the LG Optimus 3D. The usage will be something like: // osgAndroid Java Code: DisplaySettings ds = new DisplaySettings(); ds.setStereoMode(DisplaySettings.StereoMode.HORIZONTAL_SPLIT); ds.setStereo(true); ds.setEyeSeparation(0.056f); viewer.setDisplaySettings(ds); Anyway, if you code something similar in C++ it should work. Rafa. 2012/9/7 Oren Fromberg > well, I stepped through the code in DisplaySettings.cpp and setting those > environment variables does the exact same thing as the function calls. > > also, I am not sure how to set environment variables in android so I don't > know how to test it. > > I want to understand how the rendering changes at the low level when > display settings have stereo enabled. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=49856#49856 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Real3D on LG Optimus with OpenSceneGraph 3.0.0
Hi Oren, The env vars just provide the default settings from DisplaySettings so setting them programmatically will achieve the same end. As to why it's not working on your phone I can't say as I know nothing about the specifics of the phone or what you are seeing on screen or what the phone is expecting when it's a 3D mode. My expectation is that you'd need a program call to tell the phone to do stereo as the OSG itself won't know about this, it only knows that it needs to set up stereo at the graphics window levels. Robert. On 7 September 2012 16:54, Oren Fromberg wrote: > well, I stepped through the code in DisplaySettings.cpp and setting those > environment variables does the exact same thing as the function calls. > > also, I am not sure how to set environment variables in android so I don't > know how to test it. > > I want to understand how the rendering changes at the low level when display > settings have stereo enabled. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=49856#49856 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Real3D on LG Optimus with OpenSceneGraph 3.0.0
well, I stepped through the code in DisplaySettings.cpp and setting those environment variables does the exact same thing as the function calls. also, I am not sure how to set environment variables in android so I don't know how to test it. I want to understand how the rendering changes at the low level when display settings have stereo enabled. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49856#49856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Real3D on LG Optimus with OpenSceneGraph 3.0.0
Hi I know for sure it does work if you set it with env variables (like OSG_STEREO=ON OSG_STEREO_MODE=HORIZONTAL_SPLIT), didn't used to set it up in code. Cheers. 07.09.2012, 18:56, "Oren Fromberg" : > I am trying to enable stereoscopic rendering in the osg display settings in > order to use the stereoscopic display on the LG optimus. The LG Real3D API > expects the framebuffer to be split horizontally so I am enabling stereo > rendering like this: > > Code: > osg::DisplaySettings::instance()->setStereo(true); > osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::HORIZONTAL_SPLIT); > > but it doesn't seem to be working. > > What could be the reason for it not working? > > Are there any caveats to using the DisplaySettings to enable stereo at a low > level? > > Should I go the way of using two slave cameras and render in two separate > viewports in the framebuffer? > > thanks! > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=49848#49848 > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Real3D on LG Optimus with OpenSceneGraph 3.0.0
I am trying to enable stereoscopic rendering in the osg display settings in order to use the stereoscopic display on the LG optimus. The LG Real3D API expects the framebuffer to be split horizontally so I am enabling stereo rendering like this: Code: osg::DisplaySettings::instance()->setStereo(true); osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::HORIZONTAL_SPLIT); but it doesn't seem to be working. What could be the reason for it not working? Are there any caveats to using the DisplaySettings to enable stereo at a low level? Should I go the way of using two slave cameras and render in two separate viewports in the framebuffer? thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49848#49848 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org