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.
By default, new projects have one layer which every object you add the the scene is assigned to.
To add a new layer:
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.
To assign an object to a different layer:
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:
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.