Search Unity

Liquid Volume by Kronnect

Discussion in 'Assets and Asset Store' started by Kronnect, Sep 20, 2016.

  1. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Liquid Volume is a powerful and highly customizable shader that simulates realistic and animated liquid containers. Can be used in 3D scenes and 2D UI (demos included).



    Liquid Volume is super easy and fun to use: just add the main script to any primitive (sphere, box, cylinder and similar shape models) to convert it into a liquid container!

    Includes the following ready to use prefabs:
    • Sphere flask
    • Cylinder flask
    • Box flask
    • Potion flask
    • ... even a fillable beer glass!
    Experiment with your models and save your own prefabs!

    Check out all the key features on the Asset Store:
    https://www.assetstore.unity3d.com/#!/content/70992

    Here's a video:




    Enjoy!
     
    Last edited: Aug 1, 2017
  2. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    mobile ?
     
  3. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    @GCat yes, using the "Simple" variant. Shader includes 3 variants - "Simple", "Default" and "Bump Texture". The Simple variant has been tested on a Galaxy 6 and although it does not provide much details (like sparkling or murkiness and the foam is minimalistic) looks nice as well.
     
  4. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    It also works on Gear VR, even with the Default setting (which includes some cool effects).
     
  5. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Any chance of a webgl demo where we can test and rotate say the glass flask object, your videos are nice but very slow, would like to see how it works when a player is interacting with it.
     
  6. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    @MikeUpchat Thanks for your interest in Liquid Volume. We'll try to publish some interactive demo soon.
     
  7. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Version 1.1 is now available with "Ignore Gravity" option allowing you to rotate the liquid with the flask itself. Useful for rendering horizontal pipes and liquid level animation in any direction.
     
  8. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Version 1.2 released! This new update includes some additional controls to adjust imported models from third party applications as well as a render queue setting:



    Bake Current Transform: as its name implies, it will apply current transform to the vertices themselves. This is useful when you have to rotate 90 degrees on the x-axis for example to have an imported model sit upright. Pressing this button will rotate the vertices so the transform on longer need to be touched.

    Center Pivot: will center all vertices around the average center point. Useful to normalize the level settings.

    Render Queue: by default, Liquid Volume will render at Transparent+1 queue so refraction blur works correctly in front of other transparent objects. However, if you want to encapsulate it into other transparent objects you can change the render queue here to set it back to transparent or transparent-1. More control!
     
  9. JonDadley

    JonDadley

    Joined:
    Sep 2, 2013
    Posts:
    139
    Interesting. Does this work with Unity's VR Single-Pass Stereo option? A lot of shaders don't work natively with this. Also, how performant is the effect?
     
  10. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    It works but the refraction blur option which uses CommandBuffers seems to have some issues on some VR setups with Single Pass Stereo. Not sure if this is an already bug fixed in latest Unity 5.5 or 5.6 updates, need to test that again.

    EDIT: current Liquid Volume version works with Single Pass Stereo Rendering on Unity 5.5. Tested with Oculus DK2:
     
    Last edited: Jan 15, 2017
  11. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Does this work on mobile? It seems to crash my devices.
     
  12. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    It should. Try disabling refraction blur or choosing the simple preset.
     
  13. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi! V2.2 update will be submitted soon. Here's preview of some force reactions in the upcoming update:

     
    jason-fisher likes this.
  14. jason-fisher

    jason-fisher

    Joined:
    Mar 19, 2014
    Posts:
    133
    Is it possible to make a liquid that is held between two spheres (one inside the other) with the gravity pulling the liquid toward the inner sphere?
     
  15. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi! Thanks for your question, it's interesting.
    You can put an sphere inside another sphere, however the liquid will always gravitate towards bottom or to the ground - you can also cancel gravity and it will rotate along the external sphere but anyway it won't be affected by the inner sphere.
     
  16. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    hi everyone!

    v2.2 is now available which simulates physics by reacting to external forces or acceleration.

    Cheers
     
  17. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    We're happy to announce V3 has been submitted to the Asset Store.

    This is a great update with a new flask topology, called "Irregular". This option makes use of CommandBuffers to properly compute the length of the ray inside the flask producing better adaptation effect of the liquid to any kind of container (or at least way better than the existing primitive types, cylindrical, cubic and spherical topologies).
     
  18. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    So here it's! V3 is now available.

    Here's the changelog:
    - New flask type! Irregular. Better adaptation to non-primitive type flasks.
    - Improved liquid level calculation when flask is rotated and upperLimit < 1
    - [Fix] Fixed depth not being calculated correctly when objects cross the container and depth aware is enabled

    You can get it here!
     
  19. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    V3.1 is now available with the following changes:

    - Added Turbulence Speed parameter
    - Added Emission Color and Brightness parameters
    - API: Added liquidSurfaceYPosition to get the world space vertical position (Y-axis) of liquid surface
    - API: Added GetSpillPoint to get the world space position of the point where the liquid starts pouring over the flask when it's rotated
    - Added Parent Aware option to force clamp liquid with irregular topology to parent geometry
    - [Fix] Fixed Depth Aware option with Single Pass Stereo Rendering
     
  20. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    Cool stuff, could you add support for SkinnedMeshRenderers, and blendshapes?
     
  21. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Could you send please me a sample model or scene?
     
  22. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Hey @Thrawn75
    Liquid volume looks great in VR! Just a quick question about some artifacts I am seeing when using it on a different container than then demo ones. The liquid "bleeds" up the side of the container when in cylinder topology, but not if I change it to irregular.
    upload_2017-4-27_14-10-27.png

    Also seeing some artifacts if the potion level is 0 in cylinder mode, some faces still show liquid (this problem is also fixed when in irregular topology)
    upload_2017-4-27_14-12-12.png

    Let me know if there is anyway to fix these artifacts,
    Cheers,
    Colton
     
  23. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi!
    The basic topologies (spherical, cylinder, cube/box) are designed to work with those shapes. They can be used in models with similar shapes but in order to overcome any artifacts that may appear you may need to tweak some of the parameters in the Advanced section, like extents or even use the vertex tools commands (Center Pivot for example).
    If you can use the Irregular topology, that will provide the best outcome for non-basic primitives since it captures depth from the render to compute the boundary of the model. It's more expensive though.
    If you still want to use the basic topologies, send a copy of the scene to me, I can advice and try to tweak the basic topology parameters for you.
    Regards.
     
  24. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Thanks for the quick response! The model i'm working with can be found here: https://drive.google.com/open?id=0B1T3bB-MkEylOFgxWFVKc2hFbzg

    I would rather use the cylinder as it pours better (you will notice the top of the bottle has a wide lip which causes the pour to be calculated from the lowest point which makes sense, unfortunately that point is on the outside of the glass not inside when using irregular).

    If you feel that irregular is the only way to go I will look into calculating the pour from inside verts only

    Cheers,
    Colton

    [EDIT] Should have also mentioned i'm not using any foam or smoke.. just default liquid
     
  25. BongoMongo

    BongoMongo

    Joined:
    Dec 12, 2013
    Posts:
    7
    Hi, I'm having some shader trouble with the latest release. When I select, Simple, Default No Flask and Reflection Liquid Volume does not select the right shader at runtime and the shaders get replaced with Hidden/InternalShaderError

    I'm using latest Unity 5.6.1 and all the shaders comile fine but as I said, as soon as I press Play they disappear. It seems to me as if the script selects the wrong shader or cannot find them. Any idea how to fix the issue?
     
  26. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Hi! Version 3.3 which fixes this and includes new features has been submitted. @BongoMongo seems I can't send you the update by pm. Please contact us on contact@kronnect.me for the update.
    Cheers!
     
  27. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    V3.3 is now available!

    Here's the change log:

    - Updated "WetGlass" demo scene
    - Optimized "Simple" detail level (faster, simpler shader)
    - Added Debug Spill Point under Advanced Section (useful to see the spill point when rotating the flask)
    - Added textureScale and textureOffset options for Flask Texture
    - [Fix] Center Pivot and Bake Transform options now properly refresh any collider attached to the Liquid Volume gameobject
     
  28. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    V4.0 update live!

    New light scattering options:


    Plus:
    - New detail option: Smoke (only renders smoke inside flask)
    - Smoke can be completely disabled, slightly improving performance
    - Some shader optimizations

    Enjoy!
     
  29. spinning_clock

    spinning_clock

    Joined:
    Jun 22, 2015
    Posts:
    23
    Hi There!

    Have an issue with this plugin, which is proving to be a bit of a headache.

    From a normal Unity camera, the Liquid volume script works brilliantly, but once the project is put into an oculus project there is strange black artefacts which flash randomly:

    https://drive.google.com/file/d/0B9rF5-2PxvMwRTVIUUo0elJ3clE/view?usp=sharing


    On the left you can see how this should look but on the right is how this looks mid-flicker. This occurs in every instance of liquid volume when viewed on oculus, and the black blocks change shape depending on the bottle and position.

    Is there any settings/scripts which can fix this?

    Thanks
     
  30. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    I see some blurriness on the image, are you using some image effect?
     
  31. spinning_clock

    spinning_clock

    Joined:
    Jun 22, 2015
    Posts:
    23
    the post processing stack is used, will it be worthwhile to check settings on this, ie switch off bloom?
     
  32. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    yes, disable it completely and see if issue disappears.
     
    spinning_clock likes this.
  33. spinning_clock

    spinning_clock

    Joined:
    Jun 22, 2015
    Posts:
    23
    Thanks! switching off the bloom fixed it !!! Brilliant, thanks for the pointers.
     
    Kronnect likes this.
  34. dwaldrum

    dwaldrum

    Joined:
    Jun 20, 2015
    Posts:
    48
    Absolutely loving this asset so far, but running into a problem. I've used it on a water cooler jug, and it works great, except when I knock the jug over. It goes from looking 100% full to 50% full when it's on it's side.

    I've tried both cylinder and irregular topology.

    Edit: And this is why I shouldn't post at 1am. Found the answer right after, rotation level bias, problem sovled.

    Thanks again for the awesome asset! :)
     
    Last edited: Oct 10, 2017
  35. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Thanks, it looks cool right? :) Try the Center Pivot option - usually for the rotation to work models need to have the pivot at the geometric center and not at the base.

    If problem persists, please send a repro to our support email.
     
  36. dwaldrum

    dwaldrum

    Joined:
    Jun 20, 2015
    Posts:
    48
    Truly awesome asset, we've hooked the level and turbulence values up dynamically so we can actually simulate the usage of water, adding some particle bubble effects, pouring of liquids out when it tips over (Using obi-fluid) and the result is simply amazing. Thanks again!
     
    Kronnect likes this.
  37. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Doing some magic with Liquid Volume Pro :)
     
  38. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
  39. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    I updated an older project from 5.5 to 2018 and notice there is a flash when I start the scene I think it has something to do with Backbuffer. Has anyone seen this or knows a fix?
     
  40. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    If you disable the Refraction Blur effect, does the flash go away?
     
  41. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    I do not see that setting, granted this is an older version of the plugin. . . where should I be looking?
     
  42. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    In latest version its last under Liquid Settings:

     
  43. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    We are look for which manager bought your plugin. . . once we do I'll update and let you know . . . or you may get another sale out of it =p
     
    Kronnect likes this.
  44. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    Ok we updated the plugin but the problem still persists. . . . it might be because we purchased the Pro version instead of repurchasing the basic stuff. (turns out that manager had left). So I may have to set things up again. Will let you know.
     
  45. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Ok. Let me know. Whenever possible send me an email with details of the issue, screenshot, Unity version and platform. Thanks.
     
  46. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    200
    Turns out the issue I saw was related to separate effect entirely. . . sorry for the false flag.
     
    Kronnect likes this.
  47. Marte5

    Marte5

    Joined:
    Apr 7, 2017
    Posts:
    5
    greetings,
    when i try to compile for mobile (Samsung S8, android 7), Unity return this error:
    Shader error in 'LiquidVolume/ZWriteFront': 'frag': Not all control paths return a value at line 29 (on gles)
    Shader error in 'LiquidVolume/ZWriteFront': 'frag': Not all control paths return a value at line 29 (on gles3),
    can you please give me some advice?
    thanks
     
    Last edited: Jul 16, 2019
    Kronnect likes this.
  48. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,905
    Thanks for reporting this. I’ll check and report back.
     
  49. Marte5

    Marte5

    Joined:
    Apr 7, 2017
    Posts:
    5
    OK sorry, I haven't recompile shaders, now it works

    REOPEN:
    restarted tomorrow and still have this error, someone can have an advice about it? thanks
     
    Last edited: Jul 17, 2019
    Kronnect likes this.
  50. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    305
    Hello, does this asset supports HDRP?
    Thanks