mlavik1/UnityVolumeRendering

Volume rendering inside out on Hololens 2

slowizzm opened this issue · 7 comments

In the normal game view the 3D volume looks accurate, but when I view from the Hololens 2 (I have not tested any other AR/VR HMD's) the 3D volume looks as though it is inside out, projecting onto the inner walls of the cube mesh. I have tried tweaking the properties in the shader, but have had no luck. Hoping you may be able to track down a quick fix. Thank you.

vahpy commented

Hi @slowizzm

I use this package for developing Hololens 2 apps as well, but haven't noticed this issue. The only difference with normal game view is the rendering for one eye addressed in #54 . If you could share a photo of what you see through the hololens would be helpful.

After dealing with issue #54, I'm in the same problem. The information seems to only come from the wall of the cube. However, the photo from main camera seems to be totally fine.
20220421_151802_HoloLens
This is the figure taken from main camera, it seems to be normal. However, the view from the screen is in problem.

Change the stereo render mode to multi pass and the problem would be solved.

Hi, all is ok in my scene , but when I build for my desktop windows , when I run the executable in Vr it works in my oculus Quest 2 but its lagging , the movment of the headset is not fluent and black edges from boths sides of my headseat appears , all the movment of the scene are lagged , is it a frame rate problem or frequency ? , when I Increase the frequency of the headset in oculus app , the executable of the volume rendering scene stand on starting and dont work , it displays only Made with Unity and stay blocked , please could you help me , I need help please

Hi @yas51 ,
So if I understand you correctly you're not building for Oculus standalone, but you're running it through Windows, right? And you do have a fairly good GPU?

For me it has worked quite well in VR (with WIndows + NVIDIA RTX A2000), at least as long as I disable lighting and turn on the "early ray termination" setting - however Oculus 2 standalone can be a challenge.
You could try some of the suggestions in this thread: #222

  • Downscale the dataset (if texture fetch is the bottleneck)
  • Enable early ray termination
  • Disable lighting
  • Disable cubic interpolation
  • Adjust MAX_NUM_STEPS in the shader
  • Adjust UnityEngine.XR.XRSettings.renderScale (will likely look bad though)

Also, if you can switch to HDRP you could try using DLSL: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/deep-learning-super-sampling-in-hdrp.html
Since the performance will often be directly proportional to the render resolution when volume rendering, this could help a lot.
(that will probably not be available in standalone Oculus builds though)

@slowizzm @vahpy hello, I am using hololens 2, too. but when i open a nifti file, it looks like this on hololens:
image

But it works on a xiaomi android phone:
image

Please help me.