Jan
14
2012

2D Fluids with Cellular Automata

2D Fluids test.. Trying to make water like this (see forum link), but in 2D (like the original java link there)

First version works.. but using SetPixel, which is slow.. *Updated screenshot, added webplayer
Currently its drawing those boxes with setpixel..

*Check also the newer version: Eulerian Water Sim

Webplayer:
http://unitycoder.com/upload/demos/mFluids2DCellularAutomata1/

Download source: (C#)
mWaterSim2D.unitypackage


4 Comments + Add Comment

  • cleaning up the source a bit..uploading on sunday or monday..

    • What I’m going to do in the next version of the lirabry is expose a way to update the world matrix of an object in the list kept by the ShadowMapRenderer.I’m still working on the best way to do this, but if you want a quick and dirty solution, you can make the list of casters public, and remember the index of each added object.If you’re not afraid of a little garbage (until the next verison comes out), simply modify the lirabry code, clear the list of shadow casters at the end of each frame, and add the casters with their correct world matrices each frame.

  • some amazing stuff here!
    2D fluids, 3D fluids etc:
    http://scrawkblog.com/2014/01/09/gpu-gems-to-unity-3d-fluid-simulation/

  • Cellular Automaton 2D Liquid Simulator for Unity
    https://github.com/jongallant/LiquidSimulator

Leave a comment

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

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.