Game Development Community

Water Sparkles

by Quest Johnny · in Torque Game Engine · 06/30/2004 (8:35 pm) · 5 replies

Anybody got any idea how one could create the underwater sparkle effect one sees underwater?

http://food4eyes.esoul.it/archives/underwater.jpg

I was wondering if precipitation might do it.

#1
07/01/2004 (1:51 am)
Those are usually called caustics. I don't know how to do them, though.
#2
07/01/2004 (11:53 am)
I've seen a tutorial on this before... it's essentially multitexturing or layered texturing. Just do a google for caustics in openGL. You'll probably eventually find the same thing.
#3
07/06/2004 (9:47 am)
Usually, in games of this nature, it's done with a second texture layer. It's a simple translucent texture with the ripples in it, and it's animated to match the water.

Out of the box, I can see no way to add this effect. What you'll need to do is add a new texture layer to tsMesh's rendering part, plus modify the rendering code for the terrain system. While adding this texture wouldn't be all that hard, locating the necessary places to make these changes might be. :) A good place to start might be the bump texture (for tsMeshes) and the detail texture (for terrains).
#4
07/06/2004 (11:40 pm)
Try having a twin waterblock around 0.2 world untis below the top one.
#5
09/12/2004 (1:28 pm)
I'm working on caustics at the moment for waterblocks... I'll post a patch when I get them going.

Tommy.