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 scene geometry in PPU


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU]
View previous topic :: View next topic  
Author Message
danoo
Appreciator


Joined: 16 Dec 2011
Posts: 146

PostPosted: Mon Mar 04, 2013 3:14 pm    Post subject:
Rendering scene geometry in PPU
Reply with quote

Hi all

I have some light cones that simulate the glowing of a light. All the light cones are in one group in the scene graph, and they have their apropriate shader in the group stateset to get the desired effect.

Now my goal is to render the cones in a osgppu postpro step. I want to have them rendered over the normal scene. So my intention is to write a UnitInOut class that can take a osg::Group node and render it over the existing input texture.

This is actually very close to the UnitText class, instead of a osg::Text I have a small sub scene graph. One issue is the correct view and projection matrixes, which must no longer be related to the screen quad, but instead must be the same like the main scene.

I hope you get the idea... I started to write the class, but I'm stuck with applying the correct stateset and matrixes at the correct time.

Can anybody help me?

Thank you!

Cheers,
Daniel
Back to top
View user's profile Send private message
hybr
Appreciator


Joined: 26 Jun 2009
Posts: 454

PostPosted: Mon Mar 04, 2013 3:41 pm    Post subject:
Rendering scene geometry in PPU
Reply with quote

Hi

I believe it's easier to do with postrender camera - disable clear color, attach input texture as color attachment, set view and projection matrices, add your cones with shaders and you are done. You can also draw result into another texture with prerender camera and mix together inside osgppu, if postrender camera is not good for some reason.

Cheers.

04.03.2013, 19:19, "Daniel Schmid" <>:
Quote:
Hi all

I have some light cones that simulate the glowing of a light. All the light cones are in one group in the scene graph, and they have their apropriate shader in the group stateset to get the desired effect.

Now my goal is to render the cones in a osgppu postpro step. I want to have them rendered over the normal scene. So my intention is to write a UnitInOut class that can take a osg::Group node and render it over the existing input texture.

This is actually very close to the UnitText class, instead of a osg::Text I have a small sub scene graph. One issue is the correct view and projection matrixes, which must no longer be related to the screen quad, but instead must be the same like the main scene.

I hope you get the idea... I started to write the class, but I'm stuck with applying the correct stateset and matrixes at the correct time.

Can anybody help me?

Thank you!

Cheers,
Daniel

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




------------------
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 -> osgPPU [osgPPU] 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 Using Geometry with packed vertex arrays ravidavi General 2 Sat Mar 25, 2017 4:39 am View latest post
No new posts Polygon Rendering bhanu406 General 1 Thu Mar 16, 2017 9:18 am View latest post
No new posts About separate rendering of a slave c... wernerM General 0 Tue Mar 07, 2017 3:14 pm View latest post
No new posts Covert and use 3ds Max scene to OpenS... lucia General 0 Mon Mar 06, 2017 9:19 am View latest post
No new posts How to handle cameras in the scene gr... wernerM General 7 Fri Feb 24, 2017 4:47 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