Hi,

Wally Atkins wrote:
Hi jp,

Thanks for the reply. I see that the osgprerender does spin the model
and I made a stab at putting in the osgDB::writeImageFile but I must
be at the wrong place ... because the output (PNG) that I got was
just a full white image.

In the function createPreRenderSubGraph() I went to the if (useImage)
block and added the writeImageFile() call there ... that must not be
the appropriate place though.

Also, I see in the createPreRenderSubGraph() function a variable
named "noSteps" which I am assuming determines the number of steps to
take in order to perform the 360 around the model. What I would like
to do is use that count ... somehow ... to number the images
accordingly as the snap shots around the model.

The cow is actually spun using an AnimationPathCallback attached to loadedModelTransform. You could either try to get the angle from the AnimationPathCallback or you could just attach the model to your own transform that you control manually. You would then need to pass this angular value to MyCameraPostDrawCallback. You could start by using a global variable and then refine it, there are multiple options.


I just tried adding the writeImageFile() into the
MyCameraPostDrawCallback and got at least a resemblance of the model
in the resulting image file. I'm really not sure of the best way to
go about this so any further tips would be greatly appreciated.

Yes, the writeImage should go into MyCameraPostDrawCallback, you could remove the image modification in the callback or put the write before the image is modified.

jp


Thanks, Wally

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





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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

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

Reply via email to