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 

Can a FrameBufferObject be shared by multiple cameras?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
gwaldron (Glenn Waldron)
Appreciator


Joined: 25 Aug 2011
Posts: 232

PostPosted: Thu May 10, 2018 1:03 pm    Post subject:
Can a FrameBufferObject be shared by multiple cameras?
Reply with quote

Hi Robert,


I have a scenario that uses multiple RTT cameras. (The approach is similar in concept to CSM - Cascading Shadow Maps - where you compose a texture using multiple frustums). Each RTT camera renders to a different layer of a Texture2DArray. This works great! However, it uses a lot more memory than I was expecting.


I realized that each osg::Camera creates its own separate FBO, resulting in a lot of extra memory usage. Since the cameras render sequentially, it makes sense for all the RTT cameras to just re-use a single FBO. Is there any way to make that happen in OSG? Any other suggestions?


Glenn Waldron / osgEarth

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12132

PostPosted: Thu May 10, 2018 2:38 pm    Post subject:
Can a FrameBufferObject be shared by multiple cameras?
Reply with quote

Hi Glenn,

If there is a way to share FBO's between osg::Camera I don't know of
it off the top of my head. You'd need to look at the
src/osgUtil/RenderStage.cpp so see how it sets up the FBO's. It's
able to ruse it's own FBO on subsequent frames so there may be a way
for forcing it to use an existing FBO.

Robert.

On 10 May 2018 at 14:02, Glenn Waldron <> wrote:
Quote:
Hi Robert,

I have a scenario that uses multiple RTT cameras. (The approach is similar
in concept to CSM - Cascading Shadow Maps - where you compose a texture
using multiple frustums). Each RTT camera renders to a different layer of a
Texture2DArray. This works great! However, it uses a lot more memory than I
was expecting.

I realized that each osg::Camera creates its own separate FBO, resulting in
a lot of extra memory usage. Since the cameras render sequentially, it makes
sense for all the RTT cameras to just re-use a single FBO. Is there any way
to make that happen in OSG? Any other suggestions?

Glenn Waldron / osgEarth





------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 475
Location: France

PostPosted: Thu May 10, 2018 6:57 pm    Post subject:
Re: Can a FrameBufferObject be shared by multiple cameras?
Reply with quote

Hi Robert and Glenn,
I struggle against this problem too for a will now..
Wouldn't it be a good design to make FBO a Camera property and RenderStage take this one if exist for its stuff?

Cheers


robertosfield wrote:
Hi Glenn,

If there is a way to share FBO's between osg::Camera I don't know of
it off the top of my head. You'd need to look at the
src/osgUtil/RenderStage.cpp so see how it sets up the FBO's. It's
able to ruse it's own FBO on subsequent frames so there may be a way
for forcing it to use an existing FBO.

Robert.

On 10 May 2018 at 14:02, Glenn Waldron <> wrote:
Quote:
Hi Robert,

I have a scenario that uses multiple RTT cameras. (The approach is similar
in concept to CSM - Cascading Shadow Maps - where you compose a texture
using multiple frustums). Each RTT camera renders to a different layer of a
Texture2DArray. This works great! However, it uses a lot more memory than I
was expecting.

I realized that each osg::Camera creates its own separate FBO, resulting in
a lot of extra memory usage. Since the cameras render sequentially, it makes
sense for all the RTT cameras to just re-use a single FBO. Is there any way
to make that happen in OSG? Any other suggestions?

Glenn Waldron / osgEarth





------------------
Post generated by Mail2Forum

_________________
Twirling twirling twirling toward freedom
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General 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 CompositeViewer with multiple view, a... Angel General 3 Tue Aug 28, 2018 1:15 pm View latest post
No new posts osgQt scenegraph flickering with mult... Meldryt General 1 Tue May 29, 2018 3:04 pm View latest post
No new posts Shader composition with multiple func... hartwigw General 1 Sat May 12, 2018 9:59 pm View latest post
No new posts Shaders with multiple views using Vie... robertosfield General 5 Wed May 09, 2018 9:20 am View latest post
No new posts Shaders with multiple views, possible? arennuit General 9 Fri Jan 19, 2018 10:54 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