Game Development Community

New Water/Atlas Effects

by Jacob Dankovchik · in Torque Game Engine Advanced · 01/28/2006 (8:33 pm) · 116 replies

Since the shore topic was getting just too big to manage, I decided it would be much easier to move the conversation into here.

I'm still working on the effects, trying to get them right. Right now I'm messing with under-surface and distance darkening. Tell me what you think of these pics of the surface as you sink.

img84.imageshack.us/img84/2492/water18tt.jpgimg84.imageshack.us/img84/2615/water26uh.jpgimg84.imageshack.us/img84/9443/water33yx.jpgimg84.imageshack.us/img84/1310/water43ce.jpg

I'm still messing around, trying to get this is absolutley accuate as possible. Still not sure what to do about the world edges.. I guess I could leave that to the artists to handle...
#21
02/02/2006 (11:42 pm)
Niiiice!

-Jase
#22
02/05/2006 (10:35 am)
Almost ready for a test release for everyone to mess with and see what they think. This will only have the basic shading, no underwater effects and no terrain changes. I still have much to do with underwater work and even more for the terrain texturing. But I'll keep my progress posted. ;)
#23
02/07/2006 (7:24 pm)
Because of large, multiple images.. I'll give links.

This is just a further demonstration of the water. It won't be much longer, I promise. I got work today, so nothing I can do. Tomarrow though I'll be able to further my work. May have a release by friday. :)

Before, with regular water:
img74.imageshack.us/img74/4657/before13eo.jpg
img74.imageshack.us/img74/2023/before25my.jpg
img235.imageshack.us/img235/9836/before33py.jpg

And after, with my shader changes:
img235.imageshack.us/img235/9383/after15uk.jpg
img235.imageshack.us/img235/9527/after29ud.jpg
img223.imageshack.us/img223/7683/after38ax.jpg
img235.imageshack.us/img235/5803/after44jw.jpg
#24
02/07/2006 (7:43 pm)
We're still overrun by Marines, and the waters have been really rough lately (had a drowning yesterday, in fact). In the meantime, I managed to dig up the following info that might do just as well, at least for calculations... There are some pics that might help, also... A search for Underwater Photography and Light Absorption should yield more data.


Scroll down to ABSORPTION for some general (% light loss) guidelines based on the author's experiences. Speaking with some more advanced underwater photographers, this information seems to be about right for what we typically see in the waters around here. I have been unable to find real-world or scientific data to back up these numbers, but the likelyhood of such data is slim, considering the many factors that affect light absorption.
www.kenstone.net/fcp_homepage/lighting_below_the_waves.html

Of note...it is important that there are 2 calculations that need to be made...first, the light absorption from source to object (for example, the sun to your underwater object). The second is the additional light that is absorbed from the object at that point, to the camera.... so...if you're parallel to your object, and the light source is the sun, your entire calculation path for light and color absoption will be an "L".


I actually managed to find a rather interesting on NASA's site. Well worth taking a read.
science.hq.nasa.gov/oceans/living/color.html


Not very usefull, but might still come in handy...
en.wikipedia.org/wiki/Underwater
#25
02/07/2006 (7:59 pm)
Quote:Of note...it is important that there are 2 calculations that need to be made...first, the light absorption from source to object (for example, the sun to your underwater object). The second is the additional light that is absorbed from the object at that point, to the camera.... so...if you're parallel to your object, and the light source is the sun, your entire calculation path for light and color absoption will be an "L".

Unfortunatly, I've been having trouble with this... I planned to do this, but its not working so great. To do this, I need to figure out the angle the sunlight is hitting that particular pixel at and I'm not having too much success.

The calculation I came up with would be depth*cos(angle of sun) + depth*cos(angle of camera). This should give the total distance traveled by the light. The only flaw to this would be shadows.. Say the sun is at 5 degrees,a very low sun. The light will be calculated very far, a distance that would actually intersect with the terrain. Normally this area would be in shadow though. However the result with this will end up being a really dark patch, which i guess still works.

I'm goin to bed soon however I'll look at the rest of what you got tomarrow. Unfortunatly though, the first release of this water effect will have to settle at a somewhat of a loss of realsim with no angle calculations. And honestly, if i truly have to, I CAN cut it out without feeling too bad.
#26
02/07/2006 (8:50 pm)
Nice work, Jacob. Looks awesome.
#27
02/07/2006 (9:27 pm)
Not much for shadows underwater.
The real factor is light intensity. In fact, it's prefered for u/w photography to shoot on a cloudy day, as the light is disbursed over a wider area. Makes for much better lighting conditions.

How about approaching from the perspective of light intensity at source/surface, vice pure angle of light source? Should account for cases where the water is shadowed by a mountain or clouds...etc...
#28
02/08/2006 (11:47 am)
Hey jacob,

great job man! One thing you might find of interest is a tech demo for the typhoon engine

gameprog.it/hosted/typhoon/

Its got probably the best looking implimentation I've seen for underwater/surface effects. Check it out, ot may give you some ideas..

k
#29
02/08/2006 (12:27 pm)
Quote:How about approaching from the perspective of light intensity at source/surface, vice pure angle of light source? Should account for cases where the water is shadowed by a mountain or clouds...etc...

Afraid I'm not really getting what you mean there. Could you maybe explain a bit more?

And thanks for the resources. You're proving to be quite helpful on all this. :)

And thanks too Kevin, I'll have a look at that.

Although I'm going to wrap up the water soon for now, not for good of cource though. I'm going to setup for a release quite soon and then move into the changes I've been planning for Atlas itself. Once I get basic operations of both, I'll go back and improve further if I can.
#30
02/12/2006 (9:46 am)
That shallow water screen above looks good.
#31
02/17/2006 (2:45 am)
That water is absolutely amazing. The first time I saw it I said to myself "Why are they showing pictures they took of the sea ... this is a game development site" ... and then I looked a bit closer and my jaw dropped. Outstanding job.
#32
02/21/2006 (5:33 pm)
Those latest shots look awesome Jacob. I see you unlocked my specular water lighting in the shader ;) Looks pretty good in that shot that uses it. Cool to see someone tapping the waterBlock potential.
#33
02/21/2006 (6:15 pm)
Yes. I am loving every second of these water enhancements as I hope you guys are as well. ;)

img304.imageshack.us/img304/9725/lake13eu.jpg
img304.imageshack.us/img304/9662/lake49io.jpg
#34
02/26/2006 (5:18 pm)
Did work on this stop or something? Are we ever going to get our hands on this?
#35
02/26/2006 (5:49 pm)
@Jacob: Yes, we're loving it too, but we'd love it more if we could use it. ;)
#36
02/26/2006 (7:51 pm)
Heheh.. Well.. Yes, you'll get your hands on it. When however, I'm not too sure. Ask Tim Aste, he may have a better idea, seeing as he's the one I sent the code to for integration into TSE. ;)

Thats basically what I'm holding off on. When GG desides to release anything with it, since they now have the code.
#37
02/26/2006 (8:31 pm)
Would it be possible at all to send me the code, too? Email in profile...
#39
02/27/2006 (12:17 pm)
*sigh* Ive been doing some work on it so it'll take a moment to re-straighten everything. I'll let you know when I get to it.
#40
02/27/2006 (7:15 pm)
This is a movie showing the shore effects (waves) used in Command & Conquer and Far Cry, thought it might give some ideas on how to achieve a similar effect within TSE. Also a quick wave simulation I made to help illustrate the texture animation technique used in both games.

*edit* removed redundent links.