I've been watching T3D's development since release 3.5 and I finally decided to contribute.
This is kind of a continuation of the discussion on page 3 of this thread: http://forums.torque3d.org/viewtopic.php?f=12&t=378
I figured I'd give the topic its own thread.
So long story short, I created volumetric clouds in T3D! (not really)
I had the idea to stack cloudLayer objects in the world editor to achieve a "volumetric" cloud effect. It worked.
(These images were created with no new code, just in the level editor)
After testing my theory, I started coding a new sceneobject. The new sceneobject started with the cloudLayer code as a base, then heavily modified. I added new functions to stack layers of cloud textures, add space between them, modulate the exposure of the layers to create depth, and modulate the shape of the volume. The shader code remains unchanged so far.
I ran into a problem though. The volumes aren't being shaded correctly. This image shows what I mean:
Compared to the image above, this one looks very different even though it's largely the same thing.
This image shows a custom texture being used which I made to exaggerate the incorrect shading. The dark layers are supposed to be rendering before the lighter layers, but they aren't. I haven't modified the shader yet or any of the code that calculates normals, but it looks like a problem with the normals facing the wrong way. Even after trying to invert normals here and there, nothing seems to fix it.
I'd really like to get past this bug so that I can add more features, finish up the code, and possibly put it on github for the next release. If anyone wants to help out or has any idea on what could be causing the bug, let me know. In the mean time, I can answer any questions. Thanks!