Here is a little showcase of what I came up with the liquid shader and an explanation, both to give some inspiration to those that need it and maybe avoid some pitfalls which I fell into, I’ve highlighted in bold the problems I have with the shader.
This is what I came up with:
It’s an Italy-only cold tea made by Ferrero which I happily scarf down in a single night, sparing the modelling and texturing process, the first thing I noticed after a close analysis of the shader is:
It doesn’t support translucency, which was greatly disappointing, instead, it uses the opacity map as a “liquid mask” to create the illusion that the liquid is behind something translucent, the empty areas are instead rendered with some kind of fog that is not that customizable, the only options it has is “Cube refract Transparency”, which doesn’t make it transparent, and “brighten empty areas”, which just helps with the illusion that it’s not opaque.
pictured above is empty space
Speaking of Liquid mask, the shader can use Color, Normal, Roughness AND Metalness, which is better than the “glass” shader as it doesn’t have metalness
Let’s talk bubbles, this being a non-carbonated drink, it doesn’t have any, but they still came in handy, and that is because the foam suck, there’s a checkbox to turn it on but to actually make it appear you need to activate it in the “Test Values”, which makes me think it’s not something to take seriously, I mean, look at it:
I am sure you can make it work, but it completely ruins the sideways view, what instead helped was bubbles, you can set “bubble speed” and “bubbles minimum” to 0, then pump up the “depth fall off”,“bubble strength” and “bubble maximum” to give it the nice foam effect of many sugary drinks:
Bubble opacity should remain at 0, they start looking cartoony and lose any color you give them if you don’t, then use “Liquid specular strength” to make them appear brighter, this will also make the liquid brighter so balance it with the liquid color.
Speaking of color, getting the color not look rancid is for some reason very hard, lowering the “Mask Maximum” helps without compromising anything, so does liquid brightness.
What remains are the “Liquid Levels”, upwards, downwards, and sideways, this is done because a bottle is neither a sphere nor a cylinder, and depending on how long or thin the neck is the level will vary wildly, you might as well throw away the “Liquid level height” slider because these 3 are what matters, they are also very finicky.
And lastly, “test wobble” makes the liquid wobble constantly, but if you set it low or 0 the liquid won’t wobble at all, which unfortunately means your liquid will always be in constant conflict even when it’s standing perfectly still, and the other wobble settings don’t really help, I instead chose to have a boring no wobble.
And for those curious about the settings I didn’t mention, here is the download to all of the files.