Archived

This topic is now archived and is closed to further replies.

budipro

Volume Texture

Recommended Posts

Hi all, I want to know what is Volume Texturing for? What are its advantages and disadvantages? I had read on Direct3D documentation that it''s used for patchy fog or explosion. What is patchy fog? And what''s the difference if we use 2d texture for explosion? Thanks a lot.

Share this post


Link to post
Share on other sites
I haven''t seen any use of volume textures in a "traditional" sense of using it for simply displaying a volume up to now. At least not in a especially astonishing looking way.

But you might look up delphi 3D or the NVSDK where volume textures are used to accomplish self-shadowing bump-maps in realtime using volume textures as a lookup-table...

Cheers,
Alex

Share this post


Link to post
Share on other sites
3D textures have many uses. As has been mentioned, they can be used as convenient lookup tables with intra-value interpolation. That way, a complex equation can be precomputed, and quickly looked up in realtime on a perpixel level. From exponentiation over Perlin noise to distance attenuation, all that can be represented by a 3D texture.

3D textures can also be used for volume rendering. The approach is called slicing, and looks very good if properly implemented. Basically, you ''slice'' the 3D texture by a set of planes perpendicular to the view direction, using a blending mode approriate for your usage. This technique allows for volumetric phenomena such as volume fog, atmospheric light beams, godrays, or even entire 3D objects (for example CT scans, as used in medical imaging). Depending on the resolution of the 3D texture and number of planes in the slicing set, the quality can be far better than a traditional triangle mesh approach. Of course, such sets cost a lot of fillrate.

Another advantage of using 3D textures to render volume effects is, that you have the full perpixel 3D position at any point rendered on the slice set. Using appropriate fragment programs, you can use that value to perform additional computations. Such as lighting, shadowing, or even as an input to a procedural noise function. Volume textures are perfect candidates for the visualization of gaseous fluid dynamic solutions, such as twirling fog, mist or smoke.

Here is a shot of a volume light I made some time ago using a 3D texture, combined with the shadow casting I mentioned. It is not a direct implementation of slicing, as it uses a pbuffer as a kind of cache (to avoid per frame updates), but the principle is very similar:

Share this post


Link to post
Share on other sites