Writing to 3D Volume Texture at Runtime

I actually just saw that UE5 has volume render targets creatable as assets in the right click menu under “Textures” so it’ll probably be possible.

I’ve been thinking of all sorts of ways to store just a single bit in some way and read it back but I’m not sure how easy that actually is since texture data is all read back as floats. Maybe I am actually OK with a 3D grayscale voxel since I can have softer edges more easily.

I’m OK without mipmapping for this, I think. In fact it might end up using more memory if I did have mipmaps.

I also saw Texture 2D array and 2D Array Render Targets which seem similar to volume textures and I can enter depth in addition to width and height.

I currently don’t see functions for drawing to those like I do with render target 2D and “Draw material to render target” Maybe there are some C++ apis though since materials are all about drawing to a 2D surface. Maybe there’s some fancy kernel stuff going on where I can draw a 3D sphere into a voxel.

I have seen pseudo volume textures too which existed before volume textures. I may think about those some more too like you suggested. Or I can hold out a bit longer and see if this support becomes more usable in UE5.

1 Like