Game Development Community

Lights on water

by Martin Masek · in Torque 3D Professional · 04/06/2010 (5:55 pm) · 2 replies

So it seems the Torque 3D lights do not affect the water block or plane:

Black skybox with no sun and one spotlight:
https://staff.scss.ecu.edu.au/~mmasek/spot/spot1.jpg
Turning up the intensity on the spot to highlight the problem:
https://staff.scss.ecu.edu.au/~mmasek/spot/spot2.jpg
Just posting here in case someone has found a fix, or if someone has the same problem and wants to use the fix I came up with. The game i'm working on will have search lights looking for the player (who is a submarine).

My 'dodgy' fix idea is to have an oval object, sitting just under the water - hooked up to an AI that follows 'patrol' waypoints and chases the player once it colides with them. This is what it looks like:
https://staff.scss.ecu.edu.au/~mmasek/spot/spot3.jpg
Any better ideas?

Cheers,

Martin.

About the author

Recent Threads


#1
04/10/2010 (10:37 am)
Deferred lighting and shadowing on the translucent water surfaces is not supported yet... which your finding out. Its not an easy issue really... its an active area of research in game development.

That said alot of games have been faking it by using non-transparent water surfaces which render just like any other mesh. This would be hard to do with the current WaterPlane or WaterBlock classes... they are not setup to do deferred rendering and code changes are required.

Other than that there is Inferred Lighting which is something we've been wanted to implement in T3D.

Another idea is to do a second lighting pass specifically for water surfaces... it would be tricky and expensive, but possible.
#2
04/21/2010 (7:45 pm)
Just curious, would a glowing decal on the surface of the water work?