CLEAR

Occluders

Adding an occluder can make a 3D scene more realistic, by hiding things that would be hidden in real life.

For example, in the image on the left there's no occluder. The arm of the glasses is visible when it should be hidden by the head.

On the right, we've added an occluder:



Making an Occluder

Occluders are made of an object, with a material applied to it.

You can create and configure the occluder material in Spark AR Studio.

Occluder Objects

Any 3D object can be used as an occluder, once you've applied an occluder material to it.

If you're occluding the face like in the example above, use a face mesh. This will cover the face and respond to its movements.

Occluder Materials

Once you've created a material, in the Inspector panel change:

  1. Shader Type to Flat. This shader is more performant than the Standard shader that most materials are set to by default. It doesn't omit or respond to light, which is fine for the occluder material, as it won't be visible.
  2. Opacity to 1%. The material will look transparent, but still hide objects behind it. Setting Opacity to 0% wouldn't hide the objects behind it.

You might want to check the box for Double Sided. For example, so the back of the face mesh is also occluded if the user turns their head to the side: