Galto2000 Newbie
Joined: 14 Apr 2010 Posts: 19
|
Posted: Sun Nov 06, 2011 1:16 am Post subject: rendering off screen ocean scenes |
|
|
Howdy all
I am using OSG for generating synthetic environments for AI agents. The one I am working on in particular flies over water, so using osgOcean seems to be the right choice here.
I have two views: one that chases the vehicle and one that is taken from the vehicle's payload (pan-tilt-zoom camera).
I have a third context, a pbuffer, that is assigned to a camera slaved with the pan-tilt-zoom camera, so that I can easily ship the pixelbuffer to CPU space where the AI processes the images (according to what the pan-tilt-zoom camera sees).
I have an issue though: for some reason the ocean scenery is not rendered in the pbuffer but I do see it in my chase view and in my pan-tilt-zoom view (to which my off screen camera is slaved). I just get the default blueish-purpleish background (my pixel data is 33f33f33f33f33f....) in the saved images.
However, if instead of the ocean scene I use a terrain loaded from a terrapage database, I am actually able to render the scene in my pbuffer.
Does anybody know of an issue with rendering osgOcean off-screen?
Also, I had to force my pan-tilt-zoom viewer to single threaded, because otherwise it didn't work (Windows Error #170: [Screen #0] GraphicsWindowWin32::makeCurrentImplementation() - Unable to set current OpenGL rendering context. Reason: The requested resource is in use.).
My system: Intel Core i7 CPU Q820, 8GB, Windows 7 (service pack1) NVIDIA Quadro FX 1800M and using latest release version of OSG.
Thank you!
Cheers,
bart |
|
kcbale User
Joined: 04 Mar 2011 Posts: 69
|
Posted: Mon Nov 07, 2011 4:34 pm Post subject: rendering off screen ocean scenes |
|
|
Hi Bart,
This is a fairly specialised use case for osgOcean and wasn't really considered in the initial design. osgOcean uses a custom cull traversal within ocean scene which controls all of the prerender and postrender passes. I fear that it may be this cull traversal that is messing up your pbuffer context.
Take a look at the code in OceanScene in particular the cull traversal, maybe you'll be able to figure out a solution from that.
Regards,
K.
On 6 November 2011 01:16, bart gallet < ( Only registered users can see emails on this board! Get registred or enter the forums! |
)> wrote:
Quote:
|
Howdy all
I am using OSG for generating synthetic environments for AI agents. The one I am working on in particular flies over water, so using osgOcean seems to be the right choice here.
I have two views: one that chases the vehicle and one that is taken from the vehicle's payload (pan-tilt-zoom camera).
I have a third context, a pbuffer, that is assigned to a camera slaved with the pan-tilt-zoom camera, so that I can easily ship the pixelbuffer to CPU space where the AI processes the images (according to what the pan-tilt-zoom camera sees).
I have an issue though: for some reason the ocean scenery is not rendered in the pbuffer but I do see it in my chase view and in my pan-tilt-zoom view (to which my off screen camera is slaved). I just get the default blueish-purpleish background (my pixel data is 33f33f33f33f33f....) in the saved images.
However, if instead of the ocean scene I use a terrain loaded from a terrapage database, I am actually able to render the scene in my pbuffer.
Does anybody know of an issue with rendering osgOcean off-screen?
Also, I had to force my pan-tilt-zoom viewer to single threaded, because otherwise it didn't work (Windows Error #170: [Screen #0] GraphicsWindowWin32::makeCurrentImplementation() - Unable to set current OpenGL rendering context. Reason: The requested resource is in use.).
My system: Intel Core i7 CPU Q820, 8GB, Windows 7 (service pack1) NVIDIA Quadro FX 1800M and using latest release version of OSG.
Thank you!
Cheers,
bart
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43717#43717
_______________________________________________
osg-users mailing list
(Only registered users can see emails on this board! Get registred or enter the forums! | )
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
|
------------------
Post generated by Mail2Forum |
|
Galto2000 Newbie
Joined: 14 Apr 2010 Posts: 19
|
Posted: Mon Nov 07, 2011 6:30 pm Post subject: Re: rendering off screen ocean scenes |
|
|
Hi K
Thanks for the tip. I'll look into it.
I noticed that when I disable all shader based features, I am able to render it off screen (more or less). It looks like most of the special effects that depends on shaders are for underwater scenes which I am not using anyways.
Cheers
Bart |
|
kcbale User
Joined: 04 Mar 2011 Posts: 69
|
Posted: Mon Nov 07, 2011 8:02 pm Post subject: rendering off screen ocean scenes |
|
|
Hi Bart,
The problematic ones areĀ
The cross hatch glare on the ocean surface
Depth of field and lens distortion
God rays
.. I think that's it.
All of which use pre and post render passes.
Regards,
Kim.
On 7 November 2011 18:30, bart gallet < ( Only registered users can see emails on this board! Get registred or enter the forums! |
)> wrote:
Quote:
|
Hi K
Thanks for the tip. I'll look into it.
I noticed that when I disable all shader based features, I am able to render it off screen (more or less). It looks like most of the special effects that depends on shaders are for underwater scenes which I am not using anyways.
Cheers
Bart
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=43740#43740
_______________________________________________
osg-users mailing list
(Only registered users can see emails on this board! Get registred or enter the forums! | )
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
|
------------------
Post generated by Mail2Forum |
|