- Home /
Displacement of water?
Ever play Terraria? The first thing you notice as a developer is amazing water system.
I am currently working on a water system myself and might possibly submit to unity themselves if it finishes strong enough and they don't have a water system (this system is volume and metric water with physics displacement and able to be formed with splines) finished at all.
My goal is to also create this without making the million polly pond (because of the water polly count).
I also understand if I make it for unity that I should set the bar really high.
Here are my starting lines.
Edited rigidbidy class - just for water
Restraint calculations - for the
water if chosen to be restrained
Less strenuous cycle hogging - use
of fixed update
Editable Shaders - for different
looks.
Built-in water controller - for
when inside water.
Reaction/Displacement - reactions to if any volume enters or exits the water.
So my question is how do I make a water (volume) unit without creating a mesh with 16 pollys on it for hat single unit?
What you have to remember is that Terraria is a 2D platform.. physics work alot different in that environment and the bounding of objects are calculated completely different.
In 3D world space, creating actual displayable water is very very CPU intensive, the closest ive seen is the use of meta balls... but then you have to calculate collisions.. shudder... http://www.unifycommunity.com/wiki/index.php?title=$$anonymous$$etaBalls
But also look at - http://answers.unity3d.com/questions/54982/is-it-possible-to-make-liquid-water-in-unity3d.html
Answer by dsp4 · Oct 20, 2011 at 05:53 AM
3D fluid simulation is still rare in games, even with the powerful GPUs we have, simply because it is incredibly resource-intensive. Valve did it for Portal 2, but it was very limited and far from being used on large bodies of water.
Nvidia published an article about realtime 3D fluid simulation as part of it's GPU Gems series. It's very technical but gives a good idea of what's involved in good fluid simulation : http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html
Eww, that's some hairy math and shader code they got going on. >_<
Your answer
Follow this Question
Related Questions
How to make a vertex water displacement on a full cubic ocean? 0 Answers
Having trouble to getting the height from an object being displaced by a shader 1 Answer
How do I alter vertex displacement based on UV coordinates? 0 Answers
Modify water displacement 0 Answers
How do I fill a terrain with water in order to make an ocean 1 Answer