Hi,

I'm currently trying to figure out something and hopefully one of you can help 
me to get the issue here. So I have  two Views which I'm adding to a 
compviewer. My scene consists of several geodes and also includes a volume, we 
are working with a custom volume rendering here at my workplace. I also have 
four additional cameras which are running with the second cameras ViewMatrix as 
ray starting and ending cameras for the volume rendering. These cameras are 
updated continously with the ViewMatrix of the second views camera, as it is 
intended to render the volume only on the second view. Therefore, i cull the 
volume group on the first camera, respectively on the first view. Additionally, 
i'm doing some intersection. 

My Problem is, that my intersector is getting things messed up. Im using 


Code:
if (mFirstView->computeIntersections(screenPosX,screenPosY,intersections,mask))



to compute the intersections but it seems like the second cameras ViewMatrix is 
mixed up with the first camera's ViewMatrix somehow resulting in false 
positioned intersection results. The screen positions I'm picking are correct 
and triggered only on my first view. I have already figured out that everything 
runs fine when I'm updating the four cameras for the ray starting and ending 
positions (left and right eye), which are used for the volume rendering, with 
the first views camera's matrix. 

Therefore, i could just update the matrices just before the intersection part 
is done, but i would really like to know why my intersector is using matrices 
from cameras which I am not using for intersections computation. I might be 
missing here some of the basics on that topic.

I also attached a snapshot of my SceneGraph's first part. As you can see, six 
cameras are included there, four of them are used as the ray starting and 
ending cameras and two cameras are the camera's of view 1 and view 2. I was 
already wondering if the IntersectionVisitor might be the culprit here. I'm 
using: 


Code:
osgUtil::IntersectionVisitor intersectionVisitor(pLineSegmentIntersector);
mFirstCamera->accept(intersectionVisitor);



to set the Visitor for the the camera of the first view. Is it possible that my 
four cameras for the volume are  also accepting the same IntersectionVisitor? 
I'm attaching them to the MainTransformationNode as children. I have also tried 
to specify the camera for the Intersections with:


Code:
if 
(mFirstView->computeIntersections(mFirstCamera),cf,screenPosX,screenPosY,intersections,DIRECT_VOLUME_RENDERING_MASK))




but the result remains the same. Hopefully someone got my issue here and can 
help me out with some ideas on that.

... 

Thank you!

Cheers,
Danyel

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




Attachments: 
http://forum.openscenegraph.org//files/scenegraph_119.png


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to