[osg-users] [osgPPU] Drawing a mesh over an osgPPU output

2011-11-08 Thread Jean-Sébastien Guay

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 Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPPU] Drawing a mesh over an osgPPU output

2011-11-08 Thread Art Tevs
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/
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org