Search Unity

Flowing Water

Discussion in 'Made With Unity' started by Wahooney, Apr 20, 2012.

  1. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    I've created flowing water as seen in Valve Software's Left 4 Dead 2 and Portal 2, based on their whitepapers.

    At this point the system supports vector fields (authored inside Unity :D , can be updated at runtime too), reflections, refractions and floating texture based debris.

    Have a look:


    Water Flow (link)


    The vector field forces include directional, point, vertex and meshbased force (nearby mesh faces contribute to the vector direction)

    Coming soon(ish) floating solid (physics) objects affected by water flow, foam/scum, splashes/impacts.

    What do you guys and gals think?

    [UPDATED]
    Added flowing colours! Blood that drips into the water will flow in the current, sewage pipes pump crap into the water, pump clean water into the system, etc.
     
    Last edited: Apr 23, 2012
  2. dterbeest

    dterbeest

    Joined:
    Mar 23, 2012
    Posts:
    389
    Looks very good. How is the performance?
     
  3. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    I don't have any hard numbers at the moment, but considering the complexity of the final effect, performance is pretty good. The biggest hogs at this point are reflection and refraction, but the flow is pretty fast.
     
  4. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Coooooolll! :D
     
  5. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    This looks really nice and ran well on my machine.. Looking forward to the updates you mentioned =)
     
  6. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    awesome!
     
  7. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    @rutecht: I have a few more tricks up my sleeve too ;)
     
  8. brikkworker.com

    brikkworker.com

    Joined:
    Apr 13, 2012
    Posts:
    15
    Wow, looks really nice and runs smooth on both of my pcs. Are you planning to sell it when its done? :)
     
  9. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Updated to a new version, now includes colour flow! Read the first post for more details.
     
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oh man, that blood flow is so cool
     
  11. brikkworker.com

    brikkworker.com

    Joined:
    Apr 13, 2012
    Posts:
    15
    Yes, very very nice! But this is a very small room. What about performance in larger areas? :D
     
  12. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    Does it require Shader Model 3?
    Whenever i enter, i see a huge white glowing wall o_O
    (Since i'm sitting on a laptop: Intel GMA 950)
     
  13. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Brikkworker.com: I'll make a demo with a larger area sometime soon, but performance should still be pretty decent, that said, this is not for simulating a huge lake or an ocean, it's meant for smaller bodies of water (think Portal 2 and L4D2 water areas).

    Mauri: It is shader model 3 and up only, I'm afraid. I want to make simpler versions sometime too.
     
  14. stefmen

    stefmen

    Joined:
    Apr 14, 2009
    Posts:
    791
    nice stuff!
     
  15. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Wow, that's awesome
     
  16. dactilardesign

    dactilardesign

    Joined:
    Jun 9, 2009
    Posts:
    68
    Really nice job.
     
  17. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Damn! This is really awesome!
     
  18. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,670
    need pixel shader 3?
     
  19. Joppel

    Joppel

    Joined:
    Aug 4, 2012
    Posts:
    34
    I assume that reflection is only for Unity Pro, how about the rest of the awesomesauce you made there? The rest will work?

    Hmm saw now that this is an old bump.
    I really hope Wahooney will give us some news anyhow :)
     
    Last edited: Sep 14, 2012
  20. AlexZ

    AlexZ

    Joined:
    Sep 17, 2009
    Posts:
    263
    Looks really good. Great work :D