Articles
Fundamentals
Layers

Layers

Objects in a Spark AR Studio effect are always rendered in a specific order. In general, an object that's listed closer to the Camera in the Scene panel will appear in front of one that's further away.

This can mean an object intended to appear in front of another object appears behind it, and vice versa. You can use layers to change this.


You can also use the Write to Depth Test and Use to Depth Test options in a material to change how objects render.

Adding new layers

By default, new projects have one layer which every object you add the the scene is assigned to.

To add a new layer:

  1. Go to the Layers panel.
  2. Click +.

To rename or remove layers, double-click on the layer and select the relevant option from the menu.

There must always be one layer in a project.

Assigning objects to layers

To assign an object to a different layer:

  1. Select the object in the Scene panel.
  2. In the Inspector panel, click the current layer.
  3. Select the layer you want to assign the object to from the menu.

Changing render order

The render order is the sequence in which the layers are rendered.

If you have more than one layer in your project, the layer at the bottom of the list is rendered first and the layer at the top of the list is rendered last.

To change the render order:

  1. Click the layer in the Layers tab.
  2. Drag it into a new position.

How transparent objects render

Opaque objects are only affected by the render order if their position on the Z axis overlaps.

Transparent and semi-transparent objects may be affected by render order regardless of their position on the Z axis, because they can occlude objects in other layers. This means transparent objects set to render first will occlude objects rendered on a subsequent layer. You might need to adjust your layers to account for this.

Learn more about occluding objects.

Was this article helpful?