Articles
Textures and Materials
Material Render Options

Material Render Options

Use the render options and advanced render options in premade materials to set how the material renders in your Spark AR effect.

Render options and advanced render options can be edited in the Inspector, when a material is selected in the Assets panel.

Render Options

Cull Mode

Back - Discard pieces of the mesh that are facing away from the viewer. Most effects use this mode to improve performance.

Front - Discard pieces of the mesh that are facing the viewer.

Blend Mode

Sets the blend mode of the material.

  • Add
  • Associative Alpha
  • Alpha
  • Subtract
  • Multiply
  • Replace
  • Screen

Opacity

Sets the transparency of the material on an individual map level.

BG Influence

Multiplies a color or texture against a grey-scale version of the video feed. Only availabe in the face paint material.

Brightness

Sets the brightness of a color. Only availabe in the face paint material.

Double-sided

Displays both sides of a face normal.

Alpha Test

Use the slider to make semi-transparent parts of a material transparent.

Advanced Render Options

Use Depth Test and Write to Depth Buffer

Use the Write to Depth Buffer and Use Depth Test checkboxes to control certain order parameters for the object the material is applied to.

Both boxes checked

Enable read and write depth buffer. This means that closer objects will obscure far objects.

Write to Depth Buffer box checked

Disable read depth and enable write depth. These objects will always draw over any other object. They will obscure father objects that are drawn after unless these objects have either the Write to Depth Buffer or both boxes checked.

Use Depth Test checked

Enable read depth and disable write depth. These objects will be obscured by nearer objects that have already been drawn that have either the Write to Depth Buffer or both boxes checked.

These objects can be obscured by any objects drawn afterwards, whether they’re nearer or further away.

Uncheck both boxes

Disable read and write depth. These draw on top of any objects of any type already drawn, and in turn will be overdrawn by any later rendered objects, regardless of whether they are nearer or further away.

Color Mask

Use these checkboxes to disable writing to specific channels of the color buffer. The color channels of the unchecked editors will be preserved after rendering.

When using this feature, the color in the Simulator and the viewport might not be the same. The Simulator will most closely match the end result on a device.

Was this article helpful?