Page 1 of 1

Volumetric textures

Posted: Wed Apr 11, 2007 4:55 pm
by Legion
Hello.

Im currently working on adding volumetric texture support into irrlicht.
I'll try to get it accepted into the engine when it's completed.
Biggest issue is design, all texture & image handling in irrlicht is 2d centered.
The quick way is to add methods such as s32 getDepth(), as it wouldn't really
break anything.
Although dimension3d<s32> getSize() and similar feels right, but would
break virtually every application fiddling with textures.

Main ideas are,
addTexture(size, depth, ....) into IVideoDriver.
(or introducing dimension3d as a type, skipping depth parameter)
A new vertextype allowing 3d texturecoordinates.
Currently working on direct3d9 driver, mostly it's just making it aware of depth.

Comments and suggestions are welcome.

Posted: Wed Apr 11, 2007 5:07 pm
by Luben
I'm kindof having a hard time visualizing how a 3d texture is splatted on a triangel. Could you explain how and for what it is used?

Posted: Wed Apr 11, 2007 5:31 pm
by Legion
Alot of uses are possible.
For example,
volumetric fog, more realistic explosions based on procedural noise.
All in all they're quite handy :-)

Posted: Wed Apr 11, 2007 8:08 pm
by Klasker
But how do you render 3D textures? And won't they take enormous amounts of video memory?

Posted: Wed Apr 11, 2007 8:57 pm
by Spintz
I've already implemented 3D textures( and Cube textures ) in IRRspintz. 3D Volume Textures work great for volumetric noise calculations, where you only need an 8 byte value for noise computations. They have many other uses, such as for doing texture animations. Instead of having say 16, 256x256 textures in separate files. You can have a single texture/file with 256x256x16 dimensions. DDS support is really important for Volume/3D and Cubemap textures, as it's the only texture format I'm aware of that supports them.

IRRspintz has some nice examples pulled from ATI RenderMonkey that show volume noise lookups in action - Fireball, Lightning and Explosion. You can get IRRspintz via SVN, details on my website, or if you'd like I can provide some videos/pre-built executables.

Granted, I don't support Linux anymore, but the implementations are there for OpenGL and DirectX, so porting that over to Irrlicht would give you the functionality on Linux.

Posted: Wed Apr 11, 2007 9:07 pm
by Luben
I'm sure this has been asked alot already, but why did you decide to branch off irrlicht?

Posted: Thu Apr 12, 2007 1:17 am
by Spintz
There's many posts, and one in particular, about that topic. Just search around for posts by me and you'll find it.

Posted: Thu Apr 12, 2007 1:31 am
by Spintz
Anyways, here's some videos of the demos that come with IRRspintz, that re-create some ATI Render Monkey examples that used Volume Textures -

http://irrlicht.spintz.com/movies/irrsp ... n_demo.wmv
http://irrlicht.spintz.com/movies/irrsp ... l_demo.wmv
http://irrlicht.spintz.com/movies/irrsp ... g_demo.wmv

Posted: Thu Apr 12, 2007 3:25 pm
by Luben
Posts: 1571
That's a lot of things looking trough to find one post. You wouldn't happen to remember what the topic of the thread was about? It'd make my searching a lot easier.
Sorry for being lazy :)

Posted: Thu Apr 12, 2007 4:45 pm
by Spintz