What is Garment Support and how does it work?
This page will teach you how garmentSupport works – the system that Cyberpunk2077 uses to tuck pants into boots and shirts under jackets. It contains theory, which you don't need to understand to use the system.
Credit goes to psiberx (discord post with initial explanation of the algorithm), island dancer for providing screenshots and know-how, and Auska for making morphtarget/garmentSupport import able in Wolvenkit.
If you want to create garment support, check Garment support from scratch
If you want to use garment support in an existing mod, you only need to use #component-prefixes
If your garment support is shrinking too far, check Painting garment support parameters
If you have other problems, see #troubleshooting-garment-support at the end of the page.
The engine morphs garments to avoid clipping — for example, if you equip a pair of boots and V's jeans no longer cover the shoes, but get tucked under.
This process is accomplished via 'parameters' on the mesh:
GarmentSupport only works on actual garment items that have been equipped using the game's transaction system. As of October 2024, that's not the case for NPCs. You'll have to go refitting!
Garment support will be applied based on garmentScore. For this, the prefix of the component name will be considered (components are named in your .app or .ent file's component array).
A high garment score means that the item is "on top", squishing anything worn "below". (See #the-algorithm for details.)
The prefixes are as follows:
h0_
t0_
s0_
l0_ ...
Any component with a 0 in its prefix will be treated like a body mesh (no deform/squishing of any meshes with x0_ prefixes across .ent files)
h1_
Head inner (mask, sunglasses)
h2_
Head outer (helmet, bandana)
t1_
Torso inner (shirts)
t2_
Torso outer (jackets, coats...)
s1_
Shoes
l1_
legs (pants that aren't leggins)
TL;DR: High garment score means "on top", items below will get squished.
Components with the same prefix in the same .ent file will not squish each other, e.g. l1_stockings
and l1_pants will not deform each other, but they will deform s1_socks
The game calculates the garment score by checking the prefix of component names, where the one with the lowest prefix is the innermost:
After considering the component name, the game will consider the tags in the .ent's visualTagSchema
:
An example for t0_000_pma_base__full
(the default body component, torso+legs):
Check Painting garment support parameters — paint it red, baby!
It's not doing that to spite you. Most likely, you have a non-unique component ID, and the game can't tell the two items apart. Here's how to resolve that:
If that doesn't work, you still have the option to re-create Garment support from scratch in Blender
If you're fed up with this shit and just want your item to stop cosplaying as an exploding pixel cloud, you can use #option-2-guaranteed-to-work-delete-garmentsupport-from-the-mesh.
This will prevent your garment from shrinking under other, "larger" garments, and practically guarantee that it clips.
Adding garment support to a mesh that doesn't have it
Created on: 29. 12. 2023 by Last documented update: Nov 10 by and
This guide will teach you how to add garment support to a mesh that doesn't have any.
To learn what garment support is, check Garment Support: How does it work?
For general Blender editing tips, check Blender: Getting Started
You should know what garment support does, because it won't be explained here.
This guide assumes that you know your way around in WolvenKit. If you don't and you want to mess with this, kudos — I salute your frustration tolerance. In this case, the wiki's search function will be your new best friend.
>= 8.15
You can't make mods without Wolvenkit
>= 4.2
3d editing software
The Wolvenkit Blender Addon. You can't import/export to Blender without it.
As a preparation for our garment support, we need a base that we'll shrinkwrap to. For this guide, we'll be using the full player body in a single mesh.
You need the following files:
Import all those meshes to Blender, then join them all into a single mesh:
In the viewport, click anywhere to deselect everything
Press A
to select everything visible again
Shift-click on something (e.g. the head) to deselect it
Shift-click again to re-select it (you need a most recent selection)
Press Ctrl+J
to join all those meshes together
Optional: Clean up
In the outliner on the right, delete all empty collections
Double-click on your mesh and rename it to something, e.g. body
You should be looking at something like this:
This is the base that your items will shrink to, thus not-clipping. Neat, isn't it?
You only need this if you're layering garment support — for example, shrinking a custom-made decal under a jacket. Don't do this with the base body, it will shrink on its own to stay underneath the clothes!
If you're using a custom mesh as the base, you need two prerequisites:
Join everything, so that you have only one mesh. This mesh must cover everything that yours can potentially shrink to - if you fit the Netrunnner suit without the head mesh as part of the body, the collar will clip into the neck when you're wearing a coat
You need to activate garment support on the mesh. You do this by switching to the Data tab and setting its Value
to 1:
Import a mesh that needs garment support. In Object mode, select it by clicking on it so that it has a yellow outline like the body in the picture above, and switch to the Data
tab on the right:
The Shape Keys
dropdown should be empty. (Otherwise, hit the -
button until it is).
Click on the +
button to create a shape key with the name Basis
. This is the garment's original shape and will tell Cyberpunk how it looks when it's not squished.
Repeat this process for every submesh (submesh_01_LOD_1
and submesh_02_LOD_1
on the screenshot above)
Switch to the Modifiers
tab (the blue wrench icon, it's active in the first screenshot)
Add a shrinkwrap
modifier
Target it to the mesh from the previous step (e.g. body
):
optional: Add a small offset
(e.g. 0.001
) to make it not-clip. If the mesh you're shrinking to has garment support and you haven't enabled it, this isn't necessary.
You will now see that the garment has shrunk down to the body's dimensions — this is how the game avoids clipping.
Apply the modifier as shapekey:
You will now see that the garment un-shrinks itself: that is because the shapekey isn't active.
Switch to the Data
tab again (the green triangle). There is a new shapekey now; it's called Shrinkwrap
.
If you want to see it in action, set its Value
to 1.
Rename it to GarmentSupport
(capital G and S, no spaces — double-click on the name):
That's it, your mesh has now garment support. Rinse and repeat the process with the other submeshes, then export everything back.
You still need to use component name prefixes for garmentSupport to become active. If that wasn't it, check your shapekey names for typos or trailing spaces.
Try re-doing the shrinkwrap, but with a higher offset instead. Try something like 0.002 or so, whatever works for you.
Try making some garment support parameters! Check out Painting garment support parameters for guidance.
Make sure that your mesh has the property checked (this should be default by now).
Wolvenkit |
>= 1.6.0 (download tags )
Vertex painting in Blender to fine-tune the morphing behavior of Garment Support
Created on: 28. 10. 2023 by Last documented update: Feb 12 2025 by
This page will describe the two color attributes used by Garment Support and how to edit them in Blender.
Make sure that under Color Attributes you have the parameters _GARMENTSUPPORTWEIGHT
, _GARMENTSUPPORTCAP
and Color
, and that the first two are in the format Vertex > Color while the last is in the format Face Corner > Byte Color.
_GARMENTSUPPORTWEIGHT
: Vertex paint it red (RGB 1, 0, 0)
_GARMENTSUPPORTCAP
: Vertex paint it black (RGB 0, 0, 0)
Color
: Vertex paint it black (RGB 0, 0, 0)
Done!
In a given mesh, garment support is handled by two color attributes: _GARMENTSUPPORTWEIGHT
and _GARMENTSUPPORTCAP
. In Blender, these are found in the Data panel under Color Attributes, together with the third attribute, Color
.
The exact names of the parameters and their color formats are dependent on the specifics that the Cyberpunk Blender Addon and Wolvenkit expect from a mesh, as well as the versions you're using of the addon and of Blender itself. They may change subject to coding errors or become outdated. Use caution, try to match whatever vanilla meshes have when you export them, and if you notice an error on this page, please feel free to edit it or ping someone on Discord for help.
Here's how this currently looks in Blender 4.1:
Every submesh of your garment must have these three attributes in order for garment support to function correctly - even submeshes that contain non-deformable things like accessories, buckles, chains, belts, etc.
Garment support color attributes are edited in Vertex Paint
mode in the viewport:
_GARMENTSUPPORTWEIGHT
This attribute affects how the mesh deforms when it is layered with other garments. Specifically, Weight
determines the strength of the morphing that is applied to the mesh when other clothes are stacked over it. It can be thought of as a map of the relative flexibility of the mesh; which parts are more stable, which are squishier, and by how much.
Black
0, 0, 0
heavier deform; lots of squishing, easily crushed by other garments
Red
1, 0, 0
lighter deform; less severe squishing by other garments
Simple base game clothing will often have a flat red layer. If you have a flat black layer, you may want to paint it red, otherwise it will deform more than you might want.
With vanilla items, you will often see one of two general patterns for weight painting:
Largely red, with a little black toward the center of mass
Largely black, with red areas around the neck and shoulders, hips and pelvis, and the ends of limbs
This is illustrative of what GARMENTSUPPORTWEIGHT
is useful for, which is creating a smooth transition between areas that are tucked in or covered versus areas that are not. If you leave it either completely red or completely black, there will be no differentiation between which parts of your garment are crushed and which are not besides the presence (or absence) of another piece of clothing nearby. The morphing will work, but it will work uniformly. With careful weight painting, however, you can affect the degree to which areas are crushed, such as where the bottom of a formal shirt might be tucked into pants.
While it can refine and soften the effect of morphing on your mesh, garment support weights cannot work miracles. It won't completely prevent an area from morphing, even at full 1.0 red strength. If you need to keep an area from being squished at all, consider editing your GarmentSupport shapekey by hand to give that area less deformation overall.
The reasoning behind not simply painting it all red and calling it a day is simply that sometimes you do really want some serious crushing to happen! Having a clean transition between red and black lets you preserve that functionality, and also lets you create less of a Crushed Into Triangles look wherever heavy morphing is required, such as around the edges of pants and sleeves, or the areas around the torso where a shirt disappears under the jacket above it.
_GARMENTSUPPORTCAP
This attribute determines the extent of the garment's effect on other meshes. In other words, it defines a limit on what effect the garment will have on whatever mesh is beneath it in the layering system, provided that that mesh also has Garment Support. Whereas the Weight
determines how other clothes affect your mesh, the Cap
determines how your mesh affects others.
"The mesh beneath" can be understood here to be any other GS-enabled mesh, including vanilla clothes, GS-enabled modded clothes, or even the player body itself.
Black
0, 0, 0
Cap not active; this part of the garment will crush the mesh beneath it.
Red
1, 0, 0
Cap active; this part of the garment will not crush the mesh beneath it.
Like _GARMENTSUPPORTWEIGHT
, the _GARMENTSUPPORTCAP
is painted using red and black. Unlike the weight parameter, the cap parameter is painted not in a gradient between red and black, but in areas of either one or the other at full strength. Any vertex painted red with a strength ≥ 0.5 will be treated the same as full red for the purpose of deciding whether the cap is active for that vertex.
With vanilla items, you will see red on areas that will either
directly intersect with the body (the ends of sleeves and legs, the bottom of a shirt, the opening of a turtleneck, the waist of pants)
sit right above something else that shouldn't be deformed (the inside face of a bra resting flush against the player body, the inside of a high jacket collar where it touches the neck and collarbones, the underside of the lapels on an open jacket)
The cap provides a limit; without it, every part of your mesh will apply shrinking/tucking on the mesh(es) layered below it, in accordance with the Weight
of the mesh underneath.
Often, this is completely okay, and your _GARMENTSUPPORTCAP
layer can be left black. Otherwise, you will need to paint red those parts which either cut straight through the body or butt right up against other items.
Note that this does not actually prevent the mesh beneath your garment from morphing at all - it still will, as determined by its own Weight
. But the "crushing strength" of an item without painted caps is additive with the mesh it's affecting; that mesh will deform on its own, and then the mesh on top will deform it further with no regard for health or safety and you may end up getting more than you wanted. This tends to produce heavy clipping, especially near areas that are both a) highly crushed and also b) easily visible to the camera, such as under the open sides of jackets, or up against high collars, or beneath the hems of sleeves.
Areas with heavy crushing that are going to be invisible to the player are fine, but should be avoided in places that are exposed. This is why painting the cap is especially important for skimpy clothing, clothing with a lot of large gaps, or jackets that will be layered over larger items.
The effect of the cap will be more pronounced if you are using or testing your garment on a body mod that does not itself have Garment Support. (This is most modded bodies!) In vanilla, the effect is less noticeable because the clothes and the body all shrink together in harmony; with a modded body that stays static while the clothes around it squish, you can end up with body parts suddenly exposed where you didn't intend them to be.
If the cap is left black or even skipped completely, nothing will actually break. However, if your mesh seems like it's being too aggressive when you layer it over other things, and leaving holes in whatever you're trying to layer under it, try painting more inside faces red.
Sure! The simplest way to add functioning garment support to your custom item is to have a flat red _GARMENTSUPPORTWEIGHT
attribute, a flat black _GARMENTSUPPORTCAP
attribute, and a flat black Color
attribute. Your mesh will export and, assuming you have the proper shapekeys, will morph in (more or less) the way you'd expect!
But if you'd like to get it working as clean and smooth as the vanilla morphing can be at its best, getting into the practice of manually painting your weights and caps can make that happen for you.