Caging is a complex process required to define the inner and outer surface of a layered accessory. Properly caged assets allow your layered accessories to stretch and layer in combination with each other. Cages that are improperly configured can lead to cosmetic issues with the look and feel of your layered accessory.



A high-quality cage matters because it affects:
- Fit and layering - Cages define how a layered accessory wraps over the body and over other layered accessories. Poor cages cause clipping, unnatural stretching, or accessories that don't stack correctly.
- Hidden surface removal - Hidden surface removal (HSR) hides the parts of the body underneath a layered accessory. HSR only works when the inner cage is completely inside the layered accessory mesh and the outer cage completely encloses it.
- Body shape compatibility - Characters come in many shapes and sizes. Precise cages help a layered accessory fit as well as possible on every body, not just one.
- Inflation control - The outer cage of the body and the inner cage of the layered accessory define the space that the accessory occupies. Imprecise cages cause unnatural puffing or clipping.
- Animation - Cages drive how a layered accessory fits and moves with the skeleton, especially when it uses auto-skinning. Sloppy cages create visual artifacts during any animation other than idle.
In extreme cases, improper cages may interfere with gameplay or social elements on Roblox. If your asset includes improper cages, Roblox may prevent you from uploading them to the Marketplace and may remove existing assets with improper cages from the catalog.
The following best practices and common issues are useful for avatar asset creators of all levels and can elevate the quality of your layered accessory creations and save time with troubleshooting.
Best practices
Always start any caging work with one of Roblox's provided caging templates. These templates include an inner cage and outer cage with properly set UVs.
When caging your layered accessories, use these important universal guidelines:
Any clothing mesh positioned between the inner cage and outer cage will be deformed by the layering system. This is the typical configuration for nearly all layered accessory assets.

The t-shirt mesh fits snugly between the inner and outer cage. 
The correctly configured t-shirt naturally stretches over a target body. 
Other layered accessory assets should stretch and fit naturally over a target body and any equipped caged assets. You must follow the naming conventions for the layered accessory geometry and the cage.
Don't change the vertex count or UVs of either cage. Cages are deformers that rely on matching vertex counts and UVs to deform correctly. If either changes, the layered accessory distorts or fails to deform.

Model the layered accessory on the character body it's intended for. This is easier to visualize than modeling directly against a cage. For the best results, use the outer cage of the body as the inner cage of the layered accessory.

A coat modeled on the character body it's intended for. 
The outer cage of the body becomes the inner cage of the coat. Make sure the layered accessory mesh covers the inner cage everywhere. If needed, adjust the mesh to fit over the inner cage so it fits over the body and other layered accessories without intersecting them. For an example of what goes wrong, see Clothing inside inner cage.

Many caging issues start from incorrect outer cage setup. For more information, see Working with outer cages.
Do not modify areas of your cage that are unrelated to the layered accessory you are caging. For example, do not modify the inner or outer cages of the lower leg areas when caging a t-shirt.
Review any specific best practices for form-fitting clothes, bulky clothes, and clothing with protrusions.
If troubleshooting any issues, review common issues to help identify problematic layered accessories or specific validation errors.
Working with outer cages
To create an outer cage, duplicate the inner cage and edit only the areas where the layered accessory sits. Offset the vertices along their normals, and use retopology tools that snap the cage to the layered accessory mesh for an accurate, close fit.


As long as the clothing mesh properly fits over the inner cage and under the outer cage, you can edit the outer cage in various ways depending on the final visual effect you intend to achieve.
When working with the outer cage, use the following guidelines when possible:
Move vertices outwards in the normal's direction.

Keep the outer cage as close to the clothing mesh as possible without intersecting it. Because the cage has a different topology and a lower resolution than the layered accessory mesh, this can be difficult. A close outer cage lets the next layer fit closely without intersecting the layered accessory, and keeps it from looking puffy or floating away from the body.

Keep the outer cage similar in shape to the inner cage. Treat it as an offset along the normals rather than reshaping or distorting it to fit over the mesh. This reduces distortion in the next layer.


Work symmetrically as much as possible to save time.
Do not alter the UVs in any way.
Do not stack your vertices.

Two vertices stacked directly over each other. This will introduce visual artifacts when layering other layered accessories on top. Keep the vertex, edge, and face count exactly the same as when you started.
Keep your cage's edge spacing as evenly as possible.


Keep your cage's break lines between body parts lined up to the joint's position as possible. For example, try to align the elbow to where the LowerArm joint is located.

Proportional changes can help improve animation and posing quality.
Caging form-fitting clothing
Form-fitting clothing, like t-shirts, yoga pants, shorts, sweaters and slim jackets, are the most common type of layered accessory.
In this case, the outer cage needs to completely envelop the layered accessory with minimal gaps between inner cage, clothing mesh, and outer cage.
- Move outer cage vertices outwards to completely cover the layered accessory, while maintaining the silhouette of the clothing mesh as much as possible.
- Do not move outer cage vertices that don't contribute to covering the layered accessory. For example, don't move outer cage vertices in the lower leg when the layered accessory is a t-shirt.
- The entire layered accessory should be located in-between the outer and inner cages.
Caging bulky clothing
Bulky clothing, like puffy jackets, sweat pants, and hoodies, require additional displacement of the outer cage vertices to envelop the bulky asset. The outer cage should still completely wrap the external surface of a bulky item.
- Pay special attention to the direction neighboring outer cage vertices are moved.
- Move along vertex normal directions as much as possible.
- Move vertices nearby each other more or less along the same directions (smooth relative displacements).
- Avoid moving vertices that are not covered by the layered accessory, such as moving vertices in the arm region if you are making pants.
Caging protrusions
Some clothing items have assets that protrude or extend past the rest of the clothing. Examples include clothing with puffy hoods, shoulder pads, and spikes.



To ensure that the protruded region stays visible independent of the number of layers:
- Leave the protruded region outside the outer cage. Alternatively, edit the outer cage to pass under the regions that are meant to be visible and undeformed.
- Avoid moving vertices that are not covered by the layered accessory.
Caging examples
The following examples show caged layered accessories of different types.
Skirt


Tall boots


Scarf


Shoulder pauldrons


Hat


Hair


Common issues
Improper caging can cause various rendering and deformation issues. The following common examples can help diagnose and troubleshoot any caging issues you may encounter.
Uneven caging
Unexpected outer cage shapes cause issues when other layered accessories are equipped. While the layered accessory may fit correctly on a target body, any additional layers will fail to stretch and deform appropriately.


Identical inner and outer cage
If the inner cage and outer cage are exactly the same, the layered accessory system cannot properly determine the accessory and may not deform or deform unexpectedly.


Clothing inside inner cage
Any part of the clothing mesh positioned inside the inner cage will introduce visual artifacts when the layered accessory is layered on top of other clothing. You should always avoid this type of configuration.


Clothing partially outside outer cage
Any part of the clothing mesh positioned outside the outer cage will not be deformed by the layered system. This configuration can sometimes be intentional for effect, such as when caging layered accessories that include protrusions.


Oversized outer cage
Ensure that the gap between the layered accessory and the outer cage is not too large. This can cause severe deformation issues when combined with other layered accessories.

Collapsed cage vertices
When cage vertices are collapsed into one vertex or a small region, any additional layer placed on top of your layered accessory will have weird artifacts near the collapsed region.

Cages with missing limbs

The cage is meant to match the shape of the template body used to model your layered accessory. Cages without heads or missing limbs won't work properly with the layered accessory system.
Outer cage inside the inner cage
Setting the outer cage inside the inner cage creates a layered accessory that can't properly layer with other assets.

Mesh outside of outer cage
Layered accessories placed outside their outer cages do not deform. If the layered accessory is completely outside then it will behave similar to a rigid accessory.

