mlavik1 / UnityVolumeRendering

Volume rendering, implemented in Unity3D. Want to support the project? Donate a small sum to Save The Children(https://www.savethechildren.net/) or another charity, and send me a message, and I will be greatly motivated!
https://fosstodon.org/@unityvolrend
MIT License
458 stars 127 forks source link

Mobile Performance #265

Open MattOstil opened 2 months ago

MattOstil commented 2 months ago

Hi!

Recently found this asset during some research into rendering DICOM images in Unity for a client project. They essentially have a dataset that they wish to have running on mobile with the basic ability to rotate the model, and slide it from above, which your plugin is more than capable of doing.

However, running a sample dataset on mobile with a simple camera rotation via swiping is quite heavy/laggy. Could you offer any pointers on how we may optimize this?

Currently running on Unity 6, URP using FidelityFX (as I saw you mention it was a possible optimization, which helps a bit) and the volumerenderobject is just the default settings using MIP.

Thank you!

mlavik1 commented 1 month ago

Hi! Sorry for the late reply.

For mobile you'd likely want to:

If that's still not enough then you could consider adjusting the sampling rate multiplier settings on the volume. I noticed that hasn't been documented yet, but you can read about it here: https://github.com/mlavik1/UnityVolumeRendering/releases#sampling-rate-multiplier-setting

image

You can also consider downscaling the dataset if it's large (what is the dimension?). It would be best to do this in a tool like Slicer, but to test you could also enable "show downscale prompt" in the settings window: https://github.com/mlavik1/UnityVolumeRendering/blob/master/Documentation/General/Settings/Settings.md (it will naively divide the dimension by two, and may not look great)