Hello,


I have a single scene that is being rendered multiple times on the same
screen. The entire scene is contained within a DepthPartitionNode. I am
rendering a velocity vector arrow originating from my object using an
AutoTransform node so the arrows maintain their size regardless of their
distance to the camera. I have two cameras. One camera is very close to the
object, the other camera is very far from the object. The problem I am
experiencing is that the clipping that occurs on the arrow in camera two is
dependant on the distance to the object in camera one. I believe the
following sequence of events is occurring:



1. Camera one starts to render the scene.

2. The cull visitor hits the DepthParitionNode.

3. A distance accumulator is created and sent through the scene.

4. The distances for the depth partitions are calculated for the scene using
the current bounds of the arrow.

5. The cull visitor is passed to each depth partition.

6. The cull visitor hits the AutoTransform node.

7. The AutoTransform node calculates its new scale by using the information
from the cull visitor. This dirties the bound of the node.

8. Rendering for camera one finishes.



9. Camera two starts to render the scene.

10. The cull visitor hits the DepthParitionNode.

11. A distance accumulator is created and sent through the scene. When the
accumulator hits the AutoTransform, it calculates the bounds of the node
since it was dirtied in step 7. Unfortunately, the size of the node has been
scaled according to the information of the cull visitor used to render the
view in camera one.

12. The distances for the depth partition are calculated for the scene using
the incorrect bounds of the arrow.

13. The cull visitor is passed to each depth partition.

14. The cull visitor hits the AutoTransform node.

15. The AutoTransform node calculates its new scale by using the information
from the cull visitor. This scale was needed prior to step 11 to calculate
the proper distances!

16. Rendering for camera two finishes.



Because the distances calculated by the distance accumulator in step 11 were
incorrect, the wrong clipping planes are used when rendering the view for
camera two. This causes some of the arrows to not be rendered entirely.



Any suggestions on how to fix this?
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to