Game Development Community

dev|Pro Game Development Curriculum

Fluid Improvements

by Melv May · 07/11/2002 (10:29 am) · 78 comments

Download Code File

If you've not already seen it then you can see it here:

Shoreline#1
Shoreline#2
Shoreline#3
Shoreline#4
Shoreline#5
Dev Snapshot
Forum Thread

Some major improvements are:-

- Takes advantage of multiple texturing units on cards. Will reconfigure surface/environment/fog rendering for 2 TMU's or 4 TMU's automagically.
- No longer need to exit editor to change waterblock textures for surface/environment.
- Can move waterblock and apply alpha-map on the fly using the editor.
- Shallow/Depth alpha configurable.
- Water Surface Distortion function.
- Surface Parallax.
- Fluid Flow control.
- Seperate fluid Environment map for over/under surface

Please note that this superceeds the previous code snipit Improved Fluid Rendering and includes all of it's functionality except the underwater distortion texture.

You can also find some textures which I used in the "Dev Snapshot" here:

Wash#1
Wash#2

Enjoy everyone,

- Melv.

[EDIT] 27/08/2002
Completely revamped engine to include features listed above.

[EDIT] 31/08/2002
Removed some WIP code that was left in and was causing a texture manager error. Thanks to Chris Wilson for kindly pointing it out.

[EDIT] 8/9/2002
Fixed bug causing disconnect when *any* texture resources are not found.

[EDIT] 1/2/2003
Moved hosting web-site.
Page«First 1 2 3 4 Next»
#61
11/06/2002 (11:36 am)
It was my intention to wait until I thought enough people wanted in the CVS. Now that quite a few people do I will try to get it inserted asap.

- Melv.
#62
11/10/2002 (4:26 am)
Nice water :)
Although I've experienced the same problem as Kirby Frugia... I let the game going on for some time and the water surely got much faster...
#63
11/10/2002 (4:46 am)
Nelson,

Okay, two people seeing the same problem is good enough for me. I will have a look at this soon to see what the problem is.

Thanks for the heads-up.

- Melv.
#64
11/19/2002 (7:13 pm)
Wow Melv, this is really nice ! This one and all your other ressources are all "a must have". Your name is probably and will be on a lot of futur games, if not all :) Also, your instructions for all of them are really easy to follow for everyones. I've installed almost them all. Thanks really much !
#65
11/20/2002 (8:40 am)
Thanks Gilles!

- Melv.
#66
11/20/2002 (10:17 am)
Melv, if you need some more votes (or better beggings ;)) to get this into the CVS, here is mine.

great work
#67
11/23/2002 (9:56 am)
Everyone: This code has now been moved into the [HEAD]. I will try to keep them both updated but you can guarantee that the [HEAD] will always have the latest version.

Kirby/Nelson: I have now fixed the bug regarding the fluid-flow accelerating, it's now in the [HEAD] release.

- Melv.
#68
01/08/2003 (5:01 pm)
Absolutely wonderfull improvement! This just *has* to be added to the CVS.
#69
01/08/2003 (11:50 pm)
Dann,

Thanks. You will find it in the [HEAD]. (See my previous post) :)

- Melv.
#70
03/23/2003 (3:30 pm)
Hey Melv

This is an awsome affect! I am new to GG and still learning. I noticed that there was an AudioEnvironment tag but nothing explaining what it is for. Is it for placing an audio file like(water.wav) or something? If so, can you fill me in on how it works? I have been around in here for about 1 month and you seem to be eager to help newbee people like me. I can't let you know much I apprciate it. I am not nearly as young as some of these people but I catch on fast.

Thanks!
MJ....
#71
10/28/2003 (2:11 pm)
Melv....

Is this in the 1_2_0 or should I update that code with yours?

Thanks.

-K
#72
10/28/2003 (10:29 pm)
Keith,

It has been put into the engine. Any updates will go directly into the engine and will be documented here.

Hope this helps,

- Melv.
#73
11/03/2003 (3:39 pm)
Thanks Melv.
#74
04/20/2005 (8:12 am)
I have a question, am using VS.net to rebuild torque...I copied and pasted all files in fluiddev.zip into \engine\terrain and then added them to the solution, when I rebuild the whole project I get these errors:

c:\Documents and Settings\IRAD\Desktop\Torque Water Effects Test\engine\terrain\waterBlock.cc(433): error C2664: 'void Container::findObjects(const Box3F &,U32,Container::FindCallback,void *)' : cannot convert parameter 3 from 'void (SceneObject *,S32)' to 'Container::FindCallback'


c:\Documents and Settings\IRAD\Desktop\Torque Water Effects Test\engine\terrain\waterBlock.cc(477): error C2664: 'void Container::findObjects(const Box3F &,U32,Container::FindCallback,void *)' : cannot convert parameter 3 from 'void (SceneObject *,S32)' to 'Container::FindCallback'



anyone know how to fix this problem?
#75
04/21/2005 (5:41 pm)
Merrill, erm, it's already in the engine.

Melvs post above "It has been put into the engine. Any updates will go directly into the engine and will be documented here."

Also at the top of the page it says "[This improvement is now part of the Torque HEAD]"

So you don't need to worry about adding it again.
#76
10/19/2005 (4:24 am)
Since this has been added into TGE, why does the water effects in starter.fps look as crappy as ever?
#77
12/28/2007 (7:00 am)
Wow, this hasn't been touched in a long time! Anyways, does anyone know if this will work for TGE 1.5.x?
#78
12/28/2007 (7:03 am)
Isn't it already implemented in stock TGE now?
(though I could be mistaken)
Page«First 1 2 3 4 Next»