Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

FLOW ️➖ Fast Fluids

Discussion in 'Assets and Asset Store' started by Darkcoder, Jul 10, 2021.

  1. Ensortainment

    Ensortainment

    Joined:
    Dec 19, 2020
    Posts:
    14
    Is there any way to remove fluid without it "draining" and pulling water into it. I just want to say "if any water enters this area, completely remove it".

    I notice there is some weird behaviour with Remove Fluid modifiers such as if there is an Add Fluid modifer active at the same time, the Remove Fluid mod never seems to be able to remove all the fluid in the area it covers regardless of strength as long as the Add Fluid mod is active. Also the fact that the drain is pulling water towards it does not suit my needs.

    Seems like it should be a simple thing but not sure how to do it. Thank you.
     
  2. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    The RemoveFluid modifier doesn't add any force to the fluid (i.e. it doesn't pull fluid), it just reduces the fluid height/depth by the specified Strength. However, if there is fluid in one column, and the fluid height in an adjacent column is lower (e.g. due to removing it), fluid will flow there, which over time gives the effect of pulling or adding force. I'm not sure what you expect to have happen in this scenario? You could freeze the fluid with a Dampen modifier to prevent it from flowing anywhere I guess.

    Modifiers are applied in the order they are enabled by Unity, which I don't remember if it's random or based on hierarchy order. In any case you could manually enable them. If the AddFluid modifier runs after RemoveFluid, then of course you would always have some fluid in the columns they influence, so you would want to make sure that's reversed.
     
  3. Ensortainment

    Ensortainment

    Joined:
    Dec 19, 2020
    Posts:
    14
    Thank you for your response. The explanation of water moving towards the lower columns makes sense. I suppose I'm not as worried about the "draining" effect, but I would still like to be able to completely remove water from an area.

    For context, the effect I was hoping for is to have it such that water reaching the bounds of the simulation "despawns" rather than pooling against the invisible wall. I want to give the impression that the water seemlessly continues on past the bound. I realize this isn't as simple as despawning given the water is handled using an "array of columns" according to the bounds of the simulation, but that's what I'm aiming for.

    I was initially hoping to attain this effect by completly removing fluid along the bounds, but I found that regardless of the strength I was never able to remove water completely. I was hoping by setting RemoveFluid to an arbitrarily high strength like 999999 I would be able to see the area covered by RemoveFluid be completely devoid of water, but that doesn't seem to be the case.

    In this example I only have RemoveFluid enabled, and although it's set to a strength of 1e+10 it still removes the water from the scene gradually and it takes a long time for the water to leave that spot. Is there a way to just set all the columns in that area to a height of 0?

    Gradual Removal Example.png

    Final example:

    In this test scene I setup with just a simple bathtub, with the source on the left and sink on the right, the rate of removal never exeeds the rate of addition, regardless of how high I set the removal strength or which one gets enabled first. In this example AddFluid is adding with a strength of 1, and RemoveFluid is removing with a strength of 3.402823e+38 yet the water reaches an equilibrium and doesn't seem to raise or lower from that point. Is this intended behaviour or have I messed something up somehow?

    Equilibrium.png

    Thanks for your time.
     
  4. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    322
    @Darkcoder Hey Carlos, I need a "Remove Fluid Below" modifier that uses a shape mask but was surprised there isn't one.

    What syntax should I use to add an enum and what should I add to ApplyNow() for shape mask to work. I see the ModeType has enumerations set to specific integers and the entries are not in numerical order, is there a reason for that?



    Edit: Might help with the above issue since I'm also working on an alternative to invisible walls. @Ensortainment

    I'm containing a fluid sim within a boundary using a remove fluid modifier and a shape mask that has an alpha circle and white around the rest of the texture. I then increase the sink value on the fluid surface shader and this results in a decent transition keeping the fluid within a circle shape.

    This however does not work well with overhangs which is why I need a remove fluid below modifier in case there are fluid objects or objects on the height layer that are above the area I want to mask off. I don't mind liquid flowing off the overhangs though.
     
    Last edited: Jul 26, 2022
    Ensortainment likes this.
  5. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    322
    Has anyone here implemented wetness in hdrp shadergraph?

    I opened up FLOW_Stackable_Wetness.surfshader in notepad and tried to recreate that in shadergraph with the same property names and default values but I'm getting a result that isn't oriented vertically.

    For ModifyVertex() I couldn't find an equivalent for "ExtraV2F" so I just pass "Absolute World Position" directly to GetWetHeight() in shadergraph. Could this be causing a problem? Other than that the graph is pretty much 1:1 with the code. I've triple-checked everything and can't figure out why it wouldn't do the same thing.


    Edit: Figured it out, what's the best way to share the solution. (implemented as HDRP subgraph)
     
    Last edited: Jul 28, 2022
  6. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    You're right, something strange is going on here. The modifiers are applied before the fluid simulation updates, so I would expect the outer edge to have some fluid due to it falling in, but that should only appear on the first ring of columns on the outer edge. I'll look into it.

    I have plans to make a new component that renders fluid beyond the edge of the simulation to create some kind of infinite fluid. Is this what you're talking about? This feature may also require some kind of edge damping to stop ripples at the edges from extruding into infinity and looking weird.


    All of the modifier types have a 'Shape' texture you can set?



    Nice! You can right click the subgraph and select "Export Package..." to make a unitypackage, which is probably the best way to share assets.
     
  7. Ensortainment

    Ensortainment

    Joined:
    Dec 19, 2020
    Posts:
    14
    That sounds great, thank you. I noticed that increasing the size of the RemoveFluid modifier seemed to help, once the size increased I started to see water dissapearing like I wanted, but it seemed like the area it actually covered was smaller than the dimensions it showed in the scene view.

    Also I just realized I have another question, the game I'm working on supports changes to the terrain durring runtime, and we've been using FlowSimulation.DirtyGroundAll(location, updateRadius) to keep the simulation up to date with these changes, but I just noticed this doesn't seem to update all the textures as we'd hoped, is there a better way to do this?

    Example with widening a river:

    before: Before.png

    after:
    After.png

    It's more apparent when you see it moving, but still from the pictures you can see the shape of the old river width is still apparent in the water, and it looks like the water is only flowing along the original path, even though the expanded space gets filled in. I worry the texture resposible for velocity isn't getting reset or something.

    If I try removing the water from the area with a "Paint Screen" component, as the water refills the area it looks like the whole exapanded river flows as expected. I also verified with a Sample component, the velocity of the center of the river decreases slightly after widening, but the velocity in the newly expanded parts are pretty low.

    Do you have any advice for this?

    Edit: was able to "reset" velocity along the deformation by putting
    FlowReplace.Replace(currentFlowDataB, rect, null, Vector4.zero)
    at the end of UpdateGround(), and it solves the issue of water only flowing along the old width, but causes the water upstream to flood a bit due to the sudden change.


    Second edit: Made a second "Dirty set" for velocity chunks and handle them much the same way as the height chunks, and just call
    FlowReplace.Replace(currentFlowDataB, rect, null, Vector4.zero)
    on each chunk. I call DirtyGroundVelocity(location, updateRadius) once after the whole deformation is finished and causes a bit of turbulence for a sec, but settles pretty quick and looks right.
     
    Last edited: Jul 28, 2022
  8. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    322
    There is a "Remove Fluid" and a "Remove Fluid Above" but there isn't a "Remove Fluid Below" modifier like the "Add Fluid Below" modifier which would solve an edge case I have.

    Edit: After more testing, a "Range Remove Fluid" and "Range Add Fluid" modifier would be really helpful too. I have a case where a moving modifier could pass under an overhang and sometimes I want fluid above the overhang to be affected and sometimes not. Can't do that with the current modifiers.

    Alternatively, to try and get around overhangs I think it could be solved by raycasting and collecting the thickness of each collider it passes through then clamping the heightmap to the distance between them so that the cells can only have fluid added if the heightmap is >= than the first distance, then incrementing to the next target distance as the fluid height is reached. (in case of an overhang above an overhang). I might try to make a volume that can be placed by an overhang to calculate this. Someway to gradually fill an area without snapping.

    Could I email this to you in case others ask for it or is there a github repo I could put in a pull request to?
     
    Last edited: Jul 28, 2022
  9. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    322
    I think I've figured out a solution to overhangs:

    Add a component that clamps the max height of the fluid in its volume. When submerged within a threshold increase the max clamp value to the upper bounds of the object. If submersion dips below the threshold then reduce the max height clamp to that level.

    I think that could be a good manual solution for marking the interior of things like caves/rooms to fill up gradually instead of that horrible height snapping.

    The trade-off would be that fluid won't appear above the object while being submerged, but I think that could be solved with another sim, VFX, or paint in 3D creating some visual above the object.
     
    Last edited: Jul 28, 2022
  10. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Hey everyone,

    Version 2.0.3 of FLOW is now out!
    • Fixed Save Load / To File demo scene.
    • Fixed fluid snapshot save/load in gamma color space.
    • Fixed foam increasing opacity even when disabled.
    • Fixed RemoveFluid modifiers not being able to continuously remove all fluid.
    Just some nice bug fixes. Enjoy :)



    I fixed the RemoveFluid issue. I was updating the modifiers between the two main simulation update steps, and this caused the fluid to essentially leak through the modifiers. The modifiers now execute after the simulation updates, so they should now be correctly removed without any leaking.

    Regarding the terrain, are you sure your dirty radius was large enough? The simulation itself constantly updates, and there is no system to put the columns to 'sleep' or anything like this. The only thing that is fixed is the scene height data, and as long as that is kept in sync with your scene the fluid should automatically react to any changes. If calling UpdateGround causes a change to the sim, then this suggests they weren't in sync.


    The reason why I didn't add RemoveFluidBelow is because I don't see how it would function differently from RemoveFluid or RemoveFluidClip. Can you describe a scenario where they would differ?

    Similarly with RangeRemoveFluid or RangeAddFluid, how would these differ from AddFluid and RemoveFluid? In a fully 3D particle-based fluid simulation (e.g. SPH) they would of course make sense, but in a height based sim they make less sense.

    It sounds like RemoveFluidClip is what you want, as this will disable the RemoveFluid functionality if that part of the modifier is underground.
     
    Ensortainment likes this.
  11. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    322
    After playing around with every removal modifier with a variety of masks and geometry I think I just stumbled across a visual artifact that made me think the height map was behaving in a way it wasn't. That made me think the heightmap could be sampled from both the ground up and top down.

    I'm loading UGC at runtime, players can build outside of the constraints of flow (create overhangs, caves, etc.) I'd rather not constrain what players can make so I'm trying to constrain the areas certain things can take place.

    If I could create a custom shape mask at runtime in a way that takes a slice of the height map such as "add all objects below Y = 15 in the height map" to the shape mask. That *might* help with some scenarios.

    I think I'm just out of luck though with the kind of gameworld I'm dealing with.
     
    Darkcoder likes this.
  12. Ensortainment

    Ensortainment

    Joined:
    Dec 19, 2020
    Posts:
    14
    Remove fluid looks better, thank you. Regarding the terrain changes, I am confident the radius was large enough to cover the area, I added a buffer to extend the radius to be sure. It might be in the way we were calling UpdateGroud? It's a continuous deformation that takes place over several seconds, so we were calling it many times throughout the deformation in OnTerrainChanged(TerrainChangedFlags flags) to keep the water up to date with it.

    The effect I was seeing was that the height information was correctly getting updated, and water would fill the newly available space as it became available, but after the deformation was over the water appeared to mostly still be flowing along the original area. My best guess is that the momentum stored in CurrentFlowDataB was too great to overcome or something. My solution was just to quickly reset everything in CurrentFlowDataB around the same area after the whole deformation was complete and that seems to solve it for me, effectively killing off the momentum.
     
  13. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Indeed, overhangs and caves make things much more difficult. Like Unity's own Terrain system, FLOW more or less assumes the world is a flat grid with height changes. These assumptions allow so many optimizations that are critical to making fluid simulation work across a large area. One of these optimizations is that the simulation basically swaps between two sets of buffers each time it updates, this means that adding support for multiple levels would require every possible layer to be included. So even if you restricted it to one cave layer, that would double the memory and bandwidth requirements, more than double the shader computation, and make rendering far more complex. There might be some novel approach to optimize this, but it would probably be very complicated to implement, isn't required for most projects, and ultimately the added development time and support requirements wouldn't make sense for any potential increase in sales.


    It's possible there's a bug somewhere in FLOW, but I would need to see some really simple demo scene ideally without user interaction that clearly shows the issue so I can replicate it.
     
  14. cloakedunity

    cloakedunity

    Joined:
    May 3, 2017
    Posts:
    4
    Hi, I couldn't find the answer to the following question. Can you help me?
    I would like to deform the terrain in-game. It doesn't necessarily need to be deformed while running the fluid simulation. It could also be deformed (using user input) and then the simulation would start with a click. Is that possible with FLOW?
     
  15. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Yeah, you just need to call the FLOW.FlowSimulation.DirtyGroundAll method with the world space point and radius of the terrain area you modified.
     
  16. lawsonh

    lawsonh

    Joined:
    Jul 25, 2018
    Posts:
    80
    hey there. I noticed that if "Center" is checked in my flow simulation object, my obstacle is not detected by the raycast so the fluid goes straight through onto the bottom of the container. could you double check this on your side? thank you
     
  17. lawsonh

    lawsonh

    Joined:
    Jul 25, 2018
    Posts:
    80
    I feel like their water is flowing faster as well. is there any way to make the water of this asset flow at a similar speed?
     
  18. lawsonh

    lawsonh

    Joined:
    Jul 25, 2018
    Posts:
    80
    @Darkcoder if I want to run the simulation shader twice per frame is there any easy way to do that?
     
  19. unitygnoob008

    unitygnoob008

    Joined:
    Sep 17, 2016
    Posts:
    225
    hello!

    how do we detect when a collider/object transform intersects under the FLOW water (i guess heightmap data???)

    I need my AI to swim along while knowing when they are floating

    also, do you have recommendation for simulating "swimming behaviour" besides just adjusting transforms (something using the physics itself) ?

    thank you again for this asset
     
  20. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,462
    Hey Darkcoder, can you advise if your asset works with URP, any guidance on that would be welcome.

    I read in other posts:

    If it's URP, make sure you enable the Opaque Texture in your pipeline settings asset.
    I am using Unity 2020.3.20f1, I have tried both Standard built-in render pipeline first and URP. For Standard render pipeline, I have added wDepthTextureMode component to main camera and set the Mode to Depth and also tried other mode. For URP I have enable Opaque Texture and Depth Texture. For the Surface material, I have switch different Modes: Depth, Vertical, March Depth, March Fluid and Depth and don't see any transparency changes on the Water. Do I miss anything? thank you
    Can you send me an email or private message of your project so I can replicate the issue? As long as your simulation has a transparent fluid, you added CwDepthTextureMode to your camera, and you used the "Surface" material which is already configured for transparency, then it should work.
     
  21. unitygnoob008

    unitygnoob008

    Joined:
    Sep 17, 2016
    Posts:
    225
    in URP the water island example is broken? the water becomes flat and stops showing ripple

    what do?
     
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    If I make a new Unity 2020.3.22f1 project with the URP template and FLOW 2.0.4 and enable the Opaque Texture + Depth Texture:

    upload_2022-12-12_20-45-1.png

    Then transparency works as expected:

    upload_2022-12-12_20-45-15.png

    upload_2022-12-12_20-46-1.png

    In what scenario does it stop? Using the aforementioned version with URP the Island demo scene works fine for me:

    upload_2022-12-12_20-47-48.png
     
    unitygnoob008 and khos like this.
  23. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,462
    Cool, many thanks, I'm looking to update to URP but with many assets it could be a lengthy process.
     
  24. unitygnoob008

    unitygnoob008

    Joined:
    Sep 17, 2016
    Posts:
    225
    im so confused now

    i will test some more, this is so strange

    edit:

    uh it works now, idk
     
    Last edited: Dec 13, 2022
  25. homemacai

    homemacai

    Joined:
    Jul 22, 2020
    Posts:
    66
    Hey there, so I am wondering if there is any way to use Weather assets with this water shader. Tried with Cozy with Fog enabled water shader gets transparent, messing with the render queue doesn't help. For example to make it (Cozy) to work with Crest Water, some(see below) changes are made to their OceanShader, but since I have no idea how to program shaders, not sure how to change your shader code to support the fog and probably underwater fog. Any help would be appreciated. Thanks!

    Crest -Cozy integration shader changes:
    ____________________________________________
    Code (CSharp):
    1. To start the integration, open the Ocean.shader file. Then find the first line and add the second code.
    2. Cull [_CullMode] //Line to find in OceanShader
    3. Stencil
    4. {
    5.      Ref 222 //Set to 221 in URP
    6.      Comp Always
    7.      Pass Replace
    8. }
    9. ____________________________________________
    10. #include "Lighting.cginc" //Line to find in OceanShader
    11. #include "Assets/Distant Lands/Cozy Weather/Contents/Materials/Shaders/Includes/StylizedFogIncludes.cginc"
    12. ____________________________________________
    13. if (!underwater)
    14. {
    15.  
    16.      //UNITY_APPLY_FOG(input.fogCoord, col);[B] //Line to find in OceanShader
    17.      col = BlendStylizedFog(input.positionWS_fogFactor, half4(col.xyz, 1));[/B]
    18. }
    19.  
     
    ml785 likes this.
  26. lawsonh

    lawsonh

    Joined:
    Jul 25, 2018
    Posts:
    80
    Hi Darkcoder, just checking again if this is possible
     
  27. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,462
    @Darkcoder Happy New Year and all that :) I would like to ask a question if possible, if I use the AddForce script how can I detect when an object is entering the flow surface? e.g. via c# script. I'm looking to add some splash particle effect but want to know when to instantiate. Not sure how do it.
     
  28. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    37
    hey there, just purchased Flow, and trying to use 2022.2.1 HDRP. will this work. I get a shader error: Undefined area shadow filter algorithm. Am I doing something wrong, or is Flow just not supported in this Unity version?
     
  29. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    37
    thanks you internet, added this: #pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH
     
  30. developer_bigdipperstudio

    developer_bigdipperstudio

    Joined:
    Dec 31, 2014
    Posts:
    10
    Hi, I am a new user just purchased this amazing asset but I am still not yet familiar with the system yet.
    I would like to know how I can do the following:

    1. remove fluid at the end and let the same fluid (color pattern) appear as a seamless lava
    2. changing color and texture of the foam
    3. glowing effect on fluid like emission >1

    Please kindly advise how I can approach to these. Many thanks!
     
  31. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16
    Darkcoder
    How can we smoothly execute the flow and collision effects of water on mobile devices?
     
  32. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    Sorry for missing all these messages!

    I'm not sure what you mean, can you show a video or something to explain it more clearly?
     
  33. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16

    I want to adjust the water flow style like in this game, but I don't know how to set it up properly. I've tried looking at the documentation, but I'm not sure if you can help me achieve a similar effect as in the game.

    Also, what numerical settings should I pay attention to when running the game on mobile devices? Do you have any good suggestions for numerical settings?

    Reference video URL :
     
  34. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    The water in this game looks like a bunch of spheres with a shader on top to merge them together (i.e. SPH). This kind of simulation allows for very precise hit or miss checks, as well as physics interactions like this. However, it only works in small areas like this with a small amount of fluid.

    Whereas FLOW is more aimed at larger bodies of water, and it will behave differently on small scales like this. The settings in the first "01 Basic Setup" demo scene should be good enough for a mobile game like this.
     
  35. unitygnoob008

    unitygnoob008

    Joined:
    Sep 17, 2016
    Posts:
    225
    whats the best way to handle pathfinding in this asset?

    sensors and addforce? invisible layer of mesh to path on when in water?
     
  36. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16
    Thank you for your answer. I will try referring to the "01 Basic Setup" scene again.
     
    Darkcoder likes this.
  37. frank231love

    frank231love

    Joined:
    Jun 2, 2019
    Posts:
    16
    Darkcoder
    how to do it on mobile
    Is it better to use FlowSample?
    Otherwise, the following problems will occur
    UnityGfxDeviceWorker (38): EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=2867 MB, unused=0x0)
     
    Last edited: Apr 27, 2023
  38. Nirvan

    Nirvan

    Joined:
    Nov 16, 2013
    Posts:
    134
    Can I make something like this with the plugin?

    2:35 (sorry for video quality but I couldn't find better example)


    I can't find similar example in the plugin's scenes.
    I tried doing some dynamic collision like that using FlowObject but it's junky when walking in water.
     
  39. binspire

    binspire

    Joined:
    Apr 7, 2023
    Posts:
    1
    What is the best way to create a continuously flowing river with Flow (over a terrain)? Thanks
     
  40. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,331
    It entirely depends how you want the pathfinding to work with the fluid. If the fluid is intricate and pathfinding is greatly influenced by it, then the best solution is to implement pathfinding on the GPU where you can directly sample the fluid data. If it's not so intricate then you can add FlowSample components in different areas which send data to the CPU, and use that data to modify the pathfinding.


    I will look into this issue shortly.


    This can be done using the FlowModifier component with Mode = AddForceUniform, and a custom script to adjust the Angle + Strength based on your object. Something similar is shown in the "Island" demo scene.


    You can place FlowModifier with Mode = AddFluid at the source of your river, and a FlowModifier with Mode = RemoveFluid at the mouth to stop the terrain becoming flooded.
     
  41. rumorgames

    rumorgames

    Joined:
    Nov 28, 2012
    Posts:
    35
    I'm facing a similar issue. When running on an iPad mini (gen 6), FLOW will crash with a nearly identical memory error to the above. The exact same project runs fine on similar- or lower-spec phones. When profiling, actual memory usage is fine and well within the expected bounds. Altering the parameters of the simulation does not seem to help (i.e. reducing the size of the simulation to reduce the memory footprint, etc). So far I have not been able to identify the root cause or any workaround.
     
  42. developer_bigdipperstudio

    developer_bigdipperstudio

    Joined:
    Dec 31, 2014
    Posts:
    10

    Hi, is there any method to do the above?
     
  43. BerengerVolumiq

    BerengerVolumiq

    Joined:
    Feb 6, 2017
    Posts:
    13
    Hello there,

    I understand the heightmap limitation, but I was wondering what would happened on a custom terrain generated with marching cube. Ours is, ultimately, several patches of gameobjects with a meshcollider updated at runtime. If the result happened to not have any caves, I'm assuming it would work ? And in case of caves, what would happen ? If we have a specific simulation for that cave, would it work, but without being able to have the liquid outside flow into the cave ?
     
  44. rumorgames

    rumorgames

    Joined:
    Nov 28, 2012
    Posts:
    35
    @Darkcoder, do you have any update on this?
     
  45. rumorgames

    rumorgames

    Joined:
    Nov 28, 2012
    Posts:
    35
    Another month with no response...
     
  46. rumorgames

    rumorgames

    Joined:
    Nov 28, 2012
    Posts:
    35
    Well I absolutely regret trusting @Darkcoder and building my game around his asset. At the time his support for Android and tighter focus put it slightly ahead of Zibra Liquids for me, but Zibra has made a ton of progress in two years while FLOW seems all but abandoned. It hasn't seen a significant update in over a year, and support requests go unanswered for months at a time.

    Has anyone else in the community encountered the same crash @frank231love and I are facing and managed to work around or fix it? Or does anyone have enough experience with Zibra to compare capabilities and performance? Even if it's an imperfect replacement, I may have to cut my losses here and switch to the better-supported solution.
     
  47. rumorgames

    rumorgames

    Joined:
    Nov 28, 2012
    Posts:
    35
    Thank you @Darkcoder for finally releasing an update to FLOW. Unfortunately, the crashing bug that was reported back in April has still not yet been addressed.

    To reiterate, FLOW is leaking memory on modern iDevices, which causes an almost immediate out of memory exception and crash.

    Reproduceable by the following:
    1. Start a new project in Unity 2021.3.31f1 (3D Core / Built-in RP)
    2. Import FLOW (and as of 2.0.5, com.unity.mathematics)
    3. Load scene "36 Sample Fluid Volume" and set as build scene
    4. Build and deploy to device (in my case, iPad mini 6)
    If you're lucky and the asset works as expected, the memory usage is reasonable and relatively stable. In my experience the very first run often works, and maybe about 1 in 10 times or fewer on subsequent runs.

    Screenshot 2023-10-13 at 2.12.15 PM.png

    More likely, at least 9 times out of 10, you'll immediately see the memory usage climb until it hits the device limit and crashes the application:

    Screenshot 2023-10-13 at 12.06.59 PM.png

    Screenshot 2023-10-13 at 12.07.16 PM.png

    Again, this has nothing to do with the configuration of FLOW leading to high memory usage. The default values are well within device limits when the asset functions correctly. No amount of adjusting the simulation parameters changes the outcome when it leaks memory. The effect is immediate and catastrophic. This is on an included demo scene with no alteration.

    I hope now that your "massive support backlog" is getting better now you will take the time to finally address this important issue.
     
    Last edited: Oct 13, 2023