[vtkusers] EyePosition / EyeTransform, GPU Volume Rendering, and Off-Axis Projection

Krzysztof Kamieniecki krys at kamieniecki.com
Fri Jul 6 13:54:20 EDT 2012


Hi Aashish,

I would like to try to take a stab at it.

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)

from vtkRenderer::ResetCameraClippingRange
...
  if(!this->ActiveCamera->GetUseOffAxisProjection())
    {
    this->ActiveCamera->GetViewPlaneNormal(vn);
    this->ActiveCamera->GetPosition(position);
    this->ExpandBounds(bounds,
this->ActiveCamera->GetModelTransformMatrix());
    }
  else
    {
    this->ActiveCamera->GetEyePosition(position);
    this->ActiveCamera->GetEyePlaneNormal(vn);
    this->ExpandBounds(bounds,
this->ActiveCamera->GetModelViewTransformMatrix());
    }
...

My current understanding is that the OffAxisProjection perspective
transformation matrix is being used by the GPU Renderer to setup to outer
polygons.

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?

What is the desired functionality of EyeTransform? WorldToEye, EyeToWorld,
CameraToEye, EyeToCamera?

Best Regards,
Krys

On Fri, Jul 6, 2012 at 1:41 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:

> Hi Krzysztof,
>
> On Fri, Jul 6, 2012 at 1:12 PM, Krzysztof Kamieniecki
> <krys at kamieniecki.com> wrote:
> > Hi,
> >
> > How is the EyePosition and EyeTransform functionality supposed to behave,
> > should the positions be in CameraSpace or WorldSpace?
> >
> > Should they be syncronized with EyeSeparation / LeftEye when in Off-Axis
> > Projection mode?
>
> >
> > I am trying to get the GPU Volume renderer to work with Stereo 3D in
> > Off-Axis projection mode, one problem seems to be that the Camera
> position
> > is used instead of the Eye position.
>
> This is a known problem and based on my prior discussions with volume
> rendering experts here at Kitware, I believe that this needs to be
> fixed on the volume rendering side of things.
> If you want to make it work by yourself then we could provide you
> guidance for this task.
>
> Thanks,
>
>
>
> >
> > Thanks,
> > Krys
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120706/3c62e0fe/attachment.htm>


More information about the vtkusers mailing list