Layered Clothing is a new and powerful feature that lets you create 3D clothes and accessories that nearly any avatar can wear with any combination of other layered clothes. Layered clothing naturally stretches over an avatar body and layers over other layered clothing items without clipping or breaking.
We recommend building a base body character upon which you can fit the layered clothing you’re creating. We’ll go over how to do this in an external DCC application and combine it all in Studio to create the final character from the space station.
Building the Custom Character
We wanted the users in our experience to embody someone sent to the station to investigate some disturbing events. We weren’t sure early on what our actual character would be or if there would be multiple types of characters, but we wanted them to wear space suits. Because of this, we decided to make the clothing a separate component which would allow flexibility in our design.
We ultimately settled on a single character design that we named “The Visitor,” but layered clothing allowed us to create a main character while also releasing the clothing to the Marketplace as a modular component. As a creator, you’ll be able to do the same soon, so follow along to see how we did this.
Making the Base Body
The base body is essentially the lowest layer of the layered clothing system. This can be anything from our character’s body in underwear, to a fishman or even a blocky avatar.
Layered Clothing Checklist
- The body geo, cage parts, and skeleton must conform to the
articles/using avatar importer|R15 schema.
- The body cage must use the cage supplied by Roblox.
- The cage should be in the same number of parts as the body geo, with the suffix _OuterCage.
- LeftUpperArm_Geo (mesh)
- LeftUpperArm_OuterCage (cage)
- The poly budget for each part cannot exceed 10,000 triangles (Studio will reject).
- Character size cannot exceed 2000×2000×2000 units.
Making the Model
Layered Clothing lets clothes fit on almost any kind of body, whether it be a fishman, a rock golem, or a human space explorer. The only requirements are that they be bipedal humanoids.
You should model the character in a neutral and natural pose. This allows a more full range of motion when animating, and also gives you implied directionality to movement. Implied directionality means that when you’re building your character’s skeleton, the joints have a small bend in them to know which way they should naturally bend. The following examples show a very small bend in the arms and legs to allow for this. We also posed the hands in a natural posture that could still hold onto something if we wanted items or gear in our experience.
The silhouette, or the shape of your character, should also be distinct and discernable to another player at a distance, which is important for multiplayer experiences. This cuts down confusion and helps users know what is safe or dangerous when a lot of things are going on.
An important note about the base character: Since this is a player avatar, and we wanted to eventually release the body and clothing on the Marketplace, it still needs to follow the R15 schema. This includes the body being separated into 15 parts.
To make sure the parts still appear contiguous, it's recommended you cap your mesh components and then use your application to “average” the vertex normals between body part “seams.” This will treat the two vertices on either side of the body part as one, with regards to the surface normals.
Texturing your characters lets you bring them to life based on how you want them to look. For the space station, we wanted a character that was a similar level of realism as its surroundings and settled on the following character:
Now we’ll go over how to get textures into Studio and make sure the character looks great and fits into the experience.
Before texturing, we did a range of motion tests by moving the character joints and posing it to make sure the model deforms well. It’s not always necessary to do a range of motion tests before texturing, but it’ll help you catch surprises in your model before you put hours into the textures. After that, we separated the rig from the mesh (unbound it) to focus on texturing. It’s not advisable to do texture work, or anything beyond animating, once a character is bound to its rig.
To allow for skin-tone controls for the Marketplace, we made areas like the shirt, shorts, gloves, and boots fully opaque. However, for the areas with exposed skin, we used partial transparency to allow for details to be added to the skin tone, but not completely override it. This allowed us to enhance features of the anatomy beyond what Studio’s current lighting can do.
The following images show color (albedo), metalness, roughness, and normal maps.
And the following images show skin tone transparency in action in Studio, and show the same color map with transparency and a skin tone color applied.
Once we established the base body, we needed to cage it so that layered clothing could fit on it. Cages are the way that the clothing and body interact. Both the body and the clothing have the same cage, deformed by the user to define the clothing’s fit. The body cage tells the clothing the shape of the character without all the fine details of the mesh itself. The clothing’s inner cage defines how tight the clothing’s fit is.
The first pass of fitting the cage, for now, needs to be done within an external DCC application. You can use the cage supplied by Roblox to start.
The cage for the body is largely the same as that of the clothing, except the final result is a cage that has 15 parts (each corresponding to a body part mesh). Below is the “editable” cage which is a single mesh, the cage parts which are deformed by editing the “editable” cage, and the mesh itself.
When you first start with the cage, it’s very likely it won’t match your character, so you’ll need to adjust the “editable” cage, or the parts directly, to fit to the outer bounds of the body mesh. As with clothing, the outer cage should always fit outside the body mesh, so that clothing knows the shape of the body itself. It uses a “twin” cage in the clothing to essentially snap clothing to this outer cage (we’ll go over this in more detail below).
We decided that we wanted the outer cage to cover the skin, but not the gloves and boots. Other than those areas, you’ll see that the cage fits as best as it can outside the body, including the face cage matching the distance and shape of facial features.
Skinning the character, similar to Custom Characters, is what gives the organic bending and twisting of your character when moving through the environment. We found the following guidelines useful, so that the character mesh imports correctly into Studio:
- Individual joints and bones must have unique names.
- Meshes should have no transforms prior to skinning/binding; in other words, transforms should be 0 and scales should be 1.
- Mesh normals should face outward (the model shouldn’t look inside-out).
- Skeletons shouldn’t have any scale factor; all joints should be [1, 1, 1].
Skinning this character was a bit more difficult given the limitations of joint count, but here are some notes from the work we did:
- When skinning a human with clear anatomy, it’s best to paint your weights so that bending looks natural, for example the shoulder muscle stretching or compressing when you move the arm up and down.
- Another common issue with skinning humans is that skinning defaults will often times be “too smooth,” meaning areas like the elbows and knees will have influences distributed too much. It’s best to paint them tighter so your legs/arms don’t compress when they bend.
- Lastly, because your model is split into 15 parts, you’ll need to make sure seams between the parts are 1:1 in terms of weighting. Most applications will allow you to copy influences from one vertex to another so they have the exact same weighting.
Gloves and Boots
As you’ll notice from the base body, we decided to include gloves and boots. You might want to do this temporarily as well, for the following reasons:
We wanted gloves to be part of the Layered Clothing suit, but gloves aren’t currently supported in the Layered Clothing feature, so we replaced the hands of our initial model with one that had gloves.
We wanted the metal ring of the shoe to be rigid and not deform to fit the foot and leg, so we replaced the feet of our initial model with one that had boots.
To make sure Layered Clothing didn’t try to fit around the boots or gloves, we intentionally kept the cages inside them. This enables the top and bottom of the space suit to deform to the hands and feet.
Building the Suit
Early on in the process, we decided that the suit should fit onto multiple characters, and that we wanted to release the assets to the Marketplace so others could enjoy the clothing. In addition to Layered Clothing, our character needed “hardpoint” items like a helmet and backpack as finishing touches. The following image shows how the space suit looks on a variety of characters.
We found the following guidelines useful when building Layered Clothing:
- The exported .fbx file from your DCC application must contain the clothing mesh, inner cage, outer cage, and skeleton.
- The way you name your clothes is arbitrary, but both cages need to have this naming format:
- [clothing name]_InnerCage
- [clothing name]_OuterCage
- You must skin clothing to the R15 skeleton with a maximum of 4 influencers.
- Your R15 skeleton must follow this
articles/using avatar importer|naming schema.
With those guidelines in mind, here are the steps we followed to build the space suit:
Use the Roblox Layered Clothing cage template, a base frame that you can use to fit clothing to. Depending on the distance of the clothing to the frame, you can have clothing that is tight or loose fitting.
Model the clothing to the frame and sculpt a higher-poly model in an external DCC application.
Rebuild the lower-poly, game-ready version of the higher-poly model. If you’re interested in more information about this process, there are many tutorials online for high-poly to game-ready models. Note that clothing does not need to be split up into parts corresponding to the body parts they’re covering; it can be a single mesh.
Test the movement and fitness on other characters prior to finalizing any textures.
Define the “outer cage” or the outer bounds of the clothing item. This tells any additional layers how tightly to fit to the astronaut suit top.
After caging, it may help to temporarily skin the clothing to the skeleton in the template file, just to do a range of motion test. By posing the rig in different positions, you can confirm it deforms well before finalizing texturing. If you do this, be sure to unbind before moving to texturing!
After we skinned the clothing, and it moved the way we intended, we moved to texturing.
- Because we wanted to aim for realism, we used surface appearance for the beautiful PBR materials. We brought this into a texturing application to make the albedo, metalness, roughness, and normal maps. This allowed the outfit to have parts that looked metallic and others to look more like rough canvas.
Before going much further, we brought the model and textures into Studio to test the materials with the proper lighting in the space station. This led to some adjustments to the metalness of the arm and torso bands.
When texturing your clothing, keep the following points in mind:
- For surface appearance, make sure to include color (albedo), metalness, roughness, and normal maps.
- Without metalness, the surface appearance defaults to 0 metalness, or a plastic surface.
- Without roughness, the surface appearance defaults to 0 roughness, or a smooth surface.
Skinning clothing is required to have it bend properly with the base body. By skinning it, you’re also telling the animations how the clothing should bend, including which parts are rigid or move with the character.
Luckily, unlike the base body, you don’t need to split up your clothing, so the suit top can be a single mesh and skinned as such. To save yourself time, most applications will allow you to only skin your mesh to certain joints. The joints we wanted to affect the suit top were only upper/lower torso, upper/lower arms, and the head. Not binding to the whole body saved time removing unnecessary weighting.
Much like the body, though, you’ll want to skin this so it bends naturally given its material. This meant for the middle plastic section, we had a solid weighting to the upper torso.
Since the gloves were going to be rigid, and the suit top stopped well above the wrist, we didn’t feel it was necessary for it to bend with the hands.
Once skinning on the suit top was done, we simply repeated the same procedure on the pants to get them ready for Studio and bringing into the engine!
Importing to Studio
When the clothing looked good in our DCC application and in Studio, we were ready to import it into Studio and use the Accessory Tool, an upcoming release which will help you refine the clothing’s cages to get the best fit possible. The tool can also export clothing as an accessory, which lets you add your clothing to a character.
In Studio, we named our Layered Clothing items with an LC_ prefix, so we could distinguish between them and legacy style accessories (the helmet and backpack parts of the suit).
Building the Helmet
The helmet is an important element of the suit. We wanted users to see the character’s face and also capture the sheen of the helmet’s glass surface.
Accessories where we don’t want deformation to fit the head, like this helmet, are best built as “hardpoint” accessories, which are the types of accessories that you currently find in the Marketplace. The main difference with the helmet and what you find in the Marketplace is that it uses
SurfaceAppearance, which creates convincing plastic and metal looks and gives the helmet visor some transparency.
Making the Model
We established a good silhouette when we placed the helmet on the character’s head.
We reused the trim maps from the space station to keep the amount of textures to a minimum. We modeled the helmet with enough separate sections so we could place the UVs to best utilize the texture maps.
We then used the same trim maps we used in many areas of the station.
Importing to Studio
When we had the helmet roughly fitted and placed in our DCC application, we could then import it into Studio with all the effects we wanted.
- We initially imported the helmet using the Asset Manager, but because it’s a single mesh, you can also drop a
MeshPartinto your place and specify the
MeshPart/MeshId|MeshIdusing the Properties panel.
- We then added the texture maps via a
SurfaceAppearanceobject on the mesh part. This process took some tuning to get the ideal alpha on the color (albedo) map, so you could see through the helmet without it being fully transparent.
- Because we wanted some suits to be clean and some to be dirty without having to use multiple textures, we added decals to the same object to create this effect. Decals work by planar projecting onto each surface.
- We wanted a light beam and light to indicate which way the user was facing in dark rooms and to illuminate the areas that they’re walking through. To do this, we used attachments, because you can add an arbitrary amount of them, and because they’re not parts, they’re valid in accessories. You can use attachments for particle effects, beams, or lights as in the following example.
Introducing the Accessory Tool
This section outlines the upcoming Accessory Tool which can be used to edit layered clothing accessories, soon to be released as a public beta.
With so many components being built in parallel, it can be a little hard to know if your assets fit exactly and look the way you want. However, with the upcoming Accessory Tool, fitting and refining clothing is much easier. We used this tool to set up the character’s top and bottom, as well as the hardpoint helmet and backpack accessories.
Here’s a summary of using the Accessory Tool for layered clothing:
We first fitted the suit’s top to the character. Luckily, the fit was great and our inner cage conformed to the body well. We also tested the outer cage with other clothing items. When we were happy with the fit, we used the tool to generate the appropriate accessory for the Marketplace.
With the suit’s bottom, we wanted to adjust the fit within Studio because they were initially too bulky. Using the point editor, we nudged things to get them into position. Like the suit top, we made it into an accessory.
For the helmet and backpack, we adjusted these by just scaling, rotating, and moving them where we wanted, because they don’t have cages.
Seeing how the helmet fits without the rest of the suit is tricky, so we used the Accessory Tool to visualize the top and bottom of the suit. This allowed us to ensure the fit would align with the suit’s top.
With the helmet, backpack, top, and bottom complete, we were ready to see how this character looked in our space station. We copied and pasted the accessories onto the character and were able to see how they fit. We then placed the character in our place file and confirmed all the materials, lighting, and other effects were exactly the way we wanted.
Previous Custom Characters Next Sound Design