Dear Wang Rui,
 
Thanks for this very useful example, which I think could be a nice OSG standard 
example.
 
I've added _isFinished = false; to the handle method after the tile images are 
combined in the final output image, else it would continue to call 
recordImages().
 
Regarding this FIXME:
 
// FIXME: A stupid way to combine tile images to final result. Any better ideas?
 
The only other way I can think of is to use one memcpy per row of the tile 
image, this is also done in the attached version.
 
Kind regards,
 
Ruben

________________________________

From: [email protected] on behalf of Wang Rui
Sent: Tue 8/25/2009 4:32 PM
To: OpenSceneGraph Submissions
Subject: [osg-submissions] New example: osgposter - Rendering hi-resscreenshots


Hi all,
 
Attachment is an example of rendering 3D scenes to high resolution screenshots.
 
I uses a queue of Camera objects to do offscreen rendering with the 
Camera::attach() function. The entire picture is split into many tiles and it 
will take a few seconds while attaching and detaching cameras with tiles. You 
may select to output every tile as an image file, or combine them together to 
create a large poster, for example, a 12800 x 9600 image.
 
Start the program like this:
 
./osgposter --output-poster --poster output.bmp --tilesize 800 600 --finalsize 
8000 6000 cow.osg
 
Adjust the scene camera to a suitable position and press 'p' or 'P' on the 
keyboard. Wait until sub-cameras dispatching is finished. And the poster file 
will be created while closing window. A 8000 x 6000 output.bmp will be created 
to show a fine-printed cow. :)
 
The command below may also help:
 
./osgposter --help
 
Already tested on Windows XP and Arch Linux, with the latest OSG version. Hope 
it be a new member of OpenSceneGraph examples. :)
 
Cheers,
 
Wang Rui
This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html

<<winmail.dat>>

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to