[osg-users] Multipass problems
osg at dvp.co.il
Sun Sep 16 02:01:16 PDT 2007
in the osg examples there are several examples of how to use RTT.
I would like to concatenate several renderings. I mean, render the scene to texture1, then use texture1 to create texture2, then use texture1 & texture2 to create texture3 and so on.
I don't understand how to control the order of the rendering. I tried to change the rendering order number of the camera's I used in PRE_RENDER and it didn't seem to have any effect. The results seems fine, but I don't know if it used the data in the texture from the current frame or the previous.
(in the example I made to check this ability, I render the cow to texture, then using PRE_REND
ER & shader I remove the red plane and later I remove the green plane, changing the order should result in different images)
this brings me to the next question. I tried to clear the texture used to render the Scene to. I tried setting the texture image to new allocated image, dirty the texture parameters and dirty the texture object and nothing seems to have the required result. dirty the texture object results as blank screen, the other operation doesn't seem to clear the texture since changing the order in the multipass didn't change the results.
another problem I had was to render in different passes to the same texture. (Even if it was in the POST_RENDER sub tree). is there a way to reuse the same texture in different passes?
the last problem I encountered is that I rendered the resulting textures, using several cameras NESTED_RENDER each drawing a square with different texture attached 2 it and each camera has different viewport. The problem is the is the cameras viewport intersected, I couldn't change the order they are rendered (to make one of them on top of the other). I tried setting the RenderDetaill with higher and lower numbers, both for the Camera and for the Geodes, with no success.
any ideas concerning any of the problems would be appriciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users