Skip to main content
TikTok Effect House Platform Logo
Download
Log in
Textures and Materials

Matte Shadow

Matte Shadow is applied to objects that receive shadows and render only as the received shadow. This is useful when you want to ground other objects in your scene, adding an extra level of realism.

↓ Material_MatteShadow.zip

Add Matte Shadow

You can add Matte Shadow by going to + Add asset > Material > Matte Shadow.

Cast the Shadow

Matte Shadow is the default material for the Mesh Renderer of the AR Plane object. To render the shadow, you’ll need to configure the Cast Shadow property for the Light object and the 3D object that will cast the shadow.

Add an AR Plane to the scene by clicking +Add object > AR Tracking > AR Plane. You will see an AR Camera also added to the scene. Delete the default camera. Then add a Cube to the scene by clicking + Add object > 3D > Cube.

Navigate to the Directional Light component in the Inspector panel. Check Cast Shadow property for this light.

Then select the cube you just added, and navigate to the Mesh Renderer of the cube in the Inspector panel. Check the Cast Shadow property for this cube.

unaligned-image-0
unaligned-image-1

Refresh the effect and you should see the shadow rendering in the scene.

Tip
Tip

Make sure the AR Plane is below the Cube or else you will not see the shadow.

Matte Shadow properties

Render State 0

Depth Test: If checked, depth test should be performed and compared in the depth buffer. The default is checked.

Depth Write: If checked, the geometry depth is written to the depth buffer. Uncheck it if you are rendering objects that are transparent. The default is checked.

Depth Function: Determine how the depth testing gets performed.

  • Default: Less Equal.
  • Never: The depth test never passes and the object will never be rendered.
  • Less: Draw the part of the object when it is in front of the existing objects and hide the parts that are behind the existing objects.
  • Equal: Draw the part of the object that is at the same depth as the existing objects and hide the parts that are in front or behind the existing objects.
  • Less Equal: Draw the part of the object that is in front or at the same depth as the existing objects and hide the parts that are behind the existing objects.
  • Greater: Draw the part of the object that is behind the existing objects, and hide the parts that are in front of the existing objects.
  • Not Equal: Draw the part of the object that is not at the same depth as the existing objects.
  • Greater or Equal: Draw the part of the object that is behind or at the same depth as the existing objects and hide the parts that are in front of the existing objects.
  • Always: The depth test always passes. Always render the object with the material.

Color Mask: R: Red G: Green B: Blue, and A: Alpha channels. If unchecked, it will be prevented from writing to the unchecked channel into the render target.

Cull Mode: Polygon has front and back sides.

  • Default: Back
  • None mode will make both inside and outside faces renderer.
  • Back: If you choose Back, it won’t render polygons that face away from the viewer.
  • Front means rendering inside facing polygons.

Blend Mode will instruct how the current material will blend with the background.

  • Default: Transparent