Hi everyone,
i have a problem concerning volumes (bounding boxes) and distributed rendering. I have a Node (a flying butterfly) which is animated and translated through a vertex shader and which i want to display in a 3-sided-cave. The Problem is that, the butterlfy is only renderd on a specifiic side of the cave when the initial position of the OSGNode is located an that same side, but since the animation is done through a vertex shader the butterfly disappears on the other sides while flying on its circular trajectory. Now i want to change the bounding volume of the OSGNode, so that it is big enough to display the butterfly on all sides of the cave it is flying on. I managed to change the volume on a normal monitor without distribution of the scenegraph, but failed with distribution. Code looks somewhat like this:

"beginEditCP(butterflynode, Node::CoreFieldMask | Node::ChildrenFieldMask);
   butterflynode->setCore(butterflygeo);
   butterflynode->addChild(butterflynode2);
   butterflynode->addChild(butterflynode3);
   endEditCP(butterflynode, Node::CoreFieldMask | Node::ChildrenFieldMask);

   beginEditCP(butterflynode, Node::VolumeFieldMask);
   DynamicVolume &vol = butterflynode->getVolume(true);
   vol.setEmpty();
   vol.extendBy(Vec3f(-100,-100,-100));
   vol.extendBy(Vec3f(100,100,100));
   vol.setValid(true);
   vol.setStatic(true);
   endEditCP(butterflynode, Node::VolumeFieldMask);"

This works fine on Monitor-Device without distribution, meaning the bounding volume is changed just fine, but fails with distribution with the Cave-Device. I also have some problems to understand how the whole volume stuff works with opensg, especially the getVolume(bool value) method. But since i managed to change the volume without distribution i figure i must have done something right. My only guess is, that i forgot some FieldMaks or begin/edit Tags. Any quick suggestions on how i can get the volume-change to work with distribution would be very much welcome, since i have a Presentation on Friday, for which i want this to work.

Thanks in advance for any suggestions.

            Christian Froehlich


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to