-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hololens2 performance issues #222
Comments
Hi @iamx1212 ! I don't have a Hololens device myself, but I know there have been other users using this plugin with Hololens, so I believe it should be possible to get acceptable performance. First of all: Is this a publically available dataset that you can share with me? If not, could you check how large the dimension of the dataset is? If it's very large, you could consider: That should reduce the graphics memory usage (and memory bandwidth usage), and probably improve performance. Also, you might want to check the appearance settings on the VolumeRenderedObject:
|
I have been trying to solve the lag problem recently, but it hasn't had a particularly good effect. |
Just a thought: Is the performance problem bad in all render modes? (Direct volume rendering vs isosurface rendering)? Maybe not so much in Maximum Intensity Projection mode? I saw that Hololens 2 uses a resolution of 2880x1406, which might make volume rendering a bit tricky - considering its GPU. You could try change the resolution, or in Unity: You could also try to change the |
Yes, there will be lag in volume rendering, maximum density, and isosurface drawing at MAX-NUM-STEPS 512. Lowering the MAX-NUM-STEPS value can slightly alleviate this. |
@iamx1212 hmm, if even maximum intensity projection mode is slow, then I'm afraid it's not looking very promising.. Since I don't own a Hololens device it's hard for me to investigate if this is just due to the hardware, or if there are any performance issues, but I think I'm running out of suggestions now... |
Do you have any measures to address the issue of loading rendering on HoloLens? thanks |
@DiangF Hmm, what do you mean with "loading rendering"? Are you running into any issues loading datasets? @iamx1212 I've recently added a new "sampling rate multiplier" setting. If you check out latest from "master" branch you can try it out. I now also do opacity correction, so the only visual different should now be more/less artifacts (the colours don't change like they did before) |
Hi @mlavik1, I use HoloLens2 to display only slice, so changes MAX_NUM_STEPS, disable the DEPTHWRITE_ON and disable cubic interpolation is not helpful for me to improve FPS on HoloLens2, it all for volume rendering. And i have downscale my .dcm from 100 MB to 80MB, it improves FPS a little, but when rendering slice, the FPS will be the same low. You said that use URP will help boost FPS, i change my unity project to URP and change SliceRenderingShader.shader to URP, it successufully run on HoloLens2 but the performance remains the same. Is there any suggestion for improve FPS for only slice rendering? Finally, thank you very much |
Hi @shiauyang , I still don't have a Hololens device available, so I'm unfortunately not able to look into that myself, but I'll try to answer what I can:
Also, what do you mean when you say "rendering slice"? Are you talking about the "Slice renderer" window? I would suspect that one to be really fast, but you may need to disable the VolumeRenderedObject, or at least its' MeshRenderer. |
Thank you for your constructive replied @mlavik1, There are some methods I tried to improve FPS for HoloLens2 APP natively: In my project, after add slice in Slice renderer, there will be new object 'slice plane' under VolumeContainer. I just want to render it without 3D volume, so, yes, I disable MeshRenderer in MeshRenderer. From my experiment, adjusting Sampling rate multiplier didn't change FPS in my HoloLens2, I think is about volume rendering, not slice rendering. Both URP and HDRP work well for HoloLens2, I see your post about performance to do it, thinking about self-define shader at SRP can improve FPS, and the results are same as you think. It can't improve FPS. https://github.com/mlavik1/UnityVolumeRendering/blob/master/Documentation/General/VolumeRendering/ShadowVolumes.md About render scale, I have tried XRSettings.renderScale = 0.5f and 0.1f for both built-in render pipeline and URP, however, the FPS remained unchanged and because the lower resolution, HoloLens cannot render object stably and precisely. Regarding downscaling, both python scripts and 3D slicer can downsample my CT dataset, nonetheless, there will some data miss which is not I want. Hence, I will not use this method despite it can boost FPS. Here's my thought: Batches (drawcall) is pretty slow <10, so I don't think is CPU-bound and vertices is <600 which is acceptable for HoloLens2 GPU, but FPS is about 15, really don't have any ideas. Do you have any suggestion for changing SliceRenderingShader.shader or any idea? Pretty appreciate for your work, time and replied. |
Hello, I used UnityVolumeRendering to load a CT (Dicom) image and deployed it to the Hololens2 real machine. After opening it, it was very stuck. The model can be displayed but when I look at the model, it becomes very slow and stuck. What should I do?
The text was updated successfully, but these errors were encountered: