Skip to main content
Version: 4.0.0

Render Group and Rendering Order

A render group is a container that groups related objects together to optimize rendering. When an object is added to the Hierarchy panel, it is automatically included in a render group.

Cameras in a Render Group

A render group has a default camera that is responsible for rendering the objects that belong to that group. You can add more cameras to a render group in the Hierarchy panel and define their render order and layer in the Inspector panel.

note

The Post Effect render group does not have a visible camera.

Objects in a Render Group

All objects added in the Hierarchy panel are added to a corresponding render group. The following are types of render groups in the order they get rendered in the scene.

  1. 2D Background Effects
  2. Generative Effects
  3. Filter
  4. Face Mask Effects
  5. Segmentation Effects
  6. Face Shape Effects
  7. General
  8. AR Tracking
  9. 2D Foreground Effects
  10. Post Effects
all render groups

For example, the Face Mask object is assigned to theFace Mask Effects render group. If you add a Face Mask object, it will appear in the Face Mask Effects render group in the Hierarchy panel. If you add another Face Mask object, it will also appear in that same Face Mask Effects render group.

add face mask

The default order of render groups was determined to optimize your effect with built-in filters in TikTok. You can ensure best practice for effect creation by using the render groups in the default order.

Add a Render Group

Render groups are automatically created in the Hierarchy panel when objects are added. By default, a new project comes with a light and camera object in the General render group.

If you want to manually add a render group, right-click in the Hierarchy panel and click Add Render Group.

tip

To ensure optimal performance, avoid duplications of the same types of render groups. It is also recommended that you group the same types of objects in one render group. It is best practice to create multiple cameras in a render group instead of adding multiple render groups.

Rename a Render Group

While render groups have default names, you can rename them by right-clicking the group in the Hierarchy panel and clicking Rename.

Rendering Order

The placement of render groups in the Hierarchy panel determines the order in which they get rendered. The render group at the top of the Hierarchy panel will render first, while the render group at the bottom will render last.

You can modify the rendering order by dragging a render group and dropping it in your preferred placement.

drag and drop

Usage: Render a Face Mask in Front of an Image

Start by adding an Image object by clicking the Add button [+] > 2D > Image in the Hierarchy panel. The Image object, along with a camera and canvas, is added in the 2D Foreground Effects render group.

add image

Next add a Face Mask object by clicking the Add button [+] > Face Effects > Face Mask in the Hierarchy panel. The Face Mask object, along with a camera, is added in the Face Mask Effects render group.

add face mask

To have the Face Mask object appear in front of the Image object, drag the Face Mask Effects render group and drop it at the bottom of the Hierarchy panel. The Face Mask object will now render last.

move face mask

Usage: Render a 3D Object in Between a Portrait Segmentation and Background

Start by adding a Portrait Segmentation object by clicking the Add button [+] > Segmentation > Portrait Segmentation in the Hierarchy panel. The Portrait Segmentation objects, along with a camera and canvas, are added in the 2D Background Effects render group.

add portrait segmentation

Next add a Sphere object by clicking the Add button [+] > 3D > Sphere in the Hierarchy panel. The Sphere object is added in the General render group.

add sphere

With the default render order, the Sphere object will render on top of Background. Thus, you must separate Portrait and Background by first duplicating the 2D Background Effects render group.

Right-click the 2D Background Effects render group in the Hierarchy panel and click Duplicate. Then drag the duplicated 2D Background Effects render group and drop it at the bottom of the Hierarchy panel.

drag and drop duplicated background

Since you want Background to render first, you should disable Portrait in the original 2D Background Effects render group. Then disable Background in the duplicated 2D Background Effects render group. This will ensure that Background renders first, followed by the Sphere object, and then Portrait.

portrait background