Distortions in Volumerendering in VR-Mode (HTC Vive)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Distortions in Volumerendering in VR-Mode (HTC Vive)

Sebastian Heerwald

Hello VTK team and users,

I've been working with the latest trunk of VTK (7.1 rc2) and wanted to use the OpenVR Framework (with HTC Vive).
This works great except for the volume rendering. Currently there is a view depended 
distortion within the volume rendering. 
If I look onto the volume rendering and move around it, there appear "refraction" lines.
In front of this line the dataset is rendered correctly, and behind this line too. But onto 
that line the dataset gets distorted into another "orientation". So we have one 
orientation on the one side of the line and antoher orientation on the other side.
This is bad because the eye cameras look from different positions onto this volume 
rendering and because this is view dependend we get non-matching stereo output.


I've tried to track this down and I've seen, that the shader code for the GPURaycaster 
is independed from using standard rendering, stereo-anaglyph rendering and VR rendering.
So it seems, that some transformations for this shader aren't set correctly.
But I couldn't figure out which one. 

The one thing I could figure out is, that the ray which is used for raycasting, doesn't go
into the right direction. If I assume a bounding box around the dataset which is used for 
volume rendering, the refraction lines seem to go along the edges of the bounding box cube.

So I think there is a wrong transformation in this context. But currently I couldn't find
any mistake there. 

I've tested everything with different volume data but it was always the same.

My question is:
Did anyone experience these issues? Has someone a fix for that or knows how to find a solution?

Best Regards
Sebastian



_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

polybos
Sebastian Heerwald wrote
If I look onto the volume rendering and move around it, there appear "refraction" lines.
Unfortunately I cannot help with this issue but I would also be very pleased if someone could help here. Or did you, Sebastian, already achieve some more insights into this problem?
I also get such distortions on the HTC Vive when using vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I understand Sebastian just test with a HTC Vive. At least I can only test with a HTC Vive.
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

Alvaro Sanchez
Hi,

I have never tested the GPUVolumeRCMapper with OpenVR but as far as I remember Ken mentioned some time ago that he encountered a clipping/bbox related issue when adjusting the volume's orientation and position. Could you try rendering a volume with an identity matrix set as its transformation?,  this might give you a hint of what the mapper is doing wrong.

Cheers,
Alvaro

On Wed, Dec 7, 2016 at 11:38 AM, polybos <[hidden email]> wrote:
Sebastian Heerwald wrote
> If I look onto the volume rendering and move around it, there appear
> "refraction" lines.

Unfortunately I cannot help with this issue but I would also be very pleased
if someone could help here. Or did you, Sebastian, already achieve some more
insights into this problem?
I also get such distortions on the HTC Vive when using
vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only
rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I
understand Sebastian just test with a HTC Vive. At least I can only test
with a HTC Vive.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741338p5741457.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

Sebastian Heerwald

Hey,


Thank you for your reply.

I have build a little program which only loads a volume dataset and displays it within the RenderWindow.

Since the OpenVR interface is a little bit hackish within VTK the only thing that decides whether it renders for OpenVR or for normal 2D-Display is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not.

Everything code related is the same.


So to reply to your Question:

> Could you try rendering a volume with an identity matrix set as its transformation?


I've build this simple program and it only places a volume dataset within the world without any transformation. The volume is directly given to the GPUVolumeRCMapper without any transformation. In "2D"-Renderwindow everything is fine. Also in anaglyph rendering I get a nice 3D View.

But when I link against OpenVR module the view dependend distortions appear within VR. I've tried some things. 

All I can say is, that the errors appear if I look at any edge or corner of the surrounding (invisible) boundingbox around the rendered volume. If I look directly on one side of the boundingbox everything seems fine. 


The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper gets wrong view directions for the eyes. But the vtkOpenVRCamera objects seems to do everything right.


I don't know how to adjust the clipping box / bounding box you mentioned. Can you explain how I can do this, maybe this helps me to debug further?


Sincerely,

Sebastian



Von: vtkusers <[hidden email]> im Auftrag von Alvaro Sanchez <[hidden email]>
Gesendet: Mittwoch, 7. Dezember 2016 18:14
An: polybos
Cc: VTK Users
Betreff: Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive)
 
Hi,

I have never tested the GPUVolumeRCMapper with OpenVR but as far as I remember Ken mentioned some time ago that he encountered a clipping/bbox related issue when adjusting the volume's orientation and position. Could you try rendering a volume with an identity matrix set as its transformation?,  this might give you a hint of what the mapper is doing wrong.

Cheers,
Alvaro

On Wed, Dec 7, 2016 at 11:38 AM, polybos <[hidden email]> wrote:
Sebastian Heerwald wrote
> If I look onto the volume rendering and move around it, there appear
> "refraction" lines.

Unfortunately I cannot help with this issue but I would also be very pleased
if someone could help here. Or did you, Sebastian, already achieve some more
insights into this problem?
I also get such distortions on the HTC Vive when using
vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only
rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I
understand Sebastian just test with a HTC Vive. At least I can only test
with a HTC Vive.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741338p5741457.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

Ken Martin
Not exactly related to this, but I did find a bug in our OpenVR code that I will be pushing to a topic soon. It also includes some other performance tweaks. The bug can have a big impact on performance as it could cause the VR display to wait for the screen display vsync. I'll be pushing the fix for the 7.1.1 release as well.

On Thu, Dec 8, 2016 at 8:40 AM, Sebastian Heerwald <[hidden email]> wrote:

Hey,


Thank you for your reply.

I have build a little program which only loads a volume dataset and displays it within the RenderWindow.

Since the OpenVR interface is a little bit hackish within VTK the only thing that decides whether it renders for OpenVR or for normal 2D-Display is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not.

Everything code related is the same.


So to reply to your Question:

> Could you try rendering a volume with an identity matrix set as its transformation?


I've build this simple program and it only places a volume dataset within the world without any transformation. The volume is directly given to the GPUVolumeRCMapper without any transformation. In "2D"-Renderwindow everything is fine. Also in anaglyph rendering I get a nice 3D View.

But when I link against OpenVR module the view dependend distortions appear within VR. I've tried some things. 

All I can say is, that the errors appear if I look at any edge or corner of the surrounding (invisible) boundingbox around the rendered volume. If I look directly on one side of the boundingbox everything seems fine. 


The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper gets wrong view directions for the eyes. But the vtkOpenVRCamera objects seems to do everything right.


I don't know how to adjust the clipping box / bounding box you mentioned. Can you explain how I can do this, maybe this helps me to debug further?


Sincerely,

Sebastian



Von: vtkusers <[hidden email]> im Auftrag von Alvaro Sanchez <[hidden email]>
Gesendet: Mittwoch, 7. Dezember 2016 18:14
An: polybos
Cc: VTK Users
Betreff: Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive)
 
Hi,

I have never tested the GPUVolumeRCMapper with OpenVR but as far as I remember Ken mentioned some time ago that he encountered a clipping/bbox related issue when adjusting the volume's orientation and position. Could you try rendering a volume with an identity matrix set as its transformation?,  this might give you a hint of what the mapper is doing wrong.

Cheers,
Alvaro

On Wed, Dec 7, 2016 at 11:38 AM, polybos <[hidden email]> wrote:
Sebastian Heerwald wrote
> If I look onto the volume rendering and move around it, there appear
> "refraction" lines.

Unfortunately I cannot help with this issue but I would also be very pleased
if someone could help here. Or did you, Sebastian, already achieve some more
insights into this problem?
I also get such distortions on the HTC Vive when using
vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only
rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I
understand Sebastian just test with a HTC Vive. At least I can only test
with a HTC Vive.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741338p5741457.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:518-881-4901" value="+15188814901" target="_blank">518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

Ken Martin
In reply to this post by Sebastian Heerwald

Since the OpenVR interface is a little bit hackish within VTK the only thing that decides whether it renders for OpenVR or for normal 2D-Display is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not.



Ohh, actually that is a CMake option. If you turn VTK_OPENVR_OBJECT_FACTORY off then the normal rendering is the default and you can explicitly create OpenVR objects when/where you want them. Just make sure you create these 4 objects as the default factory will not create the OpenVR versions

vtkOpenVRRenderWindow
vtkOpenVRRenderer
ren->SetActiveCamera(a vtkOpenVRCamera)
renWin->SetInteractor(a vtkOpenVRRenderWindowInteractor);

and when using OpenVR you need to start the OpenVR interactor otherwise it will not work. That is what I do for ParaView right now to support both on screen and VR in the same executable.
 

Everything code related is the same.


So to reply to your Question:

> Could you try rendering a volume with an identity matrix set as its transformation?


I've build this simple program and it only places a volume dataset within the world without any transformation. The volume is directly given to the GPUVolumeRCMapper without any transformation. In "2D"-Renderwindow everything is fine. Also in anaglyph rendering I get a nice 3D View.

But when I link against OpenVR module the view dependend distortions appear within VR. I've tried some things. 

All I can say is, that the errors appear if I look at any edge or corner of the surrounding (invisible) boundingbox around the rendered volume. If I look directly on one side of the boundingbox everything seems fine. 


The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper gets wrong view directions for the eyes. But the vtkOpenVRCamera objects seems to do everything right.


I don't know how to adjust the clipping box / bounding box you mentioned. Can you explain how I can do this, maybe this helps me to debug further?


Sincerely,

Sebastian



Von: vtkusers <[hidden email]> im Auftrag von Alvaro Sanchez <[hidden email]>
Gesendet: Mittwoch, 7. Dezember 2016 18:14
An: polybos
Cc: VTK Users
Betreff: Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive)
 
Hi,

I have never tested the GPUVolumeRCMapper with OpenVR but as far as I remember Ken mentioned some time ago that he encountered a clipping/bbox related issue when adjusting the volume's orientation and position. Could you try rendering a volume with an identity matrix set as its transformation?,  this might give you a hint of what the mapper is doing wrong.

Cheers,
Alvaro

On Wed, Dec 7, 2016 at 11:38 AM, polybos <[hidden email]> wrote:
Sebastian Heerwald wrote
> If I look onto the volume rendering and move around it, there appear
> "refraction" lines.

Unfortunately I cannot help with this issue but I would also be very pleased
if someone could help here. Or did you, Sebastian, already achieve some more
insights into this problem?
I also get such distortions on the HTC Vive when using
vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only
rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I
understand Sebastian just test with a HTC Vive. At least I can only test
with a HTC Vive.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741338p5741457.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:518-881-4901" value="+15188814901" target="_blank">518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

Ken Martin
In reply to this post by Sebastian Heerwald
I'm working on a Volume Rendering VR example right now so I'll see if I bump into the same issue.

On Thu, Dec 8, 2016 at 8:40 AM, Sebastian Heerwald <[hidden email]> wrote:

Hey,


Thank you for your reply.

I have build a little program which only loads a volume dataset and displays it within the RenderWindow.

Since the OpenVR interface is a little bit hackish within VTK the only thing that decides whether it renders for OpenVR or for normal 2D-Display is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not.

Everything code related is the same.


So to reply to your Question:

> Could you try rendering a volume with an identity matrix set as its transformation?


I've build this simple program and it only places a volume dataset within the world without any transformation. The volume is directly given to the GPUVolumeRCMapper without any transformation. In "2D"-Renderwindow everything is fine. Also in anaglyph rendering I get a nice 3D View.

But when I link against OpenVR module the view dependend distortions appear within VR. I've tried some things. 

All I can say is, that the errors appear if I look at any edge or corner of the surrounding (invisible) boundingbox around the rendered volume. If I look directly on one side of the boundingbox everything seems fine. 


The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper gets wrong view directions for the eyes. But the vtkOpenVRCamera objects seems to do everything right.


I don't know how to adjust the clipping box / bounding box you mentioned. Can you explain how I can do this, maybe this helps me to debug further?


Sincerely,

Sebastian



Von: vtkusers <[hidden email]> im Auftrag von Alvaro Sanchez <[hidden email]>
Gesendet: Mittwoch, 7. Dezember 2016 18:14
An: polybos
Cc: VTK Users
Betreff: Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive)
 
Hi,

I have never tested the GPUVolumeRCMapper with OpenVR but as far as I remember Ken mentioned some time ago that he encountered a clipping/bbox related issue when adjusting the volume's orientation and position. Could you try rendering a volume with an identity matrix set as its transformation?,  this might give you a hint of what the mapper is doing wrong.

Cheers,
Alvaro

On Wed, Dec 7, 2016 at 11:38 AM, polybos <[hidden email]> wrote:
Sebastian Heerwald wrote
> If I look onto the volume rendering and move around it, there appear
> "refraction" lines.

Unfortunately I cannot help with this issue but I would also be very pleased
if someone could help here. Or did you, Sebastian, already achieve some more
insights into this problem?
I also get such distortions on the HTC Vive when using
vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only
rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I
understand Sebastian just test with a HTC Vive. At least I can only test
with a HTC Vive.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741338p5741457.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:(518)%20881-4901" value="+15188814901" target="_blank">518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Distortions in Volumerendering in VR-Mode (HTC Vive)

Alvaro Sanchez
I merged a branch that should fix some of the clipping/flickering issues with volume rendering.



On Tue, Jan 10, 2017 at 1:31 PM, Ken Martin <[hidden email]> wrote:
I'm working on a Volume Rendering VR example right now so I'll see if I bump into the same issue.

On Thu, Dec 8, 2016 at 8:40 AM, Sebastian Heerwald <[hidden email]> wrote:

Hey,


Thank you for your reply.

I have build a little program which only loads a volume dataset and displays it within the RenderWindow.

Since the OpenVR interface is a little bit hackish within VTK the only thing that decides whether it renders for OpenVR or for normal 2D-Display is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not.

Everything code related is the same.


So to reply to your Question:

> Could you try rendering a volume with an identity matrix set as its transformation?


I've build this simple program and it only places a volume dataset within the world without any transformation. The volume is directly given to the GPUVolumeRCMapper without any transformation. In "2D"-Renderwindow everything is fine. Also in anaglyph rendering I get a nice 3D View.

But when I link against OpenVR module the view dependend distortions appear within VR. I've tried some things. 

All I can say is, that the errors appear if I look at any edge or corner of the surrounding (invisible) boundingbox around the rendered volume. If I look directly on one side of the boundingbox everything seems fine. 


The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper gets wrong view directions for the eyes. But the vtkOpenVRCamera objects seems to do everything right.


I don't know how to adjust the clipping box / bounding box you mentioned. Can you explain how I can do this, maybe this helps me to debug further?


Sincerely,

Sebastian



Von: vtkusers <[hidden email]> im Auftrag von Alvaro Sanchez <[hidden email]>
Gesendet: Mittwoch, 7. Dezember 2016 18:14
An: polybos
Cc: VTK Users
Betreff: Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive)
 
Hi,

I have never tested the GPUVolumeRCMapper with OpenVR but as far as I remember Ken mentioned some time ago that he encountered a clipping/bbox related issue when adjusting the volume's orientation and position. Could you try rendering a volume with an identity matrix set as its transformation?,  this might give you a hint of what the mapper is doing wrong.

Cheers,
Alvaro

On Wed, Dec 7, 2016 at 11:38 AM, polybos <[hidden email]> wrote:
Sebastian Heerwald wrote
> If I look onto the volume rendering and move around it, there appear
> "refraction" lines.

Unfortunately I cannot help with this issue but I would also be very pleased
if someone could help here. Or did you, Sebastian, already achieve some more
insights into this problem?
I also get such distortions on the HTC Vive when using
vtkVolumeRayCastMapper, while everything seems perfectly well in a mesh-only
rendering.

Does anyone have similar issues? Maybe with Occulus Rift? As far as I
understand Sebastian just test with a HTC Vive. At least I can only test
with a HTC Vive.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741338p5741457.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:(518)%20881-4901" value="+15188814901" target="_blank">518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
<a href="tel:(518)%20371-3971" value="+15183713971" target="_blank">518 371 3971

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers