Torque volumes?
by David Hinson · in Torque Game Engine · 03/26/2005 (1:05 pm) · 2 replies
Unreal editor and engine support volumes that can be placed on the map and configured with different properties such as ambient light and gravity and friction constants. Does Torque support this? I want among other things to be able to read which volume a player is in and place volume-specific fog.
#2
Now, stock Torque does not feature volume rendering (the closest thing is the buggy fog layers).
Local ambient lighting is probably easy to setup (it might be even easier if you have the Lighting Pack installed, since it adds support for enhanced ambient lighting calculation, and custom ambient lighting settings), but you'll need a little work to get volumetric fog to work.
The Unreal engines used a very clever software-based volumetric fog system. They had a highly tesselated quad layered on top of the game viewport, and for each vertex they cast a ray on the world. If the ray hit a fog volume, I think it would cast another two rays from the contact point in the same direction.
The first ray would be filtered against the same fog volume only, and it would find how thick the fog is at that point, compared to the fog's max radius. The second ray would check how far into the fog any other geometry is. The result, clamped to the fog intensity at that point, is used as the alpha value for that quad vertex. Then it would repeat the process for all other quad vertices.
The triangle color interpolation would take care of smoothing the result.
Nowadays, you can do that per pixel using ps 1.1 and some clever usage of the z-buffer.
03/28/2005 (5:09 am)
David, if all you want is modify gravity settings or apply forces in certain areas, look into Physical Zones. They allow you to apply a force on everything inside them. You can do jump pads, or fans that push players away with them.Now, stock Torque does not feature volume rendering (the closest thing is the buggy fog layers).
Local ambient lighting is probably easy to setup (it might be even easier if you have the Lighting Pack installed, since it adds support for enhanced ambient lighting calculation, and custom ambient lighting settings), but you'll need a little work to get volumetric fog to work.
The Unreal engines used a very clever software-based volumetric fog system. They had a highly tesselated quad layered on top of the game viewport, and for each vertex they cast a ray on the world. If the ray hit a fog volume, I think it would cast another two rays from the contact point in the same direction.
The first ray would be filtered against the same fog volume only, and it would find how thick the fog is at that point, compared to the fog's max radius. The second ray would check how far into the fog any other geometry is. The result, clamped to the fog intensity at that point, is used as the alpha value for that quad vertex. Then it would repeat the process for all other quad vertices.
The triangle color interpolation would take care of smoothing the result.
Nowadays, you can do that per pixel using ps 1.1 and some clever usage of the z-buffer.
Torque 3D Owner Pat Wilson