Weight Painting for Gonks
How to check weights directly in Blender
Summary
Created: ??? by PinkyDude 🦝 Last documented edit: Sep 22 2024 by manavortex
This guide will show you Pinky's weight painting workflow, sharing tips and tricks on how to fix weights on garments for both refits and custom ports. You can find the original tutorial on Google Docs.
This guide will use a masc garment, but the process works the same regardless of rig or body type.
Wait, that's not what I want!
For porting objects altogether, see Porting 3d objects to Cyberpunk
For help with refitting, see R&R: Refitting (step by step)
For converting between bodies, see RIG Swapping Garments - other body conversion
Requirements
For this guide, you need:
Tool | Version |
---|---|
>= 8.14 | |
Blender | >= 4.1, recommended: 4.2 |
You also need a Wolvenkit project with an item where you want to fix the weights.
Step 1: Exporting your weight source
For this example, I’ll be starting the weight from scratch for my Tracksuit Jacket:
1.1: Finding a donor mesh
It's best practice to stealcopy the weights from an existing in-game item.
A good candidate is the tight version of T-Bug's netrunner suit, as it has the required bones for almost everything:
Add the correct version for your body gender to your Wolvenkit project.
Since this is a jacket, using the Netrunner Suit will result in useless leg bones. That's not a problem, but you can use a different mesh, if you want.
If you are changing the weights of an existing or ported item, you might run into export errors in Blender. We'll fix these when we get there.
Why this is a good mesh
It is really tight. This has a few nice side effects:
If it clips, it will clip into the body — that is perfect for weights!
It will avoid "bat wings" around the armpits, where parts of the sleeves or sides will stretch next to the chest
Unfortunately, a perfect fit does (usually) not exist. But don't worry, we can fix this!
Step 2: Transferring weights
2.1.: Importing the Netrunner suit
Export the Netrunner suit to glb
Import it into your Blend file
You'll notice it has 3 submeshes. Merge them into a single submesh:
Click into the viewport to deselect everything
Hold the
shift
key and click on each of the three meshesPress
Ctrl+J
2.2: Preparing your own mesh
If your refitted garment is already broken down into multiple submeshes, you’ll have to do the same thing here. The result will be called "weight container" or "target mesh" in the rest of the guide:
Create a joined duplicate “weight container”:
Merging by distance
Even if we merged the submeshes, the actual models themselves are still separated. Editing and smoothing the weights will cause them to detach from each other, creating holes and gaps along the seams.
For that reason, you should now clean up your mesh and merge the vertices by distance:
❓ Edit Mode > Mesh > Clean Up > Merge by Distance
Cleaning existing vertex groups
When porting assets from other games, a good habit is to always clean the Vertex Groups before transferring weights :
Step 3: Transferring weights
You can use the Wolvenkit Blender IO Suite's Mesh tools for step 1-5. However, this guide will show you the full manual process.
Click the weight source (the Netrunner suit)
Ctrl+Click on your merged weight container (the target mesh)
Switch Blender to Weight Paint mode:
Select
Weights
->Transfer Weights
A pop up will appear in the bottom left corner of your viewport window. Make the following changes:
Vertex Mapping - Nearest Face Interpolated
Ray Radius - 5m
Source Layers Selection - By Name
You have now successfully transferred the weights from the Netrunner suit to your ported garment. Let's clean this up.
3.1 Cleaning up
Select Weights -> Limit Total.
In the pop-up at the bottom left, change the
limit
from 4 to 8.
Finally, select Weights -> Normalize All
In the pop-up at the bottom left, un-check
Lock Active
:
Step 3: Testing on an animated body
We could now transfer the garment's weight to our submeshes, import the result into the game, notice that something is off with the weights, fix it in Blender, rinse, repeat, and waste a lot of time.
Instead of doing that, we'll simply hook our garment to an animated body.
3.0: Using the prepared resources
To learn how to add these things by hand, read 3.1 - 3.3
I took the time to merge and weight-fix two full bodies who are also already hooked to the inventory “Jacket Check” animation
You can download them from my Resources folder, here:
🔻 MA Body - Man Average RIG
🔻 WA Body - Woman Average RIG
To add it to your .blend file, select File -> Append, and select the collection [MA/WA]_weightCheck
:
You can now skip to #id-3.4-connecting-the-meshes-to-the-armature
3.1: Getting a rig
From the Blender AddOn's Animation Tools Panel, select the correct rig for your mesh. You'll most likely want
man_base
orwoman_base
:
Change your weight container's
armature modifier
to point at the rig you just imported:
3.2 Getting a body
You can use the same body that you've already used for refitting. This tutorial won't cover this — look it up in R&R: Refitting (step by step).
Import your body mesh into Blender
Join all the submeshes together
Change the body's armature modifier to point at the rig you added in 3.1
3.3 Getting an animation
You can see that our added armature already has A-Pose and T-Pose hooked up:
We need a bit more than that, so let's grab ourselves an .anim from the game files.
For fitting clothes, you might want to use the inventory idle animations:
This will populate the Animsets list.
We can use the play button to make everything move. Now, time to hook everything up.
3.4 Connecting the bits
Select your merged weight container and change its Armature modifier:
aMa
/aWa
if you used the prepared resources, the armature from 3.1.2 otherwise
Rotating your body, you might already notice holes or clipping:
Let’s check the animation by pressing the Play ▶ button on the timeline or in the Animation Tools:
Arms and collar will need some fixing. Let's go and do that.
3.5 Weight Painting Prep
Use the Play button at the bottom of Blender's viewport or in the Animation Tools
Let the animation play to a point where your issues are clearly visible, then hit the button again to pause it
Hide any armatures and collections, so that only the jacket mesh is visible.
Step 4: Manual weight painting
From experience, we know which bones are responsible for the bat wings, but we'll go through the list one by one. If you want the more target-oriented approach, skip ahead through 4.1 Fixing the bat wings
Enter Weight Paint mode (at the top left of the Blender viewport)
Open and expand the Vertex Group list on the right:
On the right, select the first vertex group (
Hips
)Use the
Blur
tool to fix anything that looks jankySelect the next vertex group on the list (
Spine
)
This is where you fuck around and find out! You can always use the
4.1 Fixing the bat wings
Smoothing out the Spine groups helps a bit, but the mesh is still being pulled:
We’ll start tackling the actual Arm bones now:
We’ll need to clean the armpit on the
[l/r]_SHL_0_JNT
group. You can do this by using theBrush
tool (with the Weight slider down to 0), or with theRadial Gradient
tool:
Drag the gradient tool near the armpit to remove all the excessive weight, and then use the blur brush to smooth the area:
We’ll do the same with the
[l/j]_triceps_mscl_JNT
group:
...and the
[l/j]_biceps_A_mscl_JNT
group:
That’s much better!
Scroll down to the
[l/r]_latissimusDorsi_mscl_JNT
group and smooth out the area a bit.
You can go back to Object mode and check your weights with the animation at any time!
This isn’t too bad, we removed most of the stretching and the sleeves behave in a natural-ish way, considering this is a large jacket :>
4.3 Fixing the collar
The garment's collar is also a troublesome area; we can see how mine stretches and clips in all kind of weird way.
We'll go over the list in order again, starting from the
Spine
bones and adding weights here to harmonize the whole collar:Select the Sample Weight tool
Click on any light blue area
I’ll once again use the Radial Gradient tool to apply weights in an equal way
Be careful when using the Gradient tool
When weight painting with the gradient tool, the weight will apply on BOTH side of the mesh; front and back! To avoid this, rotate the camera and angle your model so your gradient only affect the desired area
Check the following vertex groups. Smooth out jagged edges, and remove incorrect weights.
Main vertex groups (avoid editing them too much, if you can avoid it):
[Left/Right]Shoulder
Neck
,Neck1
Head
[
l/r]_sternocleidomastoid_[top/bot]_mscl_JNT
[l/r]_butterfly_top_CRV_bot_out_JNT
Remove weights from the following arm and torso related groups (depending on the length of your collar):
[l/r]_chest_front_[A/B/C]_[bot/top]_out_JNT
[l/r]_deltoid_[top/front/back]_[top/bot]_out_JNT
After manually fixing weights, always do “Limit All” and “Normalize All” from the Weights tab!
It’s important to aim for Correct over Perfect, otherwise you’ll get stuck and frustrated really fast, trust me 🧡
Don't worry about the clipping, we'll fix that in 5.1 Fixing clipping.
Step 5: Transferring back
Change your weight container’s rig in the Armature modifier back to its original armature :
Hide the MA_weightCheck collection and un-hide your garment’s submeshes
Transfer the weight from your weight container to each of your garment’s submeshes. You can use the Mesh Tools, or do it by hand (one by one).
5.1 Fixing clipping
You can toggle proportional editing on and off by pressing o
. This guide won't cover proportional editing in detail, but you can look it up underStep 4: Refitting in the R&R guide.
For each of your (now weighted) submeshes, change the rig in the armature modifier to animate them.
Entering Edit Mode will reset our model back to the default pose. To fix that, we have to check the
On Cage
andEdit Mode
buttons on the armature modifier:
Repeat the step for each of your submeshes
Select them all, then enter edit mode by hitting
tab
With proportional editing on, simply select the vertex in the area and slightly pull away from the body:
Use the bar at the bottom of the viewport and move the cursor to change the animation. You'll find and fix more clipping here.
Once you're done, change the armature modifier back to the original one.
Delete the weight container mesh (you don't need it anymore)
Step 6: Finishing up
You can now export your mesh from Blender, then import it back into Wolvenkit.
And that’s about it for this tutorial/workflow on how I handle weight painting!
Author's remarks
Don’t let weight painting occupy your entire brain while working on a project; it will never be perfect, a lot of vanilla garments have weight paint problems with stretching crotch and armpits area, it’s not something we can 100% control or avoid
As long as it’s not too visible or mesh breaking, clipping and stretching are easily dealt with in Photoshop or other post-render editing softwares 🤏
Again, I’m no expert, but I hope this tutorial will help you tackle some annoying aspects of Weight painting!
Have fun and happy modding y’all! 💛
Thank you for reading -Pkd
Last updated