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 

Drawing a mesh over an osgPPU output


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgPPU [osgPPU]
View previous topic :: View next topic  
Author Message
Skylark (Jean-Sébastien Guay)
Professional


Joined: 05 Jan 2009
Posts: 2249

PostPosted: Tue Nov 08, 2011 4:33 pm    Post subject:
Drawing a mesh over an osgPPU output
Reply with quote

Hi all,

I hope there are some people using osgPPU who can answer my question.
I'm having trouble doing something that I think should be simple, so if
someone has any ideas I'd appreciate it.

What I need is to draw a mesh (which is a blending mesh, and whose
vertices are in eye space) over the result of an osgPPU pipeline before
outputting it to the framebuffer. My osgPPU unit is almost 100% like the
HDR example's pipeline, without the text and background PPUs which I
don't need.

What I tried is to add a transform (ABSOLUTE_RF) containing the mesh
under the final unit in the pipeline. The result is that the mesh is not
rendered.

I also tried adding the mesh (drawable only) under the final unit's
geode. For this I had to create an overridden class so that the unit's
init() method would not remove the drawable from the geode, and still it
wasn't rendered in the result.

Is there already a tool in osgPPU that would allow me to do this easily?
Or should I use a UnitCamera with my mesh under it?

Thanks in advance,

J-S
--
______________________________________________________
Jean-Sébastien Guay
Only registered users can see emails on this board!
Get registred or enter the forums!

http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
art (Art Tevs)
Site Admin


Joined: 20 Dec 2008
Posts: 414
Location: Saarbrücken, Germany

PostPosted: Tue Nov 08, 2011 4:51 pm    Post subject:
Re: Drawing a mesh over an osgPPU output
Reply with quote

Hi Jean,

one way to do so, is to pass the output of osgPPU graph to a texture and then use that texture in order to draw the background for your scene. So, at the end of your Unit Graph you don't use UnitOut but UnitInOut and use it's output texture for your purpose.

If you want to have some kind of HUD, then you might need to experiment with Processor's bin number. Since this was set in the way, that output of the units is always rendered on top of anything. You might also add to the stateset of your geometry some higher number then this of the processor (100).

cheers,
art



Skylark wrote:
Hi all,

I hope there are some people using osgPPU who can answer my question.
I'm having trouble doing something that I think should be simple, so if
someone has any ideas I'd appreciate it.

What I need is to draw a mesh (which is a blending mesh, and whose
vertices are in eye space) over the result of an osgPPU pipeline before
outputting it to the framebuffer. My osgPPU unit is almost 100% like the
HDR example's pipeline, without the text and background PPUs which I
don't need.

What I tried is to add a transform (ABSOLUTE_RF) containing the mesh
under the final unit in the pipeline. The result is that the mesh is not
rendered.

I also tried adding the mesh (drawable only) under the final unit's
geode. For this I had to create an overridden class so that the unit's
init() method would not remove the drawable from the geode, and still it
wasn't rendered in the result.

Is there already a tool in osgPPU that would allow me to do this easily?
Or should I use a UnitCamera with my mesh under it?

Thanks in advance,

J-S
--
______________________________________________________
Jean-Sébastien Guay
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/


------------------
Post generated by Mail2Forum
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 -> 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 Trouble Drawing Text in Arabic ehensens General 5 Tue Nov 01, 2016 8:35 pm View latest post
No new posts LOD for drawing lines of a co-ordinat... Andreas Goebel General 1 Thu Oct 13, 2016 2:28 pm View latest post
No new posts How to program the skinned mesh anima... lhx19950309 General 0 Sat Oct 08, 2016 10:12 am View latest post
No new posts Mesh Functionality raider General 6 Tue Sep 27, 2016 4:13 pm View latest post
No new posts Creating mesh on runtime Tiniriel General 1 Fri Sep 02, 2016 10:39 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