Search Unity

Fluidity - NextGen Fluid Dynamics - [ RELEASED ]

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

  1. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Shame OP doesn't seem to have much time for that nowadays, the asset looks neat.

    To the users : OP mentionned getting the effect to react to lights (point/cone) earlier, but it doesn't seem to be there yet, right?
    So the FX are only lit by directional lights?
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    It's not lit by directional lights either. It can use the angle of a directional light to do some self-shadowing though.
     
  3. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Lighting from directional lights is supported.

    I've just fixed Fluidity so it works with Unity 5.0! :) The new package has been approved by Unity and is ready to go!!
     
    shkar-noori, Z43D, elbows and 3 others like this.
  4. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633
    Hi, is any of these supported. I feel like the fire rendering is a little toonish and doesn't really mesh well with the overall lighting. (going by the flaming bots demo)
    • World scene collisions, ie. voxelize the scene and collide
    • More effector types, turbulence, wind zones, repulsors, attractors.
    • More advanced temperature model which allows for more realistic rendering of fire/smoke.
    • Lighting!! Opacity mapping and world shadows.
    • Mesh emitters!
     
  5. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,349
    Is it possible to use Fluidity for water simulation ?
     
  7. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    WOOHOO!
     
  8. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Is that a fairer description than my one? Correct me if I am wrong, but the colour and the intensity of the directional light makes no difference to the fluid does it? That's why I described it as supporting self-shadowing from a directional light, but nothing else. Sorry if I am somehow mistaken, please correct me if I am.
     
  9. WonkyDonky

    WonkyDonky

    Joined:
    Aug 24, 2014
    Posts:
    65
    Could this awesome system be used to create blood or water?

    I would also like to know what other people have used this? :D

    (That fire does looks amazing in the Angry Bots demo!)
     
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I think the problem with clipping being upside down in Unity 5 with the new unity deferred mode still exists.

    Updated version of my fix is as follows:

    Edit Fluidity/Scripts/Volumes/BaseVolume.cs

    Around line 817 you will see this:
    myRenderer.sharedMaterial.SetFloat("_IsDeferred", Camera.current.renderingPath != RenderingPath.DeferredLighting ? 0 : 1);

    Change it to this:
    myRenderer.sharedMaterial.SetFloat("_IsDeferred", Camera.current.actualRenderingPath != RenderingPath.DeferredShading ? 0 : 1);
     
  11. The-Oddler

    The-Oddler

    Joined:
    Nov 26, 2010
    Posts:
    133
    May I ask a technical question?

    It looks like the equations for the effect is grid-based. But there's an option that makes the effect "unbound". How is this achieved?
     
  12. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I can't give you a comprehensive answer, since I am not the author of the asset and my language is a bit limited past a certain technical level.

    But yes, its based on a grid, you won't see anything from this effect beyond the bounds of the grid. Certain scenarios people would want in a game engine can be achieved by intelligently moving the grid. Off the top of my head I'm not entirely sure which unbound option you are referring to, but there is every chance that what this mostly does is simply change what happens when smoke/fire/whatever reaches the edges of the grid. e.g. have it just float off into invisibility, rather than being repulsed in the opposite direction by the edges of the grid (i.e. whether the system acts as if the bounds are a solid wall)
     
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hiya, wondered if:

    - this could be used for cloud rendering
    - collides with mesh colliders?
     
  14. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    I seem to be running into visual artifacts whenever using the hate haze (S*** looks wonky) and the clipping plane for the fluids in general seems to be really close to the camera. Anyone else hit these issues?
     
  15. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    302
    Does this work with Unity 5?
     
  16. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    No on both counts. While you could in theory model the simulation of clouds using this package, I'd recommend using a dedicated cloud/sky rendering solution. Perhaps TrueSKY?

    Can you elaborate on the settings you are using? Can you reproduce the issue in one of the sample scenes?

    Indeed it does fine sir!
     
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's a shame there's no mesh collider support. Is it planned?
     
  18. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Until Unity adds support for voxelisation, I can't implement mesh collider emitters at the performance I'd like.
     
  19. BayouSoftware

    BayouSoftware

    Joined:
    Oct 7, 2012
    Posts:
    15
    Hi I just bought fluidity and have Unity pro and a dx11 gpu, but I cant run the example scenes I just get the pink shaders, does it not work with Unity 5.1.0f3 yet?

    I'm definitely running in dx11 and can play the web demos, and I cant find any errors or other troubleshooting advice in the user guide, so I assume its just the Unity version thats the issue.

    Cheers,
     
  20. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Are there any plans to port this to OpenGL?
     
  21. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The problem with the shaders in Unity 5.1 seems to be down to some generic, reused SamplerStates. Unity doesn't seem to like these existing without a matching texture, so I messed around and created sampler states for every texture that wanted them rather than reusing a couple of generic ones. It works, but I suspect there are still a couple of other problems on 5.1 - e.g. self-shadowing example might not be working. I still don't think my previous fixes for the deferred rendering mode of Unity 5 made it into fluidity on the asset store either. So, this asset needs a little bit of love from its author.

    Also unlike some other compute shader-based assets I own/use I don't think this one works when forcing on the new OpenGL mode of unity 5.1 on Windows instead of DX11.
     
  22. cm

    cm

    Joined:
    Jul 31, 2012
    Posts:
    14
    I'm getting the same issues, using Unity 5.1.1f1, despite using Dx11, and setting up Deferred lighting on cameras, and in player settings. I've tried two machines with the same results.
     
  23. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hey elbows, given i'm in unfamiliar territory with this stuff can you give a summary of what might can be done to get this up and running in 5.1, if possible? The asset does indeed need a bit of love, other than scrawks take which is a bit of a different animal,. this is the only thing of its kind on the assetstore and maybe amusingly my partner wants the power to flamethrow at ostriches. I didn't ask too many questions i just figured giving her the opportunity would make her happy
     
  24. cm

    cm

    Joined:
    Jul 31, 2012
    Posts:
    14
    Is there an update planned? I would like to use this package soon.
     
  25. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Sorry, I couldn't think of a way to help further since I already described what I did, and there are too many lines that need changing. I'd pretty much need to share several files in their entirety to give you enough further info and I'm not allowed to do that.
     
  26. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Hey guys,
    Sorry for the delay!

    Unity made some changes in 5.1.x that broke Fluidity. I've corrected this and there is a new package pending approval.
     
    elbows likes this.
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Cool. Does it include the deferred rendering fix that I mentioned before in posts like the following one?

    #410
     
  28. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Yes, rendering works in all lighting modes now.
     
    theLittleSettler and elbows like this.
  29. horatiu665

    horatiu665

    Joined:
    Nov 22, 2012
    Posts:
    24
    Hi, did you fix it just for 5.1.x or did you also test 5.2 (latest Unity non-beta)? I tried the previous version and it has the pink textures, I'm looking forward to try the newest update.
     
  30. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    It also works on 5.2 - confirmed!
     
    elbows and DrewMedina like this.
  31. TechiTech

    TechiTech

    Joined:
    Dec 13, 2014
    Posts:
    212
    are you working on a fix for Pyro Technix
     
    DrewMedina likes this.
  32. SmashedAvocado

    SmashedAvocado

    Joined:
    Dec 19, 2013
    Posts:
    45
    Is it still pending approval? I just bought the pack and I'm getting the pink textures here too!
     
  33. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I've also pushed an update for Pyro Technix - currently pending approval.

    It's still pending - taking a long time, maybe they are busy...
     
    SmashedAvocado likes this.
  34. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Anecdotal evidence is that yes, they have a bit of a backlog on the store.
     
  35. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Looks like the new version is on the store now, not had a chance to try it myself yet.
     
  36. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    I downloaded just now, definitely the latest, been wrestling with it on 3 different computers. I got pink boxes and planes in editor and on build.

    unity pro 5.1.1.1f1 64bit, says <DX11> in the title bar. building to a 64 bit project.
    win 8.1 pro
    dx11 on a geforce gtx 980 Ti

    the demo scenes open, run in the editor, build, but all with pink in every case.

    ideas? Thanks.
     
  37. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    this from the log:

    WARNING: Shader Unsupported: 'Hidden/Fluidity/VolumeLight' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/Fluidity/Render1' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/Fluidity/Render2' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/Fluidity/Render3' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/Fluidity/Render4' - Setting to default shader.
     
  38. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    Here is a bit of a screenshot:
     

    Attached Files:

  39. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Oh, that does look like the same errors that existed in the previous version, that I managed to botch-fix but couldn't share the fix with everyone as I'm not the asset author and so have no right to go sharing big chunks of code.
     
  40. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    elbows, I pm'ed you.
     
  41. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Let me try the new version myself now and then I will get back to you shortly.
     
  42. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    OK it works for me, just tried it with Unity 5.1.3p2 and 5.2.0p1.

    I suspect the latest version hasn't really downloaded/installed for you, or the old version is still part of your project. Does it say Fluidity 1.5 in your asset store package manager?
     
  43. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Also works fine for me using 5.2.1p1. Thanks to the author for all the fixes in this version :)

    So far my testing has been limited to running all the demo scenes and observing them for a number of seconds.
     
  44. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    I have not had an older version, I first bought it yesterday... but this is interesting, the Fluidity page says 1.5 as the latest version, but the package in my asset store downloader says 1.4 as the downloadable/importable package. weird. I'll try to sort it out. thanks for letting me know that it worked for you.
     
  45. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The new version only came out late yesterday so you probably downloaded it before 1.5 came out in the store.
     
  46. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    first, thanks for all the info Elbows... 2nd, this is strange, even with a brand new blank project, going to the asset store d/l manager to get the latest Fluidity shows me 1.4. and the same problem I've been having since yesterday.

    Elbows, were you able to get 1.5 as the name of the package? i'm just seeing 1.4.
     
  47. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The asset store manager page shows the name of the version you presently have downloaded to your computer. Mine shows 1.5 because I've got that version. I didn't do anything special to get it, just pressed the update button. Until I did that it showed 1.4 in the name.
     
  48. AlpayKasal

    AlpayKasal

    Joined:
    Aug 4, 2014
    Posts:
    27
    damn... no update button :/

    would you say this is my issue though? is the version of fluidity what is giving me grief in your opinion?
     
  49. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    I was just looking at this, but I'm reading that lighting from lights besides directional lights isn't supported.

    I was interested in using some of this for interior effects (my game is set entirely underground) and I have no directional light in the scene. That would be a deal-breaker. Is that still true?
     
  50. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    As far as I'm aware even the directional light support is only for using the angle of that light to calculate the self-shadowing, if self-shadowing is enabled. The main colours of the rendered effect are set using colour gradients. So even in a scene with no lighting, you will still see stuff from this effect, it won't be invisible or black just because there are no lights.

    Hope that makes sense and answers the question, but please note my usual disclaimer that I am not the author of this asset.