Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fluvio - Fluid Dynamics for Unity

Discussion in 'Assets and Asset Store' started by lilymontoute, Jul 3, 2011.

  1. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi Hoop22,

    It sounds like you may want to adjust the lifetime property on the fluid particle system. You can set it to a very high value, and particles will no longer disappear unless destroyed through other means.
     
  2. Edu_Lucats

    Edu_Lucats

    Joined:
    Jan 5, 2016
    Posts:
    1
    Hi! Sorry to bring this post to life, but I´m using Fluvio and it works great on Pc and Mac, but when I tried to run in the iPad the fluid render as a pink square (as if the material was missing) ... There´s something I have to do to make it work on ios?

    I´m using unity 5.3 and iOs 8.2 (Ipad 3)

    Congratulations on the app btw ... it´s great!

    Thanks in advance!
     
  3. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi Edu_Lucats,

    Thanks! As for the issue, we just got your incoming ticket and we're investigating. Hang tight!
     
  4. Targaryen

    Targaryen

    Joined:
    Feb 2, 2013
    Posts:
    4
    Hi!!

    I'm really interested in this module for Unity, but it's not very clear the full capabilities of it; So my question is: Could i simulate with this module how the hull of a ship reacts to the water??

    I mean, can i create a water fluid that interacts with a moving 3D rigidbody and applies a resistance depending on the shape of the rigidbody??. And if i add a sail to the ship, can this module create wind that interacts with the sail just like in a real ship, making it wave, and swell??

    Thanks!
     
  5. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi Targaryen!

    So in this case, it depends on the resolution that you need for simulation. If you're looking at something similar to 3D ocean simulation or aerodynamic simulation, I wouldn't really recommend Fluvio (or any particle-based simulation) to do this in realtime.

    For example, with ocean simulation, there are better algorithms out there that handle only the surface behavior (which is what is important for a ship hull), whereas Fluvio would need to simulate the entire depth of the water volume. The same goes for wind simulation, where sails are mostly concerned with the overall direction and amplitude of the wind, rather than a complex set of aerodynamic forces.

    Where Fluvio shines is with any particle-based simulation. With regards to 3D ocean and air simulation, that would be things similar to:
    • A boat's wake
    • Foam effects on top of waves
    • Filling smaller volumes with water (for example, a boat taking on water)
    • Accurately simulating the motion of particles through the air - using a simplified model like Unity's default wind for the overall wind direction and force, but simulating particles of debris as a fluid, for a faster method of self-collision between these objects
    Let me know if that provides some insight :)
     
    Targaryen likes this.
  6. Targaryen

    Targaryen

    Joined:
    Feb 2, 2013
    Posts:
    4
    Sure it's just the answer i needed!

    Thank you very much!!
     
  7. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Going back in time ... but how do i 'downsample/pointfilter' a particle/fluid ? ;)
     
  8. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hey PeteLaChatte!

    You can find the option to turn on point filtering under the Renderer/Fluid Effect module, which can be found on the particle system:


    After that, change the downsampling factor in the fluid's material (you will need to make a new material if you're using the default material). You can adjust it to any level you'd like to control how pixelated the fluid is:


    I recommend changing alpha cutoff to 1 as well, but that's optional.

    Let me know if that works for you. Would also love to see what you end up with - here's what I just made!
     
    Last edited: Feb 20, 2016
  9. wawdmkf

    wawdmkf

    Joined:
    Mar 10, 2015
    Posts:
    1

    Attached Files:

  10. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi wawdmkf,

    Sorry about that! We discovered a bug that broke the _Three_ example (and some projects with multiple fluid effects) with the last release. We have fixed it internally, and it should go out soon. In the meantime, this example will work with standard particle shaders (or the shader will work on single objects, rather than all of the fluids).
     
  11. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    Why do the Fluvio fluid particles show up through all other objects? What am I missing here? FluvioXray.png
     
  12. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi tzvier,

    We currently have a known issue with orthographic cameras not calculating the correct depth. I posted a workaround on our community Slack group, and we've fixed this bug internally for the next release.
     
  13. tzvier

    tzvier

    Joined:
    May 20, 2010
    Posts:
    355
    It's a perspective camera though.
     
  14. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Can you try adjusting the "Shadow/Depth Alpha Cutoff" value in the material (you'll need to make a new material if you're using the default)? Checking through the changelog, it seems there was a second issue causing this depth problem as well. This has also been fixed (in fact, the fluid effect has gotten almost a full rewrite).

    Let me know if that works for you. If not, go ahead and open a request here and we can investigate further.
     
    CWTeebs likes this.
  15. CWTeebs

    CWTeebs

    Joined:
    Jan 21, 2016
    Posts:
    5
    Hi Josh,

    Would fluvio be able to simulate flow through a network of pipes?
     
  16. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi CWTeebs,

    Thanks for the interest! Generally, that should work fine - we've had plenty of customers use Fluvio for this. I encourage you to try out Fluvio Free to see if it fits your specific use case.
     
  17. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,240
    I'm trying to create an effect of blood oozing and dripping out of an incision. I've got the oozing working, mostly, but the not the dripping -- when the droplets break away from the globule, they fall individually and rapidly. How can I get them to stay congealed and slowly slide down the skin?

    And for the oozing--it works, but too modular--is there a way to get it to look more like a single oozing mass and not a collection of small spheres?
     

    Attached Files:

  18. sheng123

    sheng123

    Joined:
    May 25, 2016
    Posts:
    3
    Hi!!

    Can i use Fluvio 2.1.0 Standard on unity5.3.

    Thanks in advance!
     
  19. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi sheng123,

    Unfortunately no, we haven't supported Fluvio 2.x for well over a year now. You will need to update to the latest release.
     
  20. susanne_moertel

    susanne_moertel

    Joined:
    May 27, 2016
    Posts:
    2
    Hello eyeryone.
    does anyone know if it is possible to fill a cup with Fluvio particles? I managed to fill it as far as the ground of the cup gets covered with the fluid without leaking of particles but the filling level doesn't rise, regardless of the amount of particles inside the cup. If anyone has an idea or some experience how I can resolve this issue, please let me know!
     
  21. susanne_moertel

    susanne_moertel

    Joined:
    May 27, 2016
    Posts:
    2
    I have just another question.
    This issue was already posted by tzvier. My fluid also always shows up in front of my object which is really annoying when you want to fill a cup. I already tried to adjust the "Shadow/Depth Alpha Cutoff", but that didn't help. The problem is the Fluid Effect/Fluid Effect Shader. If I turn the Fluid Effect off or change the shader, this doesn't happen anymore and even with gases, this problem doesn't exist. Is there any way to hide a fluid behind an object?
     
  22. sheng123

    sheng123

    Joined:
    May 25, 2016
    Posts:
    3
    Thanks very much!
     
  23. sheng123

    sheng123

    Joined:
    May 25, 2016
    Posts:
    3
    And,I have just another question,if I want to create an effect of blood in the surgery,Can I use this plugin to simulate the bleed effect.
     
  24. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Sorry about the slow response on this (I missed it!) I would take a look at either adjusting the particle size or material (the normal map or alpha threshold is typically to blame for "blobbiness").

    Sure! Blood is a fairly common request, and definitely a supported use case of Fluvio.
     
  25. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    is there color blending in fluvio.

    im trying to make it as similar to LiquidFun as possible.
     
  26. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi luniac,

    We don't have LiquidFun-style color blending at the moment (where a red and a blue fluid could mix into a purple fluid), however we do have a Fluid Mixer plugin that may do what you need (we use it to turn water + lava into rock and steam in the Three example scene).

    If you're looking for just color variation, we do have a Color by Density plugin that allows for color variation based on the density of a fluid.
     
  27. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    614
    ok thanks.

    Do you have any tips to make the fluid feel more... fluidy like liquid fun. Right now it looks kind of blobby and chunky.

    For starters all i'm trying to do is fill a cup with water, but i can't get a good effect. In liquidfun its really simple to just create a bunch of liquid particles that don't tax performance much and they already behave in a very watery manner, with splashing and whatnot.

    But with fluvio it just feels more sluggish and I start to get fps issues in editor very quickly, and im trying to do this on mobile.
    I'm struggling to play with the fluid settings to get a good water flow that fills a cup. Instead the cup seems to fill up very very slowly and the performance gets worse very fast.

    Maybe fluvio is just not good for this use case?
     
  28. alvaro-em

    alvaro-em

    Joined:
    Feb 23, 2012
    Posts:
    77
    Hello! I am currently trying to set up a fluid material, but every time I assign it to the renderer, it makes a copy of the material in real time, so changing the material has no effect in the particle system How can I avoid this behaviour and what is it intended for?

    Thank you!
     
  29. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Responded to this on Slack, but I'll paste it below as well:

    We have an update in the works with greatly improved mobile performance (and better performance on older desktops that don't support GPU simulation). No ETA just yet, but we're hard at work there!We've seen some successful mobile projects using Fluvio - they tend to set a higher timestep than on desktop, use a few hundred or thousand particles (< 2000), and simpler shaders (rather than the fluid effect shader).

    Hi alvaro.em,

    This was done to workaround several issues with multiple fluids. We've since migrated the fluid effect to use command buffers and removed the need for copying the material, so the next update will not have this behavior.

    You may be able to work around the current behavior by manually modifying the copied material through a script when the original material is modified.
     
  30. Deleted User

    Deleted User

    Guest

    Hello,

    Again, I am here for simulating bleeding affects. I wanted to ask that is there a method to change emission from a script? And also I would like to make blood less transparent. Can fellow blood creators share their best properties maybe? Or a blood tutorial would be nice thinksquirrel. Thanks in advance.
     
  31. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    How is compatibility with Unity 5.4 coming along?
     
  32. diomepa

    diomepa

    Joined:
    Aug 9, 2016
    Posts:
    1
    For some reason when using orthographic camera this stuff happens. Seems to work just fine with perspective camera.

    It seems to be somewhat related with HDR, but even when I disable HDR for the camera and the tone-mapper, I have the same issue.

    So the only way to use this, is either use perspective camera, or turn off anti-aliasing.

    Yes I know you can't have ortho cam and both HDR and anti aliasing, but the question is can I make this stuff work without HDR, or not.
     

    Attached Files:

  33. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    We're working on it! We're aware of an issue with the inspector in 5.4 and are actively working on a fix - expect a compatibility hotfix very soon.

    EDIT: This has been fixed!

    Hi diomepa,

    This is a known issue - we have some more info and a workaround here:

    https://support.thinksquirrel.com/hc/en-us/articles/221187708-Upside-down-fluids
     
    Last edited: Oct 28, 2016
  34. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    An announcement:

    The price of the standard edition of Fluvio has been lowered to $49! This version offers all the features of Fluvio Free, but without a 3,000 particle limitation.

    Additionally, support and updates for Fluvio Pro have been discontinued as of Oct. 28, 2016. While Fluvio Pro is no longer available for purchase, earlier releases of Fluvio Pro can still be used. Fluvio Pro users also have the option to obtain a standard Fluvio license free of charge through the Asset Store.

    The standard edition does not include full source code access, but source code licensing is available. Please contact us and we’ll be in touch shortly.

    For more information about these changes (and why), see our FAQ.

    We have a bunch of announcements for Fluvio coming next week at Unite LA. If you're at the conference, stop by booth #18 to check out a Fluvio demo and say hi!
     
  35. The_Oathman

    The_Oathman

    Joined:
    Jul 9, 2016
    Posts:
    6
    Thank you for this awesome tool. I have been using Fluvio for more than a week now, experimenting with different type of fluids, running it on Android and so on. So far, every thing has been working so smoothly. I am very satisfied, and I couldn't be any happier.

    However, I have encountered some bugs, even though I managed to worked around them, but I thought it would be better to share them here.

    1- When using cube or ellipsoid effector on Decay type, I noticed that I will have to wait about 18 second from the moment the scene loaded to get the Decay effect on my fluid. If the fluid interacted with the cube/ellipsoid effector before the 18 second, Instead of killing particles, the effector will causes fluid to scatter all around.

    2- When I make a Gameobject that have a fluid collider 2d component to it a child to another game object, the collider resolution will increase rapidly with no change to the value resolution. Even if i used the lowest collider resolution which is 1, the resolution would still be very high.

    I don't know of these are bugs or it was just me.

    Thank you
     
  36. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi Othman,

    Thank you! Great to hear you're enjoying Fluvio. Just shared that bit with the team :)

    Also thanks for the report - We aren't aware of either of these, but they do sound like bugs. Logged both for QA.

    By default, the effector will scatter particles due to the vorticity property being set. Lowering that to zero should reduce turbulence significantly. We're looking at re-evaluating that default setting. We'll investigate the decay delay - haven't seen that one yet.

    For the collider issue, is the parent object scaled at all? One workaround (if the parent is a fluid and you're grouping them together) may be to use the Fluid Group component instead of parenting the collider.
     
  37. maruska

    maruska

    Joined:
    Jun 1, 2013
    Posts:
    9
    I just downloaded Fluvio Free and I get this error message:

    [Fluvio] (FluidEffect): Current platform does not support the replacement shader.
    UnityEngine.Debug:LogError(Object, Object)
    Thinksquirrel.Fluvio.FluvioDebug:LogError(Object, Object)
    Thinksquirrel.Fluvio.FluidEffect:OnEnable()

    I'm using Unity 5.5.0f3 on MacOS 10.12.2 with an AMD Radeon Pro 460

    Any ideas?
     
  38. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi Maruska,

    We're aware of this issue and currently working on a compatibility update for Unity 5.5. We hope to have this released as soon as possible. For now, we recommend using Unity 5.4 until the update has been released.
     
    maruska likes this.
  39. sunfire91

    sunfire91

    Joined:
    Dec 3, 2014
    Posts:
    3
    Hi! I'm creating a 2D project but the liquid is always rendered behind my sprites no mater which sorting layer I put. (No problem with the gas generator).
    And second, whenever I add a particle system (fluvio or unity) on top of a fluvio particle system. Crazy flickering and stuff appear on my Scene view (Game view is fine though).
     
  40. Dxaxn

    Dxaxn

    Joined:
    Oct 2, 2015
    Posts:
    1
    Hi, I am currently doing a simulation with the htc vive. I would like to ask if there is a proper configuration for the fluid effect/renderer for the vive as I'm seeing double ( the single fluid object seems to be offset from one another) through the vive.
     
  41. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi Dxaxn, thanks for checking out Fluvio! We're still working on improved Vive support for the fluid effect so I don't have any recommendations just yet. However, we do support VR with standard particle shaders in the interim.
     
  42. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi wavepsi,

    Looks like this one got answered through Slack already but I'll go ahead and add it here for reference:

    The liquid rendering behind the sprites is a known limitation. We render behind other transparent objects and in front of opaque objects. Sorry about that. We're working on a fix but it's a pretty complex problem. The flickering is also a known issue but will be resolved with the next release, scheduled to happen soon. This glitch is only visible in live edit mode and will not occur within play mode or within a built application.
     
  43. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hi all,

    The first update of the 2017 is a huge one. Fluvio 3.1 contains several new features and fixes including support for texture-based collisions, new foam simulation, Android compute support, and an all-new fluid effect. Under the hood improvements offer much lower overhead for better mobile and CPU performance. Compatibility issues for Unity 5.4 and 5.5 have been resolved and many other bugs have been squashed.

    We've also introduced a new support site for Fluvio at support.getfluv.io. We're still migrating our old support system, but you should be able to find up to date information there.

    Many of the features and fixes were suggested and reported by our Slack community which you can join here.

    Other bug fixes in this release:
    • Various compatibility updates for Unity 5.4 and 5.5
    • Fixed an issue where text did not show up correctly while Live Edit was disabled
    • Fixed issues causing some mobile builds to fail
    • Fixed an issue with AMD GPUs under OpenCL
    • Fixed an issue that could cause a fluid to become disabled
    • Fixed various minor issues with FluvioMotion (motion extrapolation)
    • Many general improvements to simulation stability
     
    Last edited: Jan 17, 2017
  44. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    Hey guys, I just checked your plugin in VR with HTC vive. And it doesnt work) i mean its not properly renders.
    Are you planning VR support?
     
  45. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Hey Horz,

    Fluvio does work in VR, though there are a few issues we're working on at the moment. Please see our support article here with links to the current issues and workarounds: https://support.getfluv.io/article/251-does-fluvio-work-with-vr

    Hope this helps! Thanks,
     
  46. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    >As a workaround, using two Unity cameras with a left and right target eye (instead of a single camera set to "Both") will resolve the issue.
    That's weird / I'm seeing it first time actually. I'm using the default SteamVR plugin. So I have to setup 2 cameras for each eye? i'll have to rewrite steam vr scripts - i doubt its easy or even possible to do.
     
  47. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Hi again,

    You’d need 1 camera for each eye (unless there’s something specific to your project that requires more). We are still looking into the issue ourselves so please check back with us in the future. We’re also happy to help if you’re having trouble with the workaround. You can reach our support team at https://support.getfluv.io/.
     
  48. PeterFerrarotto

    PeterFerrarotto

    Joined:
    Feb 25, 2017
    Posts:
    4
    I have a quick question about liquid behavior when there is more than one liquid in the scene. (This problem exists in the "3" collider example, as well.)

    This issue results in the scene being mirrored at a certain point, meaning that you lose half of the scene to this rendering issue as seen below. Is there any way to resolve this, or do I have to limit my fluids to one at a time? Thanks!
    2017-02-25.png
     
  49. PeterFerrarotto

    PeterFerrarotto

    Joined:
    Feb 25, 2017
    Posts:
    4

    Here's something interesting:
    I had the camera at z = -10. If I move the spot plate (the big rectangle in the center) in the positive z-direction, and also the camera, the reflection issue stops entirely. So it seems as if everything reflects on the z-axis.
     
  50. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hey Peter,

    Thanks for getting in touch - this one's a known issue with our new effect shader that we just fixed (it'll be out very soon for the next release). In the meantime, we have a workaround that should help in the majority of cases:

    In the Hidden-FluidEffectComposite.shader file, replace the following:

    Code (csharp):
    1. // Clip effect based on depth
    2. clip(sceneDepth - _FluidDepth);
    3.  
    4. // Get fluid color and alpha
    5. float4 color = tex2D(_FluidTex, i.uv2) * float4(_FluidTint.rgb,1);
    6. color.a = invlerp(min(_FluidThreshold,.999), 1, color.a);
    with this:

    Code (csharp):
    1. // Get fluid color and alpha
    2. float4 color = tex2D(_FluidTex, i.uv2) * float4(_FluidTint.rgb,1);
    3. color.a = invlerp(min(_FluidThreshold,.999), 1, color.a);
    4.  
    5. // Clip effect based on depth
    6. if (any(sceneDepth - _FluidDepth < 0)) color.a = 0;
    Let me know if that helps!