Search Unity

Fluidity - NextGen Fluid Dynamics - [ RELEASED ]

Discussion in 'Assets and Asset Store' started by smb02dunnal, Oct 22, 2013.

  1. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Completely understand, and thank you for the detailed explanation. I'm sure it will help many people to have a better understanding of the CPU<->GPU pipeline.

    Keep up the amazing work! :)
     
  2. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    @MoHoe :

    Here's the JetEngine demo you requested.

    There's a slider in the top right which controls the engine thrust... Slider could of done with being a bit more obvious TBH...

    Heat haze coming tomorrow :)
     
  3. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I'm not a gamer, I'm a developer :) Yes, I still develop on winxp desktop, though I have a win7 notebook
     
  4. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Pity this is Dx11 only. But very well done btw.
     
  5. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566

    Nice Work Alex :) .. pretty awesome actually. A few questions

    1: I can see some lines in there especially when thrusters are low, is that intentional? can it be removed?

    2: It looks a bit grainy especially from the side, is there a way around this?

    3: At full thrust the environment lights up, is this just by the light emitted from the thrusters or have you added lights in there?

    4: I'm assuming it's not expensive or my GPU fan would have spun faster, your opinion? do you think it was expensive?

    5: will you be adding the demo to the package? silly question really, I think the answer is yes... just checking :)

    Heat Haze coming so soon, man you're fast :)

    Awesome Alex
     
  6. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    1. The lines aren't from the fluid, the geometry of the jet has a sort of grille thing on the go.

    2. Yeah, spend more time tweaking the parameters haha, it was a quick job for me so didn't spend to long on it sorry.

    3. The lights are just Unity point lights, but they are linked to the volumes using Fluidity.

    4. The demo is very cheap, the simulation for the thrusters is instanced (each thruster shares the same simulation). The whole thing costs around 4ms. The simulation is very high quality,1M particles (which I've set on highest settings) with 2nd order correction and vorticity confinement enabled, as well as 10 pressure iterations.

    5. Yeah, don't see why not.
     
    Last edited: Oct 26, 2013
  7. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Updated the jet demo to show off the new heat haze effect. Available on a per volume basis, obviously comes with tweakable controls as well ( spread, taps, strength ).

    Here's the link again
    JetEngine
     
  8. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Getting ready to push this update to the store.
     
  9. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    So here's the feature list for the next update I'm pushing:
    • Unbounded fluid, with edge fading.
    • Heat haze with a variety of controls.
    • Reverse the gradient so it's more intuitive.


    Anything I've forgot before I sub this thing?
     
  10. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    You've just listed all the stuff i'd find absolutely perfect right now, get that thing up there! It's super needed very shortly as the weekend is my initial deadline and it would be a shame not to have this in there. However if it does what I hope I could have something amusing to show it off with shortly after getting my greasy mitts on it. I hope.
     
  11. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I'm hoping to be able to simulate some kind of turbulence too although I dont thing that will be hard to mimic, there'll just be a few things raining from the sky, on fire, with I guess all of them being instances of one or two simulations, does that sound about okay?
     
  12. mojao

    mojao

    Joined:
    Sep 2, 2013
    Posts:
    47
    Hello.I bought this great asset.Thank you to made this asset.
    Then, i have a question, is There are any plan to add feature to change blend mode?
    if there is a way to change blend mode already, if you teach me , i feel glad.
    Thanks.
     
  13. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Hi there, thanks for using Fluidity. I think I've experimented with that in the past and left some of the code in there. Which blend modes wild you like?
     
  14. mojao

    mojao

    Joined:
    Sep 2, 2013
    Posts:
    47
    Thank you for your kindness ! I want Additive blend only.Is there any chance?
     
  15. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Yeah certainly, is this for the full screen quad which renders the fluid? Or the fluid itself?
     
    Last edited: Oct 30, 2013
  16. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    How do you see the turbulent fields working? As another effect type? With direction?
     
  17. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
  18. mojao

    mojao

    Joined:
    Sep 2, 2013
    Posts:
    47
    Yeah Thanks! I hope fluid itself.I feel happy!
     
  19. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    What else is heat haze but a change in colour? ;)

    Maybe my demo doesn't show the technique off to well, I will tweak some parameters and update it :)
     
  20. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    In the link I provided above you see the effect I mean. The image parts that are behind the heated air are getting distorted.
    Here an old Unity thread with the same effect: http://forum.unity3d.com/threads/50132-Heat-Distortion
     
  21. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I know what you mean, and I know how to make a heat distortion effect. I was just making a graphics programmer joke, how any effect can be quantified to a simple change in colour :)

    Yeah, so heat distortion is a really simple effect to produce and I assure you my fluid system is doing the exact same thing (infact I'm taking it a step further and by adding light diffusion also). As I said, I'll tweak the numbers in the demo in order to exaggerate the effect.
     
  22. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Ok, let's get married :D
     
  23. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Haha
     
  24. fenderrio

    fenderrio

    Joined:
    Mar 2, 2013
    Posts:
    147
    This looks really pretty, but I don't see any screens or demos with what I'd call fluid... looks more like a smoke and fire plugin... Am I missing something?

    I'm interested in fluid dynamics atm for a game I'm developing. Could this plugin support something like fluid being fired out of a hose pipe? And then splashing onto the floor?
     
  25. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Smoke and fire are both fluid. You mean you want liquid? I am working on uploading a liquid demo using this system. It requires a slightly different method of rendering so it involves a little work. But yeah, this system could handle the scenario you've proposed in your post.
     
  26. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,537
    Man, it looks totally awesome.
     
  27. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Thanks alot! It's about to get a whole lot awsomererer ;)

    I just completed the upgrades to the renderer last night to handle different blend modes. This will be making it into the next asset store update.
     
  28. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,537
    Can we see some more examples of its functionality? For instance...

    Could this be configured to work as a go-to tool for explosions?
    What do the controls in the inspector look like?
    Can the quality be easily scaled back enough to allow many sources? Does it still run well when used like that?
    Do I need to make custom scripts to create unique variety beyond a flame appearance? (ie, how accessible is this for non-scripters?)
    Can gravity be applied to the particles?
    Can the particles collide with meshes? Is that expensive?

    I'm kind of just looking for more info and functional examples. It appears that this can do what I need but for $100 I'd want it to be flexible enough to use on a larger scale in the project and for the inspector tools to basically fill all of my flexibility needs.
     
  29. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I don't see why not, you can get a pretty cool nuke effect.

    I plan on posting a nice video demonstrating this.

    I think I have a demo already posted at the start of this thread showing 150+ fluid systems. I have many optimisations in place to handle lots of systems in a single scene, namely culling and rendering LOD.

    You have full control over appearance from the editor. Currently only gas fluids are supported, so things like fire and smoke are what it's best at (although liquid coming soon).

    Hmm, it's not particles in the same sense as shuriken for example. It's a truly volumetric effect rendered without geometry.

    Not in this version, I have a working prototype of this type of thing (as well as mesh emitters) but it's not an optimal method. Hopefully Unity will release the ability to render into 3d render targets, if not I will submit my workaround method.

    I've posted 4 demos at the start of this thread. What else would you like to see in a demo? More interactive demos maybe?
     
  30. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,537
    Great info, thanks.

    Yeah, I noticed that naturally happening when the sliders ramped and its a cool effect but I'm curious about other shapes. For instance shuriken allows different shape emitters (specifically, spherical) and i think all I'm seeing is unidirectional emission from the demos here. Maybe some variety in the logo demo, but I can't really tell.
    Awesome, I think that'll clear up a lot of questions and help show what you can do with it.
    Ahh I see, I didn't realize I could move around with that demo. It looked like just a dozen or so.
    Which is awesome, but is this something that users should take into consideration? This kind of gets more into your liquids, I think, but I'm just trying to look ahead and get a better idea of what we can/can't do with it... For example if I making a flame thrower and fire it sideways would the smoke effect at the end of it drift up/down? Maybe I should just buy it and try to break it :p
    Variety, mainly. I know this is more than a 'fire simulator' but for me the demos just look like fire clones. For example the jet demo at max power just looks like sideways flame i could burn in my backyard, and I would expect a Jet engine to appear different.

    http://www.youtube.com/watch?v=GcFWP_TvNjM

    Its clear that the technical power is there, its just that the examples are so peaceful and serene, showing a flame type of effect... Lets see some mayhem, chaos and destruction! Also I would be looking to basically replace the bulk of my shuriken systems with this so I keep thinking of comparisons to shurkien, like emitter shapes, shape over time, color over time, things like that.
     
    Last edited: Oct 31, 2013
  31. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,537
    Went ahead and purchased it, but I don't get any fluid simulation. I enabled DX11 and tried it in a blank project but its not rendering any fluid. The webdemo's work fine. Using Radeon HD 6450 on this machine.

    I'll try it on another computer in about an hour.
     
    Last edited: Oct 31, 2013
  32. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    That's a bummer! Congrats though, you're the first. Could you get in touch with me via email (in the docs). I have the new updated project you can try out, I have done some major refactoring of the rendering code.
     
  33. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,537
    Totally! I sent you an email. You can also get me on skype @ zer0bounds if you use it.
     
  34. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I just want to get the following information out there ASAP!

    This requires Unity Pro DX11.
     
  35. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    You'll be pleased to know that recent changes to fluidity have prompted me to refactor much of the rendering code. This has much improved memory consumption, draw calls, and performance!! It seems about a 0.5ms win with a single fluid system being rendered in the scene. That number scales with number of active fluid systems being rendered.

    :D
     
  36. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    That is very nice to hear :)
    keep it up i will get this asset soon.
     
  37. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I've just submitted the update to the asset store.

    New features include:
    - Blend modes (alpha blending, additive blending and selective).
    - Scatter based heat haze.
    - Edge fading for volumes.
    - Unbounded fluid, turns off collisions with fluid volume.
    - Also added in support for viscosity and gravity. (this is the first steps toward a water simulation)
    - A major rewrite of the rendering system.

    I've also just updated the jet engine demo, showing off the new heat haze effect. Here's a link:
    ::Jet Engine Heat Haze Demo

    Now that that's out of the way, I'm planning on making a new video showing off some of the effects possible, as well as a tutorial video. Stay tuned.
     
    Last edited: Nov 2, 2013
  38. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    You make a lot of people very happy with this cool stuff!!!:cool:
    Looks amazing! Can't wait to have the next version in my hands.

    Is there some sort of 2D option for the fluid? So we could restrict the simulation into only 2 dimensions?
     
  39. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Umm, I think you could just make a 3d volume but shrink the resolution on one of the axis to 1... Other than that, no, this system wont support 2D fluids.

    On the subject though, with the upcoming release of Unity2D I have developed a plugin for Fluidity, which lets you "bake out" fluid systems to 2D sprite sheets. The benefit of this is you no longer require DX11 to playback these fluid systems. Maybe this is something I should include in the next update?
     
  40. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I've started work on the next update.

    New features will include:
    • Translating fixed grids. Using this you can move your fluid volumes around the world, and the parallax will match up.
    • Receiver fluid effector.
    • CPU -> GPU feedback, allows for things like collision callbacks, temperature readings.
    • Simulation optimizations.

    Here's a screen grab of the latest update in action, I've added a flamethrower to the Angry Bots demo.
    $Fluidity.jpg

    Here's the angry bots demo, with flame thrower:
    ::Flaming Bots


    I will be making a tutorial video showing you how to modify the AngryBots demo to add the flamethrower with no scripting what so ever.
     
    Last edited: Nov 3, 2013
  41. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Man, I can play the whole day with this fluid! Just missing the smell of real gasoline when I put everything on fire.
    But now I'm real curious how to quench this with some liquid ;)
     
  42. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Yeah it's pretty cool, I'm pleased with the results. Imagine what can be done with this by someone with real art skills :D Can't wait to see what people manage to come up with.

    Liquid is coming, with the update I just submitted to the store, you can create liquid simulations by tweaking a few parameters (viscosity and gravity) and with a coming update, you will be able to render liquids with reflection, refraction, density fogging, diffusion, foam... and much more :)
     
  43. ForceX

    ForceX

    Joined:
    Jun 22, 2010
    Posts:
    1,102
    Pure AWESOMENESS! Now come-on payday!
     
  44. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I should also mention that Oculus VR support will be coming with the next update as well.
     
  45. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633
    Is the smoke illuminated by the environment?
     
  46. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    No.
     
  47. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633
    Any plans on adding that?
     
  48. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Yeah I've got a rough idea of how to do that efficiently, will be in a future update.
     
  49. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Looks like that's the next update ready. Man that was quick :)

    Just waiting on confirmation from my guys doing the Oculus testing and then ready to submit to store. :D
     
  50. mojao

    mojao

    Joined:
    Sep 2, 2013
    Posts:
    47
    Mr.smb02dunnal ,Thanks for update ! I'm looking forward to it on store !