Re: [osg-users] [osgPPU] Render lower Resolution with unitOut than wandow / fullscreen

2011-06-08 Thread Peter Wrobel
Hi All,

@Ricky,
it works for me as expected now.
First I attach a new viewport with e.g. half res of my output window, and 
attach a texture with the same half res to the Color Buffer of the Camera. This 
can be done with different Cams and resolutions, if you have some funky 
pipeline.
camera - setViewport( new osg::Viewport( 0 , 0 , halfResWidth , 
halfResHeight ) ) ;
camera - attach( osg::Camera::COLOR_BUFFER0 , textureColor ) ; // has also 
halfResWidth/Height

At the end of the pipeline I tell the unitOut not to use any camera viewport as 
( size ) reference, and add another Viewport with the full resolution of my 
output window.
unitOut - setInputTextureIndexForViewportReference( -1 ) ; // Don't use 
any Camera Viewport as reference
unitOut - setViewport( new osg::Viewport( 0 , 0 , fullResWidth , 
fullResHeight ) ) ;

That's it.


@Art
With out of Sync I meant that the visual scale of the Glowed scene had not the 
same size as the visual scale of the non glowed scene. My mistake was, that I 
tried to scale up the viewports that were attached to the cameras ( main and 
glow ), but should have done that with the viewport attached to unitOut. 
Everything is working fine now :-)
But still a good Debugging Hint, didn't know that till now. 

Cheers, PP

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





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


Re: [osg-users] [osgPPU] Render lower Resolution with unitOut than wandow / fullscreen

2011-06-07 Thread Peter Wrobel
Hi Art,

Thx for your answer, that worked, kind of, but have now some new issues.
I am using the Glow example, Blur and Original are out of Sync. Will try to 
figure out, and ask/answer later.


Thank you!

Cheers,
ParticlePeter

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





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


Re: [osg-users] [osgPPU] Render lower Resolution with unitOut than wandow / fullscreen

2011-06-07 Thread Riccardo Corsi
I Peter,

I've experienced the same issue some time ago, but could not find the real
cause.
I've tried several combinations of pre-post render order of cameras, and
renderbin order for processor, but none of them solved the issue.

If you make any progress please post some news... =)
Thanks you!
Ricky




On Tue, Jun 7, 2011 at 09:40, Peter Wrobel particlepe...@gmx.de wrote:

 Hi Art,

 Thx for your answer, that worked, kind of, but have now some new issues.
 I am using the Glow example, Blur and Original are out of Sync. Will try to
 figure out, and ask/answer later.


 Thank you!

 Cheers,
 ParticlePeter

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





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

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


Re: [osg-users] [osgPPU] Render lower Resolution with unitOut than wandow / fullscreen

2011-06-07 Thread Art Tevs
Hi,

I suppose they are not out of sync, but one is just one frame later than the 
other. In order to checkout the pipeline, you can run osgPPU in debug mode, I 
don't remember exactly (take a look into readme) you need to setup an 
environment variable. Then when unit pipeline is processed it will output to 
the console the units in the order they are rendered. This might help to debug 
the issue.

Cheers,
Art

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





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


[osg-users] [osgPPU] Render lower Resolution with unitOut than wandow / fullscreen

2011-06-06 Thread Peter Wrobrl
Hi,

I would like to render my scene in a lower resolution than the viewport 
resolution, but want it stretched afterwards. When I scale the texture(s) that 
are attached to to the camera, e.g. half res, the render output is only half 
the size ( in x and y ) and placed in the lower left corner, and not stretched 
over the viewport.
Think that with this method:
unitOut - setInputTextureIndexForViewportReference( inputindex )

one can tell ppu which unit/texture is the reference scale for the output, but 
in my pipleine there is no viewport sized texture.

Is there another way to tell unitOut to scale its resulting texture to viewport 
size ?


Thank you!

Cheers,
ParticlePeter

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





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


Re: [osg-users] [osgPPU] Render lower Resolution with unitOut than wandow / fullscreen

2011-06-06 Thread Art Tevs
Hi Peter,

you can manually set a viewport for the unit to render it to specific size and 
position on the output buffer.

cheers,
art



ParticlePeter wrote:
 Hi,
 
 I would like to render my scene in a lower resolution than the viewport 
 resolution, but want it stretched afterwards. When I scale the texture(s) 
 that are attached to to the camera, e.g. half res, the render output is only 
 half the size ( in x and y ) and placed in the lower left corner, and not 
 stretched over the viewport.
 Think that with this method:
 unitOut - setInputTextureIndexForViewportReference( inputindex )
 
 one can tell ppu which unit/texture is the reference scale for the output, 
 but in my pipleine there is no viewport sized texture.
 
 Is there another way to tell unitOut to scale its resulting texture to 
 viewport size ?
 
 
 Thank you!
 
 Cheers,
 ParticlePeter


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





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