Organize the Overlap of Multiple Models

This page is for Cubism version 4.2 or earlier. Click here for the latest version.

This section describes situations in which model parts overlap when models are displayed on top of each other and how to resolve them.

Summary

When multiple Live2D models are displayed on top of each other, the ArtMeshes of each model may overlap each other.
To work around this, use the CubismRenderController component attached to the root of the model.

Details

When models are displayed on top of each other, sometimes parts are displayed overlapping each other as shown in the following image.

In this case, the problem can be solved by changing the value of “Sorting” -> “Order In Layer” in CubismRenderController.cs, which is attached to the model.
The higher the value of Order In Layer, the more it appears on the positive side of the Z axis.

Using this, if you set the Order In Layer value of the model on the left side to 1, it will appear in front of the model on the right side.

Note on the Order In Layer values:
The values you enter will vary depending on how you draw the model.

If the model’s Rendering Mode is “Back To Front Z,” small values (1 or 2) will solve the overlap problem.
If the model’s Rendering Mode is “Back To Front Order,” a somewhat larger number (100 or 200) is required.

Was this article helpful?
YesNo
Please let us know what you think about this article.