Game Development Community

Enhanced WaterBlock in TGEA.

by Stefan Lundmark · 02/16/2009 (12:15 am) · 45 comments

(Trying to embed the video without success) ;)

I've been working on an enhanced WaterBlock rendering and collision system for TGEA for almost 3 weeks now. Goals were:

* Refining the current implementation, better sampling of reflection/refraction. No seperation of interior/exterior shaders.
* Depth sampling, no rough edges where water intersects terrain.
* A springfield physics system.
* Streaming component which unloads and loads resources for the springfield as you move closer or further away from the water.

And this is the result, so far:
Video 1
Video 2 (Better Quality)

Suggestions?

Some other projects I'm working on:

* Line intersection physics on the GPU. It's showing some promise with relight times being significally lower, but my test scenes are far from complex. Need more cases to test, nail a few bugs and optimize data structure flow to the card. I'll blog about this soon.

* GPU Skinning. Need to do more research here, but it's fun.
#21
02/16/2009 (9:08 am)
Wow, impressive effects. Do you have any information/papers on those springfield physics? A Google search didn't return much, this page was actually the 3rd link on the list :P.
#22
02/16/2009 (9:13 am)
Hi Taylor,

You don't have to increase the waterblock grid size. This effect works independantly from how tesselated your WaterBlock is.

It has been trough a few revisions, and at one time we did vertex manipulation on the CPU (multithreaded, buzz buzz!) but that proved way too slow for larger grids. Also tried doing it on the GPU, but it bumped our requirements to Shader Model 3.0, which is too high.

Actually, it also didn't look as visually appealing. It's like parallax mapping. You could bake all that detail into the mesh, but it'll just end up too slow.
#24
02/16/2009 (9:42 am)
Great job Stephan!
#25
02/16/2009 (9:45 am)
That RTFSS application is very cool. ;) I'll have to play with it some more and see what I can come up with.
#26
02/16/2009 (10:09 am)
That's a pretty cool effect. It'd be awesome for a boat racing game or some kind of sea monster hunter game or machine gun ripples from shots fired.
#27
02/16/2009 (10:13 am)
Nice.
Awesome work.
#28
02/16/2009 (11:09 am)
Looks great :) Awesome work!
#29
02/16/2009 (12:36 pm)
Fantastic. Great work Stefan :)
#30
02/16/2009 (1:11 pm)
You should definitely make this a pack. I can see lots of people benefiting from it. Very well done looking. I am almost certain I would invest.
#31
02/16/2009 (1:20 pm)
(Thanks for all the compliments!)

Quote:
You should definitely make this a pack. I can see lots of people benefiting from it. Very well done looking. I am almost certain I would invest.

I want to include more features for that to happen, though. This is what I'm working on currently:

* Editor-placable emitters that affect water.
* Toggleable coastline forces.

If you got any specific ideas, let me know. ;)
#32
02/16/2009 (1:47 pm)
WOW! amazing, a bit annoying that it wont be for TGE though (i own TGE not TGEA) but i might upgrade, based on all the amazing visual effects i am seeing being done with TGEA.

If you were to do a pack, I would suggest you add the following:

Advanced Water Pack:

- Water waves effect (the video effect)
- Realistic water fall -> using the same idea, and it spashed on impact with the water below :)
#33
02/16/2009 (2:16 pm)
Registering interest in an 'Advanced Water Pack'!!!!

Would actually pre-pay for this. That's pretty ingenious work.
#34
02/16/2009 (3:16 pm)
Holy cow that's awesome. The only thing I saw missing has already been stated by you. (water bouncing back from terrain and object collisions)
#35
02/16/2009 (4:06 pm)
If this could be used to generate random waves that would be an instant buy.

My dreams of a modern day waverace might become complete :D
#36
02/16/2009 (4:25 pm)
Yeeah the is great looking!

Boats and objects floating on the water with some Buoyancy would be the SLAM DUNK! <-- I think I just punned.

***** (5 stars!)
#37
02/16/2009 (6:51 pm)
I would definitely be interested in a 'code pack'... very cool. I've been waiting for someone to address this!

Do you plan on using particle systems to show water foam and splash? Could be very effective in adding that last bit of realism.

What type of interaction do you see this having with the shoreline?

Very amazing... Keep it up!
#38
02/17/2009 (12:17 am)
that's just plain awesome!
very nice work indeed
#39
02/17/2009 (5:15 am)
another aquanaut here that would pay to license an enhanced water pak... even if it only had realtime displaced waves :)

great stuff Stefan...

--Mike
#40
02/17/2009 (5:53 pm)
Stefan, very nice!

thanks for the links to the papers, too.

this one is also a classic, which only models the surface of a one- or two-dimensional body of water, but includes bulk-water transport, which is cool. i confess i get lost in the math around equation 14, tho.

but w/r/t your simulation,
it might be interesting to add in some non-physically based large-scale wave stuff, ala the big sine waves in stock Torque water.
do you know where the water collides with the land & other objects ?
it might look nice to introduce some turbulence in those areas as the water rises & falls near them.