Search Unity

Fluidity - NextGen Fluid Dynamics - [ RELEASED ]

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

  1. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    So yes, I still have the problem. Like others, it seems to work regardless. Changing BaseVolume.cs line 756 where the texture is created from TextureFormat.RGBAHalf to TextureFormat.RGBAFloat removes the error but, I'd assume, means twice the data is being shunted about so is half as efficient, right? Anything from Unity on this yet?

    Moving on...
    I now have a few questions related to my integration attempt. Short versions:
    1. How to tell Fluidity to emit at certain locations within its simulation volume?
    2. How best to allow fire simulation anywhere the camera goes?

    As background, in my local arena brawler (kind'a), I aim to make parts of the scene flammable (and later give my characters optional flamethrowers (like the Angry Bots demo)). I've created my own code for fires spreading and registering where a fire is emitting (since I need that for non-Fluidity version for pre-DX11 mode). What I haven't worked out is the best way to get Fluidity to consider other areas as emission sources within the volume.

    For (Question 1) I suspect I have 4 options:
    1. Use temporary emitters at all fire locations and scale them (something similar to what I'm already doing for non-Fluidity (particle systems)) -- best option I suspect?
    2. Use texture emission which I update -- limited to fires on a plane
    3. Use volume emission (where I update the Texture3D with my fires -- suspect the most efficient approach?)
    4. custom code / customize code ... perhaps something extra in Simulation.Inject()?

    For (Question 2) the only approaches appear to be:
    1. a single static fluid volume that covers the whole level accompanied by a simulation that uses a crazily large grid resolution. I already mostly hung Unity with 512^3!
    2. a simulation that moves with the camera (similar to Angry Bots integration demo).
    3. other?
    Given these, I guess (2) is the only viable one. The tricky part being that both my camera and
    multiple players move. I do already calculate the camera's desired bounding volume so I guess I could center the simulation there. I'm not sure what can be done about the breadth of view changing? (i.e. as the players move apart, the camera sees more.) Ideally, I'd like the volume and simulation to be as optimal as possible. Any thoughts? (I'm guessing one cannot change the Grid Resolution during simulation?) EDIT: Just tried doing it in GUI while running in the Ruins demo -- it switches to only updating the overlap between the numbers. Maybe different if volume also changed but unlikely, I'd assume.

    Any and all recommendations, etc on either question (or other issues you might think I'll encounter) will be greatly appreciated!
    Thanks in advance! Rupert.
     
  2. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    Is this asset abandoned ?
     
  3. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    No, it was only updated recently.
     
  4. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    This is not working in Unity 5.2.3 , on a DX11 card, and the dev is not replying emails (or here).
     
  5. Reaven99

    Reaven99

    Joined:
    Oct 3, 2015
    Posts:
    39
    I am thinking of buying this asset but i have a few questions first.
    Is this asset still active? i read alot of comments here that it may be abandoned or that the asset is not working.
    Is there a torch example? I want to use this in a first person game for a torch so i would like to make sure it looks nice and realistic.

    Thank you and i am looking very much forward to an example and the replies.

    Regards
     
  6. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    @Reaven99 : I don't think it's active anymore. Dev doens't reply emails or in the forums.
    I was unable to get this working in Unity 5.2.3 , and because of the lack of response, I eventually made a paypal claim and I just got my money back.
     
  7. Reaven99

    Reaven99

    Joined:
    Oct 3, 2015
    Posts:
    39
    Thanks for the reply.
    Why don't you try Unity 5.3.4?
    The asset has not been published on 5.2.3 so i gues it also has not been tested with that version.

    But thanks for the heads up, i will wait a few days to see what more responses i will get in this forum and make my decision based on that.

    Regards
     
  8. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    Because my game was done in 5.2.3, and has bugs and performance problems in Unity versions above that one.
    And in the asset store page, it says that it works in Unity 5.x .
     
  9. borrowedLadder

    borrowedLadder

    Joined:
    Feb 11, 2015
    Posts:
    21
    Could anyone please tell me if you still need a Unity Pro subscription for this asset? Or will it work with regular 5.3.4 free version?
     
  10. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    No, no pro needed...
    5.x has everything <= 4.x pro had => no pro needed.
    Of course this assumes it works at all 5.3.4. (I would have expected it to be fine bar what @BigB said above. Hopefully it's just that version with problems.)
     
  11. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    @BigB , I have replied to your email. I'm sorry of there has been some confusion, but Fluidity support was never released for that Unity version. If you have a major issuebthats preventing you from using the product with that version of Unity, I can spin up a special release for you.

    However, I don't think it's fair to write a 1 star review on the asset store for a bug on a non supported version of Unity, especially when you make no mention of that, and make it seem like the compatible versions of Unity are in fact broken.

    Also, dissuading other Unity users from Fluidity on this forum thread (@raven99 ) is equally unfair for the reasons above.

    No the asset isn't dead. Long live Fluidity.
     
  12. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I was going to report that this asset failed to render anything in 5.4.0 but at some point Unity seem to have fixed something and its working again as of 5.4.1 (and maybe an earlier 5.4 patch).

    Things are also working well in the 5.5 beta with the exception of requiring a couple of lines about Profiler to be dealt with as per this item in the 5.5 release notes:

    • Profiler: Profiler class moved from UnityEngine namespace to UnityEngine.Profiling
     
  13. BEFaughnan

    BEFaughnan

    Joined:
    Oct 4, 2013
    Posts:
    13
    Sorry if this was asked before. Can this be used to simulate physically based fluid? Moving through pipes for example. All of the examples are fire. Which is neat, just not what I need.
     
    Last edited: Sep 15, 2016
  14. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Fluidity seems to be all about fire or gases in general. Fluvio would fit you better probably.
     
  15. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Hello,
    I still cant get fluidity to render in the correct space in VR, its all drawn at a plane behind the scene. I can fix it by switiching to Orthographic camera, but then it moves a bit(bends) with the head camera movement. I can't give example scenes, NDA. Otherwise its rendering really well, just not in the right space. Thanks!
     
  16. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Hey HeadTrip, can you send me a repro project? It doesn't have to be something under NDA, infact, as minimal a repro as possible (IOW a project with as little stuff in it as possible) would be better!! I'd be happy to take a look.
     
  17. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Ok I will try that soon, what VR headset do you have or which SDK?
     
  18. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I have them all - fire at will.
     
  19. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    sent you a link to it in a conversation/PM. SteamVR/OpenVR version
    Thanks!
     
  20. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Did you get the scene? thanks!

    edit: I'll take that as a good strong maybe ;P
     
    Last edited: Nov 3, 2016
  21. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    Any luck with this? I sent you a PM with a barebones project. Thanks!
     
  22. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    I had a look today - it seems to run without issue for me. Are you sure that repro app shows the issue?

    Maybe this is a driver/gpu issue. I'm running the latest NVIDIA driver.
     
  23. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    same here... what Unity are you on? I'm on 5.4.1p4 just tried it again, draws the fluids at a fixed flat plane behind the view. What VR did you test with? Vive or Rift? its SteamVR so should work for both.
    Thanks!
     
  24. agentc0re

    agentc0re

    Joined:
    Feb 28, 2014
    Posts:
    77
    Does this asset work in Linear color space?
     
  25. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Yes it works in linear colour space.

    And the product is not dead, I've answered these several times now :)
     
  26. knife13

    knife13

    Joined:
    Jun 27, 2016
    Posts:
    8
    Hello! I just purchased the plugin from the asset store and tried out the demo scenes with the most recent version of Unity and I can't seem to get them working (see below). I checked to be sure DX11 is enabled. My laptop has a Quadro M5000M card and I'm using Nvidia Driver version 354.86
    Am I missing a setting somewhere?

    upload_2016-11-30_16-32-50.png
     
  27. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    That's odd. What version of Unity? Has this always happened, or just started happening?

    I'll try get a repro.
     
  28. knife13

    knife13

    Joined:
    Jun 27, 2016
    Posts:
    8
    I'm using Unity 5.4.3f1 in a fresh project, not seeing any errors in my console. This has always happened (I am using fluidity for the first time today). I noticed that in the User Guide it mentions that I have to attach a "VolumetricRenderer" component to the camera, but I am not seeing that in the package that was imported from the asset store.
     
    Last edited: Nov 30, 2016
  29. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    The documentation is likely a bit out of date. Can you try updating your graphics driver?

    I'm unable to reproduce this - I'm on the same version of Unity as you, also with an Nvidia graphics card.
     
  30. knife13

    knife13

    Joined:
    Jun 27, 2016
    Posts:
    8
    Yep, fixed with a driver update. My machine was using the 352.xx ODE drivers previously. Updating to the QNF 372.95 driver fixed it. Looks great now! Appreciate the quick response and thanks again for creating a great plugin!
     
  31. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Glad to hear everything is working for you!

    Thanks!
     
  32. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Based on some crude mucking around with the code by me, I'd say that the changes required to let Fluidity work with metal graphics API's using Unity 5.6 will be minimal :) Mostly just a case of changing the pragma target from 5.0 to 4.5 in the non-compute shaders, at least to get it working on macos sierra.
     
  33. nbensonleap

    nbensonleap

    Joined:
    Sep 30, 2016
    Posts:
    7
    Bought this yesterday, love the product. Unfortunately it wasn't rendering correctly for VR with a single-camera "both eye" rig (Oculus CV1). The "view position" is passed to the rendering shader via script, but the script only ever receives one OnWillRenderObject() callback for the left eye (never the right eye), which wounds up being used as the view position during the rendering pass for both eyes. The result is that the stereo convergence points for the fluids are infinitely far back, even though they play nice with the depth buffer -- looks very strange when you partially occlude your fluid with an object that does correctly render, such as a plain ol' cube.

    To fix this, I just changed a couple of functions in Fluidity.cginc to the following:

    Code (csharp):
    1.  
    2.     // must have #include "UnityCG.cginc" somewhere before this
    3.  
    4.     inline const float GetTextureToZ01( float3 posTS )  {
    5.         return UnityObjectToViewPos(posTS - float3(0.5, 0.5, 0.5)).z; // VR Fix
    6.         //return mul( _TextureToView, float4(posTS, 1) ).z;
    7.     }
    8.  
    9.     void DecodeInfo( const float3 viewPosTS, float3 viewDirTS, const float depth, out float3 near, out float3 far, out float3 direction, out uint steps ) {
    10.         float3 vrFixViewPosTS = mul(unity_WorldToObject,
    11.             float4(_WorldSpaceCameraPos.xyz, 1)).xyz + float3(0.5, 0.5, 0.5); // VR Fix
    12.  
    13.         float nearD, farD;
    14.         IntersectBox( vrFixViewPosTS, viewDirTS, nearD, farD );
    15.  
    16.         near = mad( viewDirTS, nearD, vrFixViewPosTS); // VR Fix
    17.         far  = mad( viewDirTS, farD,  vrFixViewPosTS);  // VR Fix
    18.      
    19.         const float frontZ01 = GetTextureToZ01( near );
    20.         const float backZ01  = GetTextureToZ01( far  );
    21.  
    22.         // the rest of the function is unchanged
    23.     }
    24.  
    The float(0.5, 0.5, 0.5) stuff is to account for the object-space/texture-space origin discrepancy (you pass in a matrix manually shifting the object-space origin to (0.5, 0.5, 0.5) in BaseVolume.cs). The core idea is that Unity stores the correct camera position in the _WorldSpaceCameraPos global whenever it's rendering a camera, so utilizing this instead of a script-passed view position guarantees view position correctness - even when Unity does magic double-eye VR rendering.

    Unfortunately, this does introduces a dependency on UnityCG.cginc, but that seems benign to me since it is a Unity asset store asset after all. I was unable to introduce fixes on the scripting side for this; try as I might, I would never get OnWillRenderObject() callbacks for each eye. So this is as far as I know the only way the fix the problem, but I'll leave the rest to your perusal.
     
    elbows likes this.
  34. ivangarciafilho

    ivangarciafilho

    Joined:
    Sep 2, 2015
    Posts:
    27
    Hi! i have the same problem while trying to use Fluidity on Unity 5.5 and it's working fine on unity 5.4, no errors on console what should i do ? Nvidia GTX 1070 driver version 376
     
  35. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    Love the effects, but I am a bit concerned with performance, would vulcan make this run faster?
     
  36. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672

    I never got an email from you mate, and you replied in the asset store 6 months after I emailed you :)
    In the asset store says that it works with Unity 5.x , so I don´t get it why it would not work with my version.
    Anyways, It seems you are answering people now, and I don´t want to hurt you business, so I´m deleting the review from the asset store.
    Good luck.
     
    x4000 likes this.
  37. Aiden83

    Aiden83

    Joined:
    Dec 12, 2016
    Posts:
    6
    1) Does Fluidity able to render different colored fluids in same volume so different fluids with different colors can interact with each other?

    For example: green gas vs red gas vs fire?

    2) In 2013, you mentioned working on liquid and were near to a release of a demo of liquid (with reflection/refraction and foam) in fluidity. Is this still something you are working one?

    3) If gravity is enabled in a fluidity volume, will the fluid go downward, collides with itself and be able to hit the floor?

    4) Is there a way to make very simple characters (billboards in 3D world) collides with fluid (with sphere or box collider)? Will the fluid be affected by such characters? Could the characters be affected by fluid flow?

    Thanks for your answers. I want to purchase this asset asap if it can do those things. Especially 1/3/4
     
  38. Aiden83

    Aiden83

    Joined:
    Dec 12, 2016
    Posts:
    6
    Is it dead?
     
    x4000 likes this.
  39. dwaldrum

    dwaldrum

    Joined:
    Jun 20, 2015
    Posts:
    48
    Having issues reproducing the flamethrower effect in your bots tutorial.

    I've followed everything exactly as you did it, and it did not turn out even close to the video, in fact it was just a big white blob.

    I tried everything I could to get it to work and I ended up getting a bit closer, but still nothing close to the video. I bought fluidity specifically for the flamethrower effect and would appreciate any help getting that working. I've sent an email but no response yet.
     
  40. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    FLUIDITY IS DEPRECATED??
    What happened? This plugin is awesome!
     
    asemenov and ftejada like this.
  41. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Is there some alternative package?
     
  42. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    man, that's a shame...

    @sipon someone correct me if I'm wrong, but no, I seriously doubt there's anything remotely like it.
     
    atomicjoe likes this.
  43. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    no..... :(
    on the good side its still working fine on unity 2017.1.1f1
    i really hope the creator come back and keep working on fluidity
     
  44. THE2FUN

    THE2FUN

    Joined:
    Aug 25, 2015
    Posts:
    63
    How can i reach this package? This package is awesome what is going on.
     
  45. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    If "reach" means buy, then you can't. The Asset has been deprecated for some reason (maybe it contained some .js files) and the Dev is silent since December 2016.
     
  46. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    What do you mean? is it a problem to have unityscript code in it?
     
  47. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    See this blog post (under "How will it happen?") that explains everything.
     
    atomicjoe likes this.
  48. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    In this case js is not the reason this asset was deprecated (and there is no use of unityscript in this asset). It happened a while ago, and I assumed the author didnt want to sell or support it any longer.
     
  49. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    But he still sells other assets.
    That's strange.
    His website is offline too.
     
  50. am_salperton

    am_salperton

    Joined:
    Mar 6, 2017
    Posts:
    10
    Why did this happen? Should piracy in these circumstances be condoned?

    Evil like this should be illegal!