Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Is realtime water simulation possible through Unity?

Discussion in 'iOS and tvOS' started by JeppeNygaard, Nov 22, 2011.

  1. JeppeNygaard

    JeppeNygaard

    Joined:
    Dec 7, 2010
    Posts:
    13
    I recently stumbled upon a great little game called "Sprinkle" (here's a link: http://www.youtube.com/watch?v=C2dyqwBoSqc - and no, this is not a hidden commercial ;)

    My question: is it possible to create a simular type of realtime water sim through unity (it's ok if the sim is only 2d, which I assume is the case in Sprinkle)?

    .... and if so, where can I look to get more knowledge on the subject?

    Thanks in advance
    Jeppe



    - and here is a little "hidden" commercial: check out my new game for toddlers: "Baby Cupid" on the AppStore ;)
     
  2. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Even if it would be hidden commercial it doesn't matter since its a good question :)

    I was wondering that too when I bought it weeks ago. I'm sure its possible but don't know whats efficient way of doing that.
     
  3. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    No, the water simulation is for sure a polygonal mesh coded to act like metaballs, it is not 2D graphics.
    You can do it writting low level code to manipulate the mesh, but it can easily kill the cpu if you do it the wrong way.
     
  4. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    there is a meta-ball script on the unity wiki, but that would not give the realistic collisions.
     
  5. JeppeNygaard

    JeppeNygaard

    Joined:
    Dec 7, 2010
    Posts:
    13
    In my search for more information on real-time fluid sims I stumbled upon the "mediocre games"-blog about "sprinkle" and it does sound like they took a 2d approach to the water simulation:

    http://mediocregames.wordpress.com/2011/09/08/getting-the-water-flowing/

    Does anyone of you know of a way to implement a 2d fluid container into the unity 3d workspace?

    Thanks
    Jeppe
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723