Liquid Volume by Kronnect

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:

Here’s a video:

Enjoy!

mobile ?

@GCatz_1 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.

It also works on Gear VR, even with the Default setting (which includes some cool effects).

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.

@MikeUpchat Thanks for your interest in Liquid Volume. We’ll try to publish some interactive demo soon.

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.

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!

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?

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:
https://www.youtube.com/watch?v=_w5KBYPH0KI

Does this work on mobile? It seems to crash my devices.

It should. Try disabling refraction blur or choosing the simple preset.

Hi! V2.2 update will be submitted soon. Here’s preview of some force reactions in the upcoming update:

1 Like

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?

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.

hi everyone!

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

Cheers

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).

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!

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

Cool stuff, could you add support for SkinnedMeshRenderers, and blendshapes?