Masking
Overview
Items in ZEPETO are placed in the same space as the base ZEPETO avatar. This can cause a variety of potential issues. One issue is that the area of the body that would be otherwise unseen underneath or behind the item can reduce app-performance, as the unseen body would still be computed, despite being visually hidden. Another issue is that the body and the item can intersect through each other, creating an unappealing error that can look like a glitch. Items may have sections where the underlying body should be replaced with a body created for the item. Well-applied masking can help mitigate these issues.
To mask the body below the item, we can use vertex colors applied to the mask mesh object to apply a black and white mask. This vertex color data will be interpreted in Unity to disable sections of the ZEPETO avatar for use in-app to improve performance and reduce clipping.
Requirements
- The mask needs to be rigged on a T-pose armature
- The vertex colors should either be solid black or white
Workflow
The masking process is a relatively simple process. With the mask object selected and in Blender’s vertex paint mode, color data will be applied to the mask mesh using 3D paint tools.
Use the 3D mask object provided by ZEPETO in the Creator Base Set file, or the same mask file provided by the mask object file.
- With the mask object selected, go to vertex paint mode
- Set the paint color to black and set the brush falloff to constant
a. In Blender 3.3, the vertex paint brush has two color slots for a foreground and background color. They are set to black and white as default. To switch colors between foreground and background slots, you can use the ‘x’ key or the “Swap Colors” button in the tool settings toolbar.
- Using the vertex paint tool, paint the mask mesh black where the item covers the mask
a. The black painted portions of the mask should not extend past the clothing item
When the masking process is complete, clear the parent on the mask object with the “Clear and Keep Transforms” option.
Also make sure that the Armature modifier is removed in the Modifiers tab. This will help prepare the mask for export.
Updated 10 months ago