Drinks And Foam Shader
How to use the group node:
First of all you must made your shape with the cut or branch cut oriented to the local Z axis and the origin in the center of the geometry as this:
Once finished the geometry you must create a new material and, in the node editor, add a pricipled BDFS shader if nedeed, add a new Group->foam and connect as the image.
Set the colors of the liquid and foam and play with the other parameters as you want. Done!
Parameters:
liquid color: The color of the liquid
foam color: The color of the foam
foam density: The foam transparency of the not bubbles area
foam bubble height: The height of the foam bubbles
foam bubble scale: The size of the foam bubbles
foam noise height: The height of the foam noise, more height make the foam more rugged
foam micro scale: The size of the micro foam bubbles
foam height: The height of the separation between foam and liquid
liquid bubbles scale: The size of the first set liquid bubbles
liquid bubbles scale 2: The size of the second set liquid bubbles
liquid bubbles density: The quantity of the liquid bubbles
liquid roughness: The roughness of the liquid