I have a patch available (i'm not sure where to send it). I changed vtkCamera and vtkOpenGLGPUVolumeRayCastMapper to produce and expect GetEyePosition() to give the actual eye position in world space. This seems to fix my problem. I think there may still be a clipping issue because of the use of GetEyePlaneNormal in vtkRenderer. I have to fix some of my own code to get more testing done and I would like to hear more about the original intent of EyePosition before making any more changes.<div>
<div><br><div class="gmail_quote">On Fri, Jul 6, 2012 at 1:54 PM, Krzysztof Kamieniecki <span dir="ltr"><<a href="mailto:krys@kamieniecki.com" target="_blank">krys@kamieniecki.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Aashish,<div><br></div><div>I would like to try to take a stab at it.</div><div><br></div><div>Based on the only use of GetEyePosition in VTK it seems like GetEyePosition should return the world space positions. (This expectation also explains the problems I have been seeing with weird clipping)</div>
<div><br></div><div>from vtkRenderer::ResetCameraClippingRange</div><div>...</div><div><div> if(!this->ActiveCamera->GetUseOffAxisProjection())</div><div> {</div><div> this->ActiveCamera->GetViewPlaneNormal(vn);</div>
<div> this->ActiveCamera->GetPosition(position);</div><div> this->ExpandBounds(bounds, this->ActiveCamera->GetModelTransformMatrix());</div><div> }</div><div> else</div><div> {</div><div> this->ActiveCamera->GetEyePosition(position);</div>
<div> this->ActiveCamera->GetEyePlaneNormal(vn);</div><div> this->ExpandBounds(bounds, this->ActiveCamera->GetModelViewTransformMatrix());</div><div> }</div><div>...</div><div><br></div><div>My current understanding is that the OffAxisProjection perspective transformation matrix is being used by the GPU Renderer to setup to outer polygons. </div>
<div><br></div><div>So the main thing to do would be to produce world coordinate Eye Positions and use those instead of the Camera Position in the volume Renderer, so the shaders would get the proper ray directions?</div>
<div><br></div><div>What is the desired functionality of EyeTransform? WorldToEye, EyeToWorld, CameraToEye, EyeToCamera?</div><div><br></div><div>Best Regards,</div><div>Krys</div><div><div class="h5"><div><br></div><div class="gmail_quote">
On Fri, Jul 6, 2012 at 1:41 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Krzysztof,<br>
<div><div><br>
On Fri, Jul 6, 2012 at 1:12 PM, Krzysztof Kamieniecki<br>
<<a href="mailto:krys@kamieniecki.com" target="_blank">krys@kamieniecki.com</a>> wrote:<br>
> Hi,<br>
><br>
> How is the EyePosition and EyeTransform functionality supposed to behave,<br>
> should the positions be in CameraSpace or WorldSpace?<br>
><br>
> Should they be syncronized with EyeSeparation / LeftEye when in Off-Axis<br>
> Projection mode?<br>
<br>
><br>
> I am trying to get the GPU Volume renderer to work with Stereo 3D in<br>
> Off-Axis projection mode, one problem seems to be that the Camera position<br>
> is used instead of the Eye position.<br>
<br>
</div></div>This is a known problem and based on my prior discussions with volume<br>
rendering experts here at Kitware, I believe that this needs to be<br>
fixed on the volume rendering side of things.<br>
If you want to make it work by yourself then we could provide you<br>
guidance for this task.<br>
<br>
Thanks,<br>
<br>
<br>
<br>
><br>
> Thanks,<br>
> Krys<br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
<span><font color="#888888"><br>
<br>
<br>
--<br>
| Aashish Chaudhary<br>
| R&D Engineer<br>
| Kitware Inc.<br>
| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>