Wednesday, January 20, 2010

3D textures and Voxels

One of the more interesting elements of CG are 3d textures, volume textures, or voxels. Outside of medicine, geological studies, and terrain, are there any practical uses for 3d textures? Some games have attempted to use them, particularly the more modern BUILD engines by 3D Realms (And by modern I'm talking about Shadow Warrior, etc :) hehe) for primative 3d objects such as keys and wall switches. While it certainly looked cool at the time, with the advent of 3D models I think using 3d textures for objects fell away pretty quickly.

So to what end can the gaming industry use 3D textures? One significant use is lighting, as demonstrated in Unreal 3 / 3.5 with lighting importance volumes. This volume defines a 3D array of points that help light dynamic objects and characters in open spaces. So where a shadow would be cast from a far away object will still affect the object without the need to cast an enormous shadow map. Definite bonuses here.

Cryengine 3 also has a novel use of 3d textures in the form of in editor concave terrain formation. The editor gives the designers and artists the ability to create terrain formations via painting, similar to z-brush. The benefits are immediately evident in that there is no need to go back and forth between the editor, and 3dsmax to create / test / iterate concave terrain geometry.

So beyond these two major implementations, what other uses could there be? Basically the single biggest use of volume texture is the ability for us to see INSIDE of an object, hence its benefits for medicine and science. A couple of novel ideas spring to mind.
1) x-ray vision without sorting issues
2) thermal vision that doesn't rely on polygon viewing angles for colouring
3) Nifty construction or deconstruction effect. Think TRON :)
4) Nifty teleportation effect, kind of like TRON

Of course these could be considered gimmicks because would people playing Splinter Cell really care if the thermal vision was more accurate or not? And what about x-ray, if in Metroid Prime everything x-ray-able was built from 3D textures would people really know the difference? Maybe, maybe not, but aren't games built on gimmicks and trying new things?

Naturally for best performance these things would need to be controlled to avoid potentially serious performance issues.
1) x-ray visor where only objects within a limited field of view and distance are actually x-rayed and displayed as 3D textures.
2) With thermal vision, smaller cylindrical and ellipsoid 3D textures bound to major body parts create the illusion of animation.
3) A 3D object is posed then "digitized" into a lower resolution alanogue, then pixel by pixel removed from the world.
4) Similar to point #3, but quicker and in reverse.

In part 2, I will detail some ideas I have about creating 3D textures from modern 3D models.

No comments:

Post a Comment