Advertisement Jump to content
Sign in to follow this  

Volume rendering uing 3D texture as intermediate storage

This topic is 1203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, all


I've read a couple of presentations on volume rendering. (Frostbite volume rendering, AC4 volume fog), They are using 3D texture as intermediate storage that is later used for ray marching (so that you can raymarch once for multiple volume entities).  However, you need to 'voxelize' the volume entities into this intermediate 3D storage ... can anyone explain how to achieve this? 


i think since the target rt is 3D texture, we need to render the volume entities into each depth slice of 3D texture with adjusted near/far plane ... but not sure.


thanks in advance.

Share this post

Link to post
Share on other sites

There are multiple ways how to 'voxelize' your data into a 3D texture.


Everything is based upon what your data are. In general, most common cases are:

  • Point cloud

The point cloud is quite a bit tricky - everything goes down to a question, what your points represent? If they represent fully opaque point in space, then you might consider the naive algorithm - divide part of space into voxels, if there is one or more points in this voxel, set it to opaque, otherwise it is clear (empty voxel). Color can be 'average' color for all the points in given voxel volume.


Of course more complex algorithm can be used when you are treating for example fox, or semi-transparent surfaces in general - which is where the fun begins (using some crazy functions to describe the opacity of your voxel, etc.).

  • Triangular geometry

Now, one of the common approaches is to render slice-by-slice using conservative rasterization (this way a triangle generates voxels in such way that there is no hole in the result). You can rasterize with color of course.


Another approach is casting rays from left side of voxel cube (from the center of each voxel on that side), and writing those voxels that are inside a geometry object as opaque (of course this way you can also assign color).


Also an approach where you generate point cloud from your geometry and perform point-cloud based voxelization might be viable (triangular data is far too complex - this can be one of the cases).


And of course, many others...

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!