Performance when working with models in the SDK

(Updated 09/04/2019)



Update rate

When displaying models on the SDK, performance may be degraded depending on the order in which ArtMeshes are drawn.
Cubism models are drawn one ArtMesh at a time from the back (canvas side).
As you draw an ArtMesh on the screen, if it has different drawing settings than the ArtMesh you drew just before, it will perform poorly on the SDK.
Settings where switching will degrade performance are as follows.

  • Texture used by the ArtMesh to be drawn
  • Drawing mode (normal, additive, multiply) of the ArtMesh to be drawn
  • Whether the ArtMesh to be drawn is clipped or not

These factors will affect each other.
Clipping switches settings even if the texture, drawing mode, and ArtMesh that serves as the mask are the same.

For example, suppose a model with two textures and some ArtMeshes are placed in the following order from the back.

[Name] [ID] [Drawing Settings] [Switchover occurs]
Right eyelash ArtMesh6 Texture: Second one
Right eyebrow ArtMesh7  
Right cheek ArtMesh8 Drawing mode: Multiply
Right Highlight ArtMesh9 Clipping: Right white eye, drawing mode: Additive
Right pupil ArtMesh10 Clipping: Right white eye
Right white eye ArtMesh11    
Left eyelash ArtMesh16  
Left eyebrow ArtMesh17 Texture: Second one
Left cheek ArtMesh18 Drawing mode: Multiply
Left Highlight ArtMesh19 Clipping: Left white eye, drawing mode: Additive
Left pupil ArtMesh20 Clipping: Left white eye
Left white eye ArtMesh21    

These ArtMeshes are drawn in order from the bottom of the table.
When lined up like this, the drawing settings are counted from the bottom of the table and the changeover occurs 10 times.

If this drawing order is rearranged as follows, the number of times the drawing setting is switched is reduced to seven times.

[Name] [ID] [Drawing Settings] [Switchover occurs]
Right eyebrow ArtMesh6 Texture: Second one  
Left eyebrow ArtMesh16  Texture: Second one
Right cheek ArtMesh7 Drawing mode: Multiply  
Left cheek ArtMesh17 Drawing mode: Multiply
Right eyelash ArtMesh8    
Left eyelash ArtMesh18   ○ 
Right Highlight ArtMesh9  Clipping: Right white eye, drawing mode: Additive
Left Highlight ArtMesh19 Clipping: Left white eye, drawing mode: Additive
Right pupil ArtMesh10 Clipping: Right white eye
Left pupil ArtMesh29 Clipping: Left white eye
Right white eye ArtMesh11    
Left white eye ArtMesh21    

The order and switching status of ArtMesh can be checked in Cubism Viewer for OW.
If you set up a deformation in which the order of drawing changes depending on the parameters, it becomes difficult to predict the number of times it will switch.


Also, be careful not to use too many of the following objects or too many settings for each status, as it will affect performance on the SDK.

  1. Number of ArtMeshes
  2. Number of polygons
  3. Number of deformers
  4. Number of Deformer transform splits
  5. Number of Deformer parent-child hierarchies
  6. Number of parameters set for one object (ArtMesh, deformer)

Of these, 6 has a particularly large impact, and it is basically recommended that up to two settings be used.
This is because the amount of blending computation between the key forms of the parameters increases with multiplication.
-> Reference: Key Forms (parent-child relationship movement)

For example, if two parameters are set for one ArtMesh, a blend calculation is performed for each parameter, and then the results of each calculation are further blended together.
Therefore, the more parameters set, the more blending calculations are required.


Otherwise, if the ArtMesh or deformer falls outside the range of the parent warp deformer, performance is reduced due to the increased processing load.
For more information on what to look for when establishing a parent-child relationship, see the Parent-Child Relationship Combinations page below.
Combination of parent-child relationship


Initialization speed

Extended interpolation is a function that curvilinearly interpolates linear interpolation of parameters, and as an entity automatically generates a specified number of keyforms for extended interpolation between keyforms.
Therefore, when extended interpolation is set on an object with multiple parameters, the size of the model file increases proportionally because the key forms added by extended interpolation are multiplied with each other.

Please note that when dealing with extended interpolation in the SDK, there is little impact on performance during execution, but there is a slowdown when loading the model.



If the mesh of the mask occupies a large area of the displayed screen, the resolution of the mask on the screen will be reduced and fine detail may be lost.
This occurs when a mask created at a smaller size than its actual size is enlarged to a larger size, because the resolution of the texture that generates the mask does not change.

To avoid this, avoid using large masks.

© 2010 - 2022 Live2D Inc.