- Home /
Multithreaded rendering of large volumes using texture3d.apply()
We are building 3D volumes of large stacks of 2D images and using Texture3D to render them as a volume in VR. Our images are typically 512x512 and we have many stacks sometimes of many hundreds of images long, which can be GB of data. We can load them in the CPU, but when we use .Apply(), it hangs unity for sometimes 3-10 seconds. I know it's not recommended to do this, but we need to use texture3Ds unless there is a suitable alternative that has the same effect. We have tried breaking them up into seperate volumes (3-14 seperate volumes) and it does reduce the lengths of the hangs individually, it makes the frame rate unacceptably low.
As we understand it, Texture3D.Apply() takes the images loaded into the CPU, and pumps them into the GPU to render them, but the time it takes to send it to the GPU is far longer than a frame period and obviously the function is unable to be multithreaded because it's unity.
We need to use volumes and we need it to not freeze the program.
What are our options?
I guess either buying the Unity source code, or using a different game engine, unless some guru passes by and says otherwise.
I've searched a lot to get something about this topic.
just found this one here:
https://forum.unity.com/threads/asynchronous-texture-upload-and-downloadhandlertexture.562303/
the one thing I can think of is loading the 3DTexture to VRA$$anonymous$$ outside of unity and then pass it the native texture pointer, but I don't know if that can be done and how to do it, it just makes sense to me
Hi! thanks for the response! do you know much about buying the unity source code? would we get access to the classes and functions that contain the texture3D methods? I'm bumping that thread and im going to look into passing the native texture pointer into unity somehow.
Your answer
Follow this Question
Related Questions
Volume absorption area 1 Answer
Strange Rendering Error: White Fog? 0 Answers
Excluding UI sprites from QualitySettings.masterTextureLimit 1 Answer
GLES3 Error: Post Processing 0 Answers