How to use Masks with Reflection/Refraction
Starting with Corona Renderer 6, reflection and refraction now can be taken into account when using certain Corona masking elements (CMasking_ID, CMasking_Mask, CMasking_Wirecolor, CGeometry_Zdepth, CTexmap), making propagation of masks through Corona materials possible. This means that you can now select whether the material can be seen through other masks with refraction propagation (not being obscured by other masks/objects), can reflect the masks of other objects (with reflection propagation) as well as take both reflection and refraction into account depending on importance* (with "always" propagation).
Propagation of masks can be achieved through selecting the preferred behavior of the reflective or refractive material in the Corona Material's Advanced options roll-out, in the Propagate masks dropdown menu:
The following propagation types are available:
- Never - Render elements are never propagated through this material, i.e. this material is always visible in masks as a flat-color matte:
(With "never", by default all material/object masks will return a randomly assigned color depending on masking element selection)
- Through reflection - Render elements are propagated through this material if reflection occurs. This material will only reflect the masks of its surrounding environment background and objects:
("Through Reflection", as seen in the image example the surface of the mirror and the glass bottles reflect their surrounding masks)
- Through refraction - Render elements are propagated through this material if refraction occurs, i.e. this material will only refract the masks of its surrounding environment background and objects:
("Through Refraction", as seen in the image example the surface of the glass bottles refract the masks of objects that are behind or below them)
- Always - Render elements are always propagated through this material. this material will reflect and refract other masks depending on if its reflection or refraction is more prominent:
("Always", as seen in the image example the surface of the glass bottles refract and reflect the masks of objects of their surrounding environment)
Note: You will notice reflectivity in masks when propagation of masks is set to "Always" for a material that has no reflection or refraction. Preferably, the "Always" option should be used for materials that need both reflective and refractive propagation of masks.
In very rare cases, after a scene merge or scene import within 3ds max, certain materials might be altered to have their mask propagation set to "Always". This is an unwanted result that can be tedious to resolve manually, we suggest you run the following script that will set all scene materials to "Never".