OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

rendering off screen ocean scenes


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgOcean [osgOcean]
View previous topic :: View next topic  
Author Message
Galto2000
Newbie


Joined: 14 Apr 2010
Posts: 19

PostPosted: Sun Nov 06, 2011 1:16 am    Post subject:
rendering off screen ocean scenes
Reply with 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
Back to top
View user's profile Send private message
kcbale
User


Joined: 04 Mar 2011
Posts: 68

PostPosted: Mon Nov 07, 2011 4:34 pm    Post subject:
rendering off screen ocean scenes
Reply with quote

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
Back to top
View user's profile Send private message
Galto2000
Newbie


Joined: 14 Apr 2010
Posts: 19

PostPosted: Mon Nov 07, 2011 6:30 pm    Post subject:
Re: rendering off screen ocean scenes
Reply with 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
Back to top
View user's profile Send private message
kcbale
User


Joined: 04 Mar 2011
Posts: 68

PostPosted: Mon Nov 07, 2011 8:02 pm    Post subject:
rendering off screen ocean scenes
Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgOcean [osgOcean] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Multi layer effect rendering problem ... not3not4 General 0 Wed Jul 19, 2017 9:44 am View latest post
No new posts Convert from screen space to world sp... NavyBas General 3 Thu Jun 22, 2017 6:14 pm View latest post
No new posts Multi-pass rendering segfault issue qiaokun General 0 Mon May 15, 2017 10:36 am View latest post
No new posts Disable rendering to screen wernerM General 0 Fri Apr 28, 2017 1:13 pm View latest post
No new posts Screen Space 2D Axis Alligned Boundin... Takarashy General 0 Tue Apr 11, 2017 8:31 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP