Your thoughts on and comments to Volume Rendering in Unreal Engine 4.

A volume texture is just a 3d texture instead of a 2d texture. There is actually hardware support for 3d textures but it is not exposed to the content browser in UE4, only via code currently.

You can easily make a volume texture out of 2d textures though using a flipbook approach. here an an example where I took a 2048x2048 texture and divided it into 12x12 frames meaning the 3d texture is resolution ~170px on the XY dimension and 144px on the Z dimension. This texture was made inside of UE4 and it should be easy to convert any data format into a volume texture. I wish there were more of an industry standard for them.

Its literally the same as a flipbook, and you sample by saying the ‘Frame’ is the local Z position in 0-1 space. Note that technically you don’t need to make these power of two sized, so really I should have made it so the sides are equal in X,Y and Z. say by doing a 1728x1728 texture that is 12x12 frames. That would be equal 144 pixel resolution in all axes. The reason I used power of two is that I was trying to make these also support mips which I also got working up to about 3 mips but that is another topic since most volume renderers don’t use mips.

Ray marched, it looks like this:

You can move it all around and even go inside of it and it still looks like a true volume:

2 Likes