home

how i made realtime "liquid" in a beer bottle in unreal

back to the project page


Alt Text

This graph takes the plane position and normal set by the blueprint each tick and makes a mask for liquid below the surface offset by the three sine offset material functions I made and also makes a mask for the walls foam lining the inside walls of the bottle.


Alt Text

This graph outputs the color of the foam in the bottle using two different sets of UVs for shading the foam against the side of the bottle and the top surface of the liquid using a cool way to calculate the UVs for a surface described by an up-vector I found here


Alt Text


Alt Text


Alt Text


Alt Text


Alt Text


Alt Text


Alt Text


Alt Text