PDA

View Full Version : Is volumetric rendering supported in Opengl?



BigShooter
07-30-2003, 11:07 PM
Is there an extension that will allow OpenGL to render volumetric voxels?
:-)
Thanks,
Luke

kehziah
07-30-2003, 11:23 PM
No. OpenGL is a polygon-based graphics lib.

BigShooter
07-30-2003, 11:33 PM
Hmmm... I use Maya software and recently, in Maya 5.0, they've added Fluids which are based on voxels. Maya preview windows use OpenGL. Yet, the particles/fluids which are volumetric in nature are greatly reproduced for previewing in the viewports... I wonder how they did that. I guess I'll get in touch with one of the programmers and ask them. It does look cool :-)
Thanks,
Luke

kehziah
07-30-2003, 11:36 PM
Sure there are tricks to simulate voxels, but there is no built-in support in OpenGL.

harsman
07-31-2003, 01:14 AM
3d textures are a core OpenGL feature. If you upload your voxel data as a 3d texture and set alpha=0 for empty voxels you can visualize the voxels by drawing a set of overlapping quads (textured with this 3d texture) that enclose the voxel volume and are aligned to the view plane. By setting alpha test you discard fragments which hit empty voxels.

kehziah
07-31-2003, 02:57 AM
Voxel rendering refers to old graphics engines, like in old NovaLogic games (Commanche 3). This paradigm has long been abandoned and replaced by polygons. 3d textures have nothing to do with voxel rendering of an entire scene. The simple fact that you have to slice through them with quads shows that's its merely a trick to display 'volumetric data'.

dorbie
07-31-2003, 03:51 AM
No. That's your narrow definition of voxel rendering. A voxel is a generic term for a 3D sample in a larger array of 3D samples (etymology of volume-pixel I expect), harsman is perfectly correct in what he said. There are many other ways to render volumes in OpenGL, as you say there is no inherent volume primitives but as harsman points out you can use the OpenGL polygons and available OpenGL features like 3D texture to render volumes using OpenGL with hardware acceleration. Each method has strengths and weaknesses and are suited to different applications of volume rendering. If you do google for OpenGL + smoke rendering, cloud rendering, volume rendering or splatting etc. you'll pull up hundreds of related links.