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 

Viewer slaves and RTTs

Goto page Previous  1, 2
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Steal
User


Joined: 26 Jan 2017
Posts: 60

PostPosted: Sat Feb 18, 2017 6:39 pm    Post subject:
Re: Viewer slaves and RTTs
Reply with quote

Ah someone that thinks with me instead of trolling me (XD Robert)

I understand the idea of an FBO etc, but if I tell my camera to use an FBO, it goes black. This is because this camera is not an rrt-pbuffer, but a regular gc added to a camera that serves as a viewer slave.

I understand there can be many color attachments, but although I tell my camera to render to its only color buffer, it also renders to the screen. Is this a limitation of using a non pbuffer gc? Must be, because I've hit this problem with all my might yesterday and got nowhere Sad So a bit frustrated lol

I am working on render passes right now, which means I can add an eye adaptation / adaptive tone mapping / bloom pass and more.

Is it correct that I have to add ortographic viewer slaves with their own master scene graphs with a quad to achieve them rendering in succession?

SMesserschmidt wrote:
Hi Johny,
Quote:
Hi,

Might I add it was quite nontrivial to port threejs, but it all works. Now only one thing remains, which is either using a pbuffer gc or to somehow prevent my camera from drawing directly to its window.
Well, then simply render to a FBO and pass the texture to your final
camera which will render to the framebuffer. The multiplerendertargets
example might give you some pointers.


Cheers
Sebastian
Quote:

Thank you!

Cheers,
Johny

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70259#70259









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Steal
User


Joined: 26 Jan 2017
Posts: 60

PostPosted: Sat Feb 18, 2017 6:54 pm    Post subject:
Reply with quote

Hi,

So to repeat myself again: camera renders properly to its color attachment, but also the screen (undesired).

If I tell this camera to act as / use an FBO, it does neither, it is i.e. 'black'.

Thank you!

Cheers,
Johny
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 349

PostPosted: Sat Feb 18, 2017 7:41 pm    Post subject:
Reply with quote

Hi Steal

There's few incoherencies in your code
-targetted Texture2D is not fully setup ( you don't even set the internal texture format)
-A RenderToTexture camera should always be setted with FBO implementation

I think(as suggest Sebastian) the best course for you would be take the osgmrt example as a start and transform it until it fit your purpose..
...or searchingthe forum for more info on OSG RenderToTexture Camera system.

Keep cool dude:)
Cheers

Steal wrote:
Hi,

So to repeat myself again: camera renders properly to its color attachment, but also the screen (undesired).

If I tell this camera to act as / use an FBO, it does neither, it is i.e. 'black'.

Thank you!

Cheers,
Johny
Back to top
View user's profile Send private message
Steal
User


Joined: 26 Jan 2017
Posts: 60

PostPosted: Sat Feb 18, 2017 7:50 pm    Post subject:
Reply with quote

Oi mate,

Ouch! This is indeed the fix.

Code:
texture2D->setInternalFormat(GL_RGBA);


I had commented this out thinking the implicit default was maybe better suited.

Thanks!

mp3butcher wrote:
Hi Steal

There's few incoherencies in your code
-targetted Texture2D is not fully setup ( you don't even set the internal texture format)
-A RenderToTexture camera should always be setted with FBO implementation

I think(as suggest Sebastian) the best course for you would be take the osgmrt example as a start and transform it until it fit your purpose..
...or searchingthe forum for more info on OSG RenderToTexture Camera system.

Keep cool dude:)
Cheers

Steal wrote:
Hi,

So to repeat myself again: camera renders properly to its color attachment, but also the screen (undesired).

If I tell this camera to act as / use an FBO, it does neither, it is i.e. 'black'.

Thank you!

Cheers,
Johny
Back to top
View user's profile Send private message
LonBeck
Newbie


Joined: 06 Feb 2017
Posts: 2

PostPosted: Tue Feb 21, 2017 8:06 am    Post subject:
Reply with quote

Hi,

Thank you! I have problem like this, too.

Cheers,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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 viewer events synchronization xdfanfan General 1 Tue Dec 12, 2017 4:00 pm View latest post
No new posts osgoculus viewer picking mmaurus General 7 Wed Nov 08, 2017 2:44 pm View latest post
No new posts Passing input to viewer/camera (using... antiro42 General 2 Sat Sep 16, 2017 11:07 am View latest post
No new posts Passing input to viewer/camera (using... antiro42 General 0 Sat Sep 16, 2017 11:06 am View latest post
No new posts access to viewer instances in plugins Ralf Habacker General 2 Wed Aug 16, 2017 7:32 am 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