PDA

View Full Version : SoOffscreenRenderer Background (Open Inventor)



artmansoft
04-26-2010, 09:46 PM
Dear all,

I'm using a python version of open inventor which has not SoGradientBackground or SoImageBackgroundNode it its API. For some incompatibility reasons, I cannot use openGL calls in my program either.

I have created my own background node, but it had a problem: I did not know where to put it in the sceneGraph. X and Y dimensions have no problem, but the problem is with depth, i.e. I don't know what z to choose! If it is too close, then some parts of the model get invisible when rotated and if it is too far, no background is displayed. I resolved this problem by not adding the background node to the sceneGraph, but rendering it before the sceneGraph. To do this, I override the actualRedraw function of the viewer to first render the background node by calling:
getGLRenderAction().apply(backgroundSep)
and then calls the parent (viewer) actualRedraw function to render the sceneGraph.

It works fine, but I cannot save it as an image using SoOffscreenRenderer, i.e. the background will not get printed. I used the same method for SoOffscreenRenderer by getting its GLRenderAction and applying the background node and then calling the SoOffscreenRenderer.render function to render the sceneGraph, but it does not work!

Does any one have any idea how to print the background? Do you have any other idea about creation of background node?

Thanks,
artmansoft

mikeheck
04-26-2010, 10:45 PM
See response posted in Open Inventor Forum here:
http://www.mc3dviz.com/openinventor-forum/showthread.php?p=639#poststop

-Mike