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