Apr
8
2013

Eulerian Water Simulation C#

eulerian_water_simulation_unity3d_1

Converted one 2D water simulation to Unity, see original code & video (youtube) – source link at description (by Matthew Bettcher)
Check the old test also: 2D Fluids with Cellular Automata

TODO:
– Erosion?
– Floating objects?
– Different types of fluids?

Webplayer:
http://unitycoder.com/upload/demos/WaterSim2/ (texture size: 64×64)

Download source:
eulerianWaterSim.unityPackage


20 Comments + Add Comment

  • My English is not good :/

    Is that written in JavaScript?
    Will get a download for this?

    • C#, yes adding these latest converted sources soon..(as in this or next week)

  • Source added.

  • Very interested in this program!
    I’ll take a closer look at the source code.

    I found a glitch that if you drop small amount of water for about 10 times, the water runs on the surface from left to right, and keep running on the surface until more water is added.

    • Hmm, yes, seems like right border is eating some of the water,
      or maybe they get stacked on bottom (if fill 1 full row on bottom).

  • i installed unitycoder.com Toolbar and javascript enabled! but i cant download unitypackage!!why???

    • Are you using Chrome?

      Easy “fix”: Use something else than chrome.. (many people have had problems with chrome, i’ve tested it on 2-3 different machines and it works..)

      Other options: Disable adblockers on Chrome for this page (if have any enabled), then try?

      • i dont user chrome i’m user operaaa( i downloaded chrome but i cant add toolbar) and i tried internet explorer

        • hmm, strange thing.. (well, I emailed you the file let me know if it works)

          • thank you .it works.just i want to how to work this simulation.(can you say an another alternative for i can use toolbar because i like this site and have a good unitypackages)(sorry if you dont like my english)

  • Unfortunately no other free alternatives at the moment.. (if someone has suggestions, feel free to send ideas).

  • The source link is broken, you can put it back?
    Ty.

    • Bump

      • Download should be working, did you get any error message or ..?

  • What about two connected containers? The water surface is not the same in both of them as it should.
    I’d really love that!

    • Do you mean like this,

      (water would flow to another side, if its less there)

      • Yes!

  • Hi Mgear. Would it be possible to upload the source again? Regards Deon

  • 2D Wave Simulation sample implemented in Unity C# JobSystem
    https://github.com/rngtm/Unity-JobSystem-WaveEquation

Leave a comment

Connect

Twitter View LinkedIn profile Youtube Github Join Discord Twitch Instagram BlueSky

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.