Skip to content

Visibility Mask #

Visibility masks are used to control intersections between rays and geometry and are applied to all objects that affect how rays move through the scene. Two masks are required to determine if an intersection is valid, one mask applied to the geometry group, known as the geometry mask, and one applied to specific analysis pipeline, known as ray mask.

Comparing Masks#

By comparing the geometry mask with the ray mask the intersection program evaluates if a ray should intersect with a specific geometry or not. Each visibility mask contains 8 bits, two matching bits set to true in both the geometry mask and the ray mask result in an intersection.

Visibility mask logic
Mask comparison for two different situations. In A bit number three is set to true for both masks, resulting in an intersection. In B there are no matching bits set to true, resulting in the ray passing through the geometry.

Masks In The Scene#

When running raytraced analyses, many different masks can come into play. Especially when the same scene is used for multiple analyses that require different geometric compositions.

Visibility masks queries
Example situation when running Sunlight Hours analysis is performed. The same scene can be analysed for two different geometry groups, each with different masks. The analysis starts by tracing a ray from the Analysis Point towards the sun position. At intersection position 1 & 2 the Sunlight Hours Analysis mask is compared to the mask of 'Geometry Group A' resulting in an intersection. When ray intersects 'Geometry Group B' at position 3 & 4 intersection is not registered.