To model liquid in a glass correctly, you should:
- Duplicate the inside part of the glass to create the liquid boundary
- Add a cap to the resulting mesh to give the liquid a surface
- Enlarge the liquid mesh a bit so that it slightly overlaps with the inside of the glass
- Make sure that the normals of both the liquid and the glass are set up correctly (they should always be facing outwards)
This is the correct workflow in Corona for such scenes, and there is no need to stack materials (C4D) or use multi/sub materials (3ds Max) like in some other renderers.
Remember that geometry normals are considered when rendering refraction and other volumetric effects. This means that both the container and the liquid need to have their normals set up correctly (facing outwards).
Examples
a) Liquid mesh perfectly overlaps with the faces of the inside of the container mesh - this produces wrong results and artifacts are visible (faceting, triangles).
b) Liquid mesh is slightly bigger than the inside of container mesh - this is the correct method.
c) Liquid mesh is slightly smaller than the inside of the container - this produces wrong results.
d) Flipped normals. In this example, the normals of the liquid mesh are flipped - this produces incorrect results (in this case, absorption incorrectly becomes extremely strong):
Material-Based Medium Resolving
Corona 12 introduced the "Use material-based medium resolving" option, which assures that materials like glass and liquid are rendered correctly, regardless if they are attached or detached from each other.
Note: This option is enabled by default and in most cases there is no need to change it!
In 3ds Max, this is available in the Performance tab under Development/Experimental Stuff |
In Cinema 4D, this is available in the |
In Corona 11 and below, two intersecting objects with different materials would render differently depending if the objects were attached or not:
Example - Corona 11 Hotfix 2
Starting from Corona 12, when the Use material-based medium resolving option is enabled, this allows to correctly identify the difference between two or more materials assigned to overlapping volumes, regardless if they are attached or detached:
Example - Corona 12 (with Use material-based medium resolving option enabled)
See also: My SSS objects are faceted! (3ds Max | C4D)