Search Unity

Fluvio - Fluid Dynamics for Unity

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

  1. PeterFerrarotto

    PeterFerrarotto

    Joined:
    Feb 25, 2017
    Posts:
    4
    Thanks for the quick response! The issue is gone.

    However, I have one more issue that I need to bring up. My project needs to be built to WebGL, per requirements for an online lab course. However, when I build a project with Fluvio for WebGL, it gives the following error:

    Assets/Fluvio/_Main/PlatformSource/Thinksquirrel/Fluvio/Internal/FluvioRuntimeHelper.cs(116,13): error CS0103: The name `UpdateThreads' does not exist in the current context

    And this error will persist until I build it on the option "PC, Mac, Linux & Standalone" - meaning that it will stop me from entering play mode after I attempt a WebGL build.

    Is this simply an issue with how WebGL handles dll files, or is this something I can fix by altering settings for Fluvio?

    Thanks,

    Peter
     
  2. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hm, I think this is a new one for us here (WebGL should work without any adjustments; albeit with worse performance due to platform limitations.) Can you get in touch with us through https://support.getfluv.io/contact so that we can take a closer look?

    Thanks!
     
    PeterFerrarotto likes this.
  3. PeterFerrarotto

    PeterFerrarotto

    Joined:
    Feb 25, 2017
    Posts:
    4
    I've reported the issue through the link, but just so that it's available for others to see, I'll post the specifications surrounding this issue:

    I am using Fluvio Free, and Unity 5.5.1f1 (I mistakenly called it 5.55f in my report, please disregard that small mistake.)
     
  4. Valdmer

    Valdmer

    Joined:
    Feb 28, 2017
    Posts:
    1
    Project: Fluvio Examples: Three
    Unity: 5.5.1f1 64bit

    Example works fine, however in edit mode when I select any element in the Fluids object - Unity crashes.
    I'm getting unauthorized access exception 000000. If I move object outside of the FluidGroup or remove the reference from FluidGroup it works fine. I believe something becomes nil because of limitations of the edit mode simulation but FluidGroup code tries to access it, however I'm very new to Unity and Fluvio and don't know where to look next. Please let me know if I'm on the right track and what should I check?
     
  5. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Thanks for letting us know about this. We have been able to reproduce the error and are working on a fix. As a workaround in the meantime, disabling Live Edit under Preferences > Fluvio will allow you to use the example without the crash. Sorry for the trouble! We'll be in touch shortly.
     
  6. Deleted User

    Deleted User

    Guest

    A while back someone asked about counting particles destroyed by an effector:

    Fluvio - Fluid Dynamics for Unity

    Was there a way to do this, that anybody found? I looked at the API and manual, but nothing is coming to me.

    Effectively, I want to transfer particles from one system to another. I was thinking I could destroy them in one, and then turn on the other system long enough to emit the same number, to achieve this effect.
     
  7. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Hey there - I just replied to a support ticket that was probably you, but replying here as well:

    Accomplishing what you’ve described would probably require a custom plugin which can be created via: Assets > Create > Fluvio > Fluid Particle Plugin

    I recommend taking a look at the Fluid Mixer sample plugin found under [Fluvio] Fluid Plugins as it does something similar in order to emit new particles from old ones. We provide the source for this plugin under FluidMixer.cs.

    Hope this helps!
     
    Deleted User likes this.
  8. Deleted User

    Deleted User

    Guest

    Yep, that was me :) This looks like a great start, thanks for the help!
     
  9. lilymontoute

    lilymontoute

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

    Time for another update! On the heels of our big January update, Fluvio 3.2 introduces VR support for the fluid effect. Currently in preview, VR support will be expanded in future releases.

    Additional rendering improvements include a soft particle factor for cleaner intersections with opaque objects, depth blur, and refraction:



    Finally, the fluid effect will once again roughly sort with opaque and transparent objects (pre-3.1 behavior). The fixed depth behavior introduced in 3.1, an optimization for 2D scenes, can now be accessed via the new Depth Mode property. Depth calculation can be turned off completely by setting Depth Mode to None.

    Additional fixes:
    • Fixed an error causing WebGL builds to fail
    • Minor compatibility updates to Fluvio Examples and Fluvio Selections projects
    • General bug fixes and improvements
     
  10. fl4res

    fl4res

    Joined:
    Sep 6, 2016
    Posts:
    4
    Hi,

    I have been using fluvio free and I am trying to store a fluid in a beaker but sadly i cannot seem to do that even if i define the appropriate colliders. Any help would be really appreciated as I am fairly to new fluids.

    Also, I cannot seem to find any tutorials for fluvio especially for the new editions.
     
  11. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31

    Hi there,

    I recommend taking a look at our reference for filling volumes with liquid: https://support.getfluv.io/article/184-filling-volumes-with-liquid. Also, from that link, you can click on the “Getting Started” category on the left side for links to more support articles that will walk you through getting started with Fluvio.

    I hope this helps. Please don’t hesitate to reach back out if this doesn’t resolve any issues you run into.

    Thanks
     
  12. fl4res

    fl4res

    Joined:
    Sep 6, 2016
    Posts:
    4
    Thanks for the quick reply! I followed the link you mentioned and looked at the other links on the left side. Even after doing all the steps correctly I still cannot seem to store the fluid in the beaker or make the fluid accumulate in the beaker. Is there something I am missing or do I need to write an appropriate script for it?
     
  13. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Sorry to hear you're still having trouble. If you can contact our support team directly, we can look into this further for you.

    Please head to https://support.getfluv.io, click ‘Contact’ in the upper right corner, and provide as much information as possible including a small example project, screenshots, or a screen recording of what you have so far.

    Once our support team receives this, we'll take a closer look and get back to you via email. Thanks in advance for this information and sorry for the trouble.
     
  14. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
  15. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    has anyone got the fountain demo to run a 60 fps?
     
  16. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455

    what is the fps here?
     
  17. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Sorry for the delay, here. I took a look at our fountains example. By default they're targeting 30 fps on mid-range devices and would need some simplification to run faster. Let me know if there's anything else I can help with.

    Thanks.
     
  18. crani

    crani

    Joined:
    Jun 28, 2013
    Posts:
    4
    Hi, is there a way to create a collision between a dynamically created mesh and Fluvio particles?
    I know this was possible in an very early verion but I can not find a way with the new fluvio colliders. Is this still possible?
     
  19. lilymontoute

    lilymontoute

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

    In short, this is possible but would require a bit of extra work. While fluid colliders have a ForceColliderUpdate method that could be used, this may be too slow depending on the size and shape of your mesh. I would however give this a try first as it's the simplest method.

    Alternatively, if you know more about your mesh and keep track of its volume/shell, you can potentially skip the expensive voxelization step here. You could make a class that inherits from FluidColliderBase and supply your own collision points that way by overriding the Voxelize method (using AddCollisionPoint to add collider points).

    If the mesh changes often, I recommend setting your fluid collider to kinematic. Static collider changes cause all other static colliders to rebuild/re-upload to the GPU, which can be a very expensive operation.

    Let me know if this helps!
     
  20. applicattura

    applicattura

    Joined:
    Mar 28, 2017
    Posts:
    16
    Hi thinkSquirrel,
    I have just downloaded the fluvio free extensions and tried to check the 2d examples on the device. I made some modifications. I left only the water fluid and changed it into point+downsampling to achieve a pixel fluid effect. I also made only 100 particles. Tried to test it on the device (iphone 6) but the results are 0fps :> Is there anything I should make to run it smooth on the device or it isn't efficient at all on ios? Thanks for any help
     
  21. thinksquirrel_julie

    thinksquirrel_julie

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

    Thanks for reaching out and sorry for the delay. I recommend taking a look at our performance considerations support article and seeing if any of the suggestions there help with this.

    Please let me know if there's anything else I can help with.

    Thanks
     
  22. MelvinEng

    MelvinEng

    Joined:
    Jan 11, 2016
    Posts:
    14
    Hi there ThinkSquirrel!

    Really glad that you're looking into the simulation of deformable solids.
    I was wondering if fracturable/breakable solids(eg. cracking glass, splintering wood, tearing cloth, slicing jelly etc) might be on the cards next?

    Cheers :)
     
  23. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Hey there!

    We’ve been looking into expanding our physics engine to encompass solids, deformables, and more. At this time, however, we're still in the research phase. We don't have an official announcement or an ETA for this yet. Feel free to check in with our roadmap, which we will update as more info becomes available.

    Thanks for your interest and let me know if I can help further.
     
  24. sebou42240

    sebou42240

    Joined:
    Aug 21, 2015
    Posts:
    19
  25. thinksquirrel_julie

    thinksquirrel_julie

    Joined:
    Oct 26, 2016
    Posts:
    31
    Sorry to hear you’re having trouble. If you can submit a support ticket to us with some specific information about the problem (including steps you’ve taken when using Fluvio and if possible screenshots/recordings of the problem) we’ll be happy to take a look and see if we can help.

    You can submit a support ticket here by clicking “Contact” in the upper right corner.
     
  26. GenericBox

    GenericBox

    Joined:
    Oct 23, 2015
    Posts:
    1
    I followed the link and read the article on filling volumes but I also cannot get it to work, fluid particles just flow straight through my fill container. Did anyone get this to work?
     
  27. JaseofBase

    JaseofBase

    Joined:
    Jun 12, 2017
    Posts:
    14
    This looks ace! I've downloaded the Free version to check and play about to see if it will suit my project before buying. Quick question, how do you achieve the pixelart downsampled look?

    I'm missing something, I don't see a downsampling effect anywhere. Any chance you could give a quick rundown of how to achieve this?

    Many thanks! :)
     
    lilymontoute likes this.
  28. lilymontoute

    lilymontoute

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

    Sorry to hear about this issue. Can you get in touch with us through support with a bit more info? You can submit a support ticket here by clicking “Contact” in the upper right corner.

    Awesome, glad you're enjoying it! The pixel art effect can be done by setting the filter mode to Point in the fluid settings, followed by changing the Downsample factor property in the fluid's material. If you're using the default fluid material, you'll want to create a separate one under Assets > Create > Material with a fluid effect shader.

    More info here: https://support.getfluv.io/article/247-making-a-pixellated-fluid
     
    Last edited: Aug 14, 2017
  29. Peichan

    Peichan

    Joined:
    Jan 26, 2017
    Posts:
    5
    Hi there,

    I'm having a very difficult time actually working with the fluid and getting it what I want to do. What I'm trying to do would be something that looks like a plasma-y liquid that jets out, kind of like if the liquid from Portal 2 were in a small squirt gun. I can make a decent(ish) large liquid stream and control the gravity and which way it points, unfortunately when I try to size it properly the effect is no good.

    The color suddenly becomes transparent and no amount of changing the color, density, viscosity etc helps me. The particle size is way too huge and at a certain point when I start sizing it down, the smaller size no longer affects what renders on the screen. Below and left is the giant but ok version (you can't tell from this angle but it has the arc that one would expect when shooting a liquid out with some propulsion. Below right (sorry you can't really tell I tried several screenshots) is what happens when I shrink the emitter and the particle size. The liquid starts to spray, the fluid is very not dense no matter what settings I change, and a lot of the settings don't behave as expected when changed (I expected upping the emission to make more particles like it regularly would in shuriken, instead my particles started shooting all over the place like a sprinkler system. The same thing happened when I upped the viscosity and I'm not sure why that would be the result of having a more viscous fluid). I'm unsure if it's a bug I'm working against, or if there's a way to resize the system on a small scale and I just don't know how to do it (I've tried pouring over the manual but get a lot of stuff like "density: controls the density", without explanations of how to use those modules for the desired effect or how they work with each other. I've seen the sample effects; Fluvio can do some really cool stuff, I'm just having trouble getting it to work for me. Little help?
    upload_2017-8-15_17-25-53.png upload_2017-8-15_17-27-24.png
     
  30. lilymontoute

    lilymontoute

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

    Thanks for getting in touch - your project sounds pretty cool!

    Getting things like scale correctly is pretty tricky, we agree - we're trying to improve on both our documentation and tutorial content to help make the process easier, as well as gather feedback from users on how we could improve the process itself. From the screenshots above, it sounds like you'll want to tweak smoothing distance, simulation scale, and maybe a few render settings as well. If possible, could you reach out to our support team (click here, then click “Contact” in the upper right corner)? We'd be glad to offer more specific help to work through scaling issues and get the desired effect.
     
  31. thinksquirrel_julie

    thinksquirrel_julie

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

    Just a quick note to announce that today’s new release of Fluvio introduces Unity 2017 support.

    A few other notable additions include improved mobile performance, an unlit fluid shader, and fluid effector updates.

    Additional bug fixes and compatibility updates are also included.

    Additionally, our hearts go out to those affected by recent storms in the Caribbean and Southeastern United States. To show our support, 100% of Fluvio proceeds in the month of September 2017, including upgrades and Fluvio Selections purchases, will be donated to charities involved with hurricane relief efforts. Individual charities will be selected at the end of the month in order to best direct these funds to people in need.

    Changelog:
    • Full support for Unity 2017.1
    • Fluvio now installs silently and automatically when the package is extracted. The “Install for Javascript” option has been deprecated
    • FluidDebug now uses a UI Text component instead of GUIText, with the ability to override the component used
    • Fixed an issue with the offset of ellipsoid effectors being incorrect
    • Fixed an issue causing the generation of concave fluid colliders, like cups or beakers, to fail or crash
    • Most mobile devices that support compute shaders should now work with Fluvio’s GPU compute support
    • Added support for Metal compute (macOS, iOS)
    • Significant mobile performance improvements in most scenarios
    • Added a new Unlit fluid shader, which can be found under Fluvio > Fluid Effect (Unlit)
    • Added an API to fluid effectors to determine how many particles are in an effector at any given point. They can be found under:
    • Additional minor bug fixes
    Thanks,
     
  32. thinksquirrel_julie

    thinksquirrel_julie

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

    We’ve decided to extend our donation of 100% of Fluvio proceeds to charities involved with hurricane relief efforts through the end of this month. Individual charities will be selected at the end of October, 2017.

    Thanks,
     
    Nigey and lilymontoute like this.
  33. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Hi Guys,

    Firstly amazing thing to put out there for free, thank you! Quick bug to chomp.. None of the editor menu's are working on my version. It was working perfectly before (2017.1), but I installed SteamVR plugin into Unity and now although the particles all work perfectly, the Pfx Menu is not there. It just shows the class attached as a component. The welcome screen is black as well, saying that it can't find the LoadImage method. Any ideas?

    Thanks!
     
  34. lilymontoute

    lilymontoute

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

    Sorry to hear about the issue! This is typically due to the wrong Fluvio package being downloaded from the Asset Store - it can be stubborn at times with this as well. If possible, can you try the following:

    * Remove the Fluvio folder from your project (you can keep Fluvio-ProjectSettings)
    * Delete the Fluvio unitypackage manually - under Windows, it's under C:\Users\<username>\AppData\Roaming\Unity\Asset Store(-5.x), and on Mac, it's under ~/Library/Unity/Asset\ Store(-5.x)
    * Re-download and import the latest version of Fluvio (make sure you're in Unity 2017.1 when doing so)
    * If you get any API updater messages, go ahead and run those.

    Let me know if that fixes the problem. In the future, we're looking at how to better serve updates so that they don't break between Unity versions as well.

    Thanks!
     
    Nigey likes this.
  35. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Works perfectly! Thank you! Awesome support :).
     
    lilymontoute likes this.
  36. tsuntsunlive

    tsuntsunlive

    Joined:
    Sep 7, 2017
    Posts:
    1
    Hello thinksquirrel, may i know what code should i use to remove a fluid group when i click on play mode?
     
  37. thinksquirrel_julie

    thinksquirrel_julie

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

    If there’s a fluid group component, destroying the component using Unity’s Object.Destroy or Object.DestroyImmediate will remove it. If the fluids are parented together, unparenting the sub fluid will remove the group. You can also add or remove individual components. Check out the docs for more info and let me know if there's anything else I can help with.

    Thanks,
     
  38. ChrisCF

    ChrisCF

    Joined:
    Dec 23, 2014
    Posts:
    5
    Seems to be broken in 2017.2.0f3 using Fluvio 3.3.0f1 (works fine in Unity 2017.1.1f1). After creating a gas or fluid the editor doesn't display the particle editor component (although the particle effect can be seen in the scene) and the log is spammed continually with the message below.

    Code (csharp):
    1. ArgumentNullException: Argument cannot be null.
    2. Parameter name: type
    3. Thinksquirrel.FluvioEditor.ReflectionHelpers.GetPropertyValue[Rect] (System.Type type, System.String propertyName)
    4. Thinksquirrel.FluvioEditor.Inspectors.FluidParticleSystemInspector.OnInspectorGUI ()
    5. UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1240)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    7.  
     
    Last edited: Oct 27, 2017
  39. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181

    Hi ChrisCF,

    This is a known issue - we're working on a fix for Unity 2017.2. In the meantime, downgrading to 2017.1 should fix the issue.

    Thanks!
     
  40. ChrisCF

    ChrisCF

    Joined:
    Dec 23, 2014
    Posts:
    5
    Is this the attached image the expected CPU usage profile of this asset? I'm using an i7 7700, GTX 1070, 32GB of ram.
    I've tried going down to a 0.066 timestep but that just reduces the frequency of the spike. 25ms in a frame, even periodically, is waaaayyy over budget for any one script in a VR environment, and the performance is the same with VR multipass enabled or VR totally disabled. So if this is normal I'll look at less demanding options.

    It doesn't seem to make much difference whether I have 100 particles or 3000. Same behavior with OpenCL and Unity compute (although the resulting visual simulation is quite different, the Unity one sprays a lot of particles off in pretty random directions). The only performance change is if I disable compute and then everything slows to a constant crawl.

    upload_2017-10-27_15-52-25.png
     
  41. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Hm, those are definitely not typical CPU usage numbers at all (Fluvio typically takes anywhere from 2-6 ms of frame budget on an average scene, depending on complexity). There should also be very little if any difference between simulation for each compute mode. If possible, can you get in touch with us through support with a bit more info? You can submit a support ticket here by clicking “Contact” in the upper right corner.
     
  42. ChrisCF

    ChrisCF

    Joined:
    Dec 23, 2014
    Posts:
    5
    I'll try a completely clean project and make sure I can make a minimal repro, assuming it's still a problem I'll make a support ticket, thanks.
     
    Last edited: Oct 27, 2017
    lilymontoute likes this.
  43. thinksquirrel_julie

    thinksquirrel_julie

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

    Today’s the final day to make a Fluvio purchase to benefit the hurricane relief efforts in the Caribbean and Southeastern United States. On November 15, we’ll be donating 100% of September and October purchases to the following three charitable organizations:
    Thank you to everyone whose purchases helped out!

    Take care,
     
  44. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Hi Guys,

    I'm creating a gas detector for a scientific project. Basically I want to be able to have a tiny sphere collider (much smaller than the particle effect), which is able to read the number of particles in an area (the density). In real life you'd make thousands upon thousands of these particles and read the number in that small area, to get the density. In this project I'm trying to find a clean way around doing that. Is there a way to get into the source code of any areas of Fluvio? The things I'm thinking of is grid data, particles connected to each other from smoothing distances, and things like this.

    Would you have any suggestions on the best way to go about creating a sensor from your tech?

    Thanks!
     
  45. EvolutionOfWar

    EvolutionOfWar

    Joined:
    Nov 1, 2017
    Posts:
    3
    Hello,

    I have a few questions about Fluvio and it's interactions.
    1. Is it possible to make fluids comes out at different rates, like when a bottle is tipped more and more at different angles?
    2. Is it possible to measure this rate, say from a cup's perspective, how much fluid has entered or has collided to measure the "total" fluid?
    3. What are the suggested tools to pair with Fluvio for Unity assets?

    Thanks!
     
  46. thinksquirrel_julie

    thinksquirrel_julie

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

    If you can please fill out the from you'll find linked in our support article here with some more information for us, we’ll be in touch regarding source code licensing and how Fluvio might be used in your project.

    Thanks,
     
  47. thinksquirrel_julie

    thinksquirrel_julie

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

    Regarding the different rates, much of this is controlled by the physics and you can also make adjustments to the emission module on the Fluid Particle System.

    As for measuring the rate, yes, fluid effectors have a particlesInEffector property measuring how many particles are currently in an effector's area. The allowBufferReadback property must be enabled, however, so there’s a minor performance cost, depending on what plugins are being used. More info here.

    I can't think of any suggested pairings, but please let me know if there's anything else I can do to help.

    Take care,
     
  48. EvolutionOfWar

    EvolutionOfWar

    Joined:
    Nov 1, 2017
    Posts:
    3
    Does Fluvio Free work for 2017.2.0f3? Like another person who left a review, I cannot seem to get it working, and I just re-imported the package in hopes of getting it to work. The particles coming out aren't correct and I cannot edit the particles in the inspector at all.
    upload_2017-11-21_15-24-48.png
     
  49. thinksquirrel_julie

    thinksquirrel_julie

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

    Sorry for the trouble.

    Support for 2017.2 is currently in development. In the meantime, downgrading to 2017.1 will resolve this issue. You can check here for more information on Unity version compatibility.

    Thanks,
     
  50. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Hi Julie,

    Thanks for keeping us up to date. Is there an expected ETA for the 2017.2 update?