Skinning a Character in 3ds Max - Part 3 - Quick Weighting Script

Login to Follow
  • Games
  • Design Visualization
  • Animation
  • Character
  • 2013
  • Character Animation
  • Workflow
  • 3ds Max
Skill Level
  • Advanced
9 min

Skinning a Character in 3ds Max - Part 3 - Quick Weighting Script

Before moving on with skinning, you will take a look at and install a macro-script that will make the process of skinning far more intuitive. The purpose of the script is to simplify the weighting of vertices without having to move back and forth between the viewport, the command panel, and/or the Wright Tool dialog. Using a combination of a hotkey and a click and drag, you will find the process of adjusting weights infinitely easier.


  • Recorded in: 3ds Max 2013
  • This tutorial is intended for use with 3ds Max version 2013 or higher.


00:00:03 --> 00:00:08
In the last movie, you skinned the left foot and the process was relatively easy.

00:00:08 --> 00:00:15
Still you might have noticed that the process required a lot of back and forth, between selecting vertices and a bone in the viewport,

00:00:15 --> 00:00:19
and then adjusting the vertex weight by going back to the command panel,

00:00:19 --> 00:00:23
or by going to the Weight Tool dialog if you had been using that approach.

00:00:24 --> 00:00:30
If you're going to take a day or two to properly skin a character, that's a lot of back and forth for your hand and wrist.

00:00:31 --> 00:00:36
Consider how nice and easy it would be to be able to select vertices, and a bone to affect them,

00:00:36 --> 00:00:44
and from that point on you'd hit a hotkey that would enable you to adjust weights right there and then,… wherever you are in the viewport.

00:00:44 --> 00:00:48
No more travel to the command panel, no more travel to the Weight Tool dialog.

00:00:49 --> 00:00:53
Well, Ladies and Gentleman, with our compliments, you'll be able to do just that.

00:00:53 --> 00:01:01
Among the files you downloaded for this tutorial is a macroscript file named "QuickSkinVertexWeight.mcr".

00:01:01 --> 00:01:07
This is a file you will be using here, and if you get used to it, you'll be using it elsewhere as well.

00:01:07 --> 00:01:10
The coding itself is pretty straightforward.

00:01:10 --> 00:01:17
The script has a name, and a category defined to make it easier to find when customizing a hotkey for it.

00:01:17 --> 00:01:24
The heart of the script is made of these two lines here that take a selection, (represented by the $ sign),

00:01:24 --> 00:01:31
And apply a skin weight, which is essentially the same thing as adjusting the Abs. Effect value in the command panel.

00:01:32 --> 00:01:37
There are a couple of lines that condition the value never to go below 0 or higher than 1.

00:01:37 --> 00:01:41
The other important section relates to mouse actions.

00:01:42 --> 00:01:50
The mousePoint function reads the current vertex weight as soon as you click and assigns it as an "original" value,

00:01:51 --> 00:01:57
The mouseAbort restores the original vertex weight value in case you cancel the command,

00:01:58 --> 00:02:07
And the mouseMove function changes the value of the original vertex weight by increasing or decreasing it based on a screen grid distance.

00:02:08 --> 00:02:15
There is a multiplier value, here set to 0.05 that adjusts the sensitivity of the click and drag.

00:02:16 --> 00:02:26
Actually, a value of 0.05 may be too big. You might want to bring this down quite a bit to about 0.01 or 0.02 to tone down the sensitivity.

00:02:27 --> 00:02:30
This is a value you can alter to your own liking.

00:02:30 --> 00:02:33
Close the script editor when done.

00:02:33 --> 00:02:40
In order to use the macroscript, you first need to copy it to the appropriate folder in your 3ds Max install directory.

00:02:41 --> 00:02:51
In a standard installation, this would be under C:\Program Files\Autodesk\3ds Max 2013\MacroScripts

00:02:52 --> 00:03:06
For versions prior to 3ds Max 2013 (such as 2012), this would be under C:\Program Files\Autodesk\3ds Max 2012\UI\MacroScripts

00:03:07 --> 00:03:14
Once copied there, you would need to restart 3ds Max for the script to be loaded.

00:03:18 --> 00:03:24
To assign the macroscript to a hotkey, go to Customize > Customize User Interface.

00:03:25 --> 00:03:30
In the Category pull-down menu, choose the Custom Skin Tools.

00:03:30 --> 00:03:37
This category would not show up if the script was not copied to the right place and if 3ds Max was not restarted.

00:03:38 --> 00:03:44
However, this only needs to be done once. From now on, the script would be loaded every time you start 3ds Max.

00:03:45 --> 00:03:50
Select the Quick Vertex Weight Tool and click in the Hotkey box.

00:03:50 --> 00:03:54
Choose a hotkey for the script, for example the Q key.

00:03:55 --> 00:04:03
If the hotkey is already used by another function, as is the case here for Smart Select, you may want to choose another hotkey.

00:04:04 --> 00:04:08
On the other hand, Smart Select is used to cycle between region selection types.

00:04:08 --> 00:04:15
If you feel you don't really need that functionality, then you can assign the Q key to the script to override Smart Select.

00:04:15 --> 00:04:24
If you're not comfortable reassigning hotkeys, you need to find one that is not already assigned to a command, such as Shift+1.

00:04:25 --> 00:04:31
While you are in this dialog, it would also be appropriate to assign hotkeys to simplify Loop and Ring selections.

00:04:32 --> 00:04:33
This is also a great time-saver.

00:04:34 --> 00:04:41
In the Skin Modifier category, assign the Shift+2 hotkey for a vertex Loop selection,

00:04:43 --> 00:04:49
And the Shift+3 hotkey for a vertex Ring selection.

00:04:50 --> 00:04:52
Exit the dialog when done.

00:04:52 --> 00:04:56
To test the script, you will use it to adjust the knee joint.

00:04:56 --> 00:05:02
Open the file you saved earlier. The knee joint is animated between frames 320 and 360.

00:05:03 --> 00:05:07
There are also some vertices at the bottom of the legs that need some attention.

00:05:09 --> 00:05:15
In Edit Envelopes mode, select these two adjoining vertices at the bottom of the leg.

00:05:16 --> 00:05:21
Press Shift+3 to test the Ring selection hotkey you just created.

00:05:22 --> 00:05:26
Click the Grow button a few times to select all vertices up to the knee.

00:05:26 --> 00:05:30
Ultimately, you may consider assigning a hotkey for the Grow tool as well.

00:05:31 --> 00:05:36
Select the knee bone and assign a 100% influence for the selected vertices.

00:05:36 --> 00:05:41
Remember this is the blocking out stage; you're not fine-tuning the weights just yet.

00:05:42 --> 00:05:48
Now select the vertices that seem they should be associated with the thigh.

00:05:50 --> 00:05:55
You may still need to add or remove vertices using the Ctrl and Alt keys.

00:05:55 --> 00:05:59
Select the thigh bone and apply a 100% influence.

00:06:01 --> 00:06:02
Test the animation.

00:06:03 --> 00:06:05
At this point it is far from perfect.

00:06:06 --> 00:06:13
Instead of using the command panel or the Weight Tool dialog, you'll experiment with the script you installed and the hotkeys you defined.

00:06:13 --> 00:06:20
Select two vertices on the knee joint loop and press Shift+2 to actually select that loop.

00:06:20 --> 00:06:26
At this point, this selection is 100% affected by the lower leg or knee bone.

00:06:26 --> 00:06:29
It needs to also be affected by the thigh.

00:06:29 --> 00:06:34
With the vertices selected, make sure the thigh bone is also selected.

00:06:35 --> 00:06:41
Press Shift+1 to activate the script. Notice the cursor changes to a + sign.

00:06:41 --> 00:06:46
Click and drag down to get that loop to react nicely between the two bones.

00:06:46 --> 00:06:51
The direction of the drag depends on your viewpoint. Experiment with that.

00:06:55 --> 00:06:58
That middle loop is not the only one that needs adjustment.

00:06:58 --> 00:07:02
You also need to adjust the neighboring loops as well.

00:07:08 --> 00:07:16
Always keep in check those loops that are incomplete. You may still may need to add or remove vertices using the Ctrl and Alt keys.

00:07:22 --> 00:07:28
You may need to zoom in some situations to compensate for the sensitivity of the script's click and drag function.

00:07:29 --> 00:07:33
From this point on, the process is a bit redundant.

00:07:33 --> 00:07:42
This means you need to select one or more vertices, select an appropriate bone, and hit Shit+1 to activate and use the script.

00:07:47 --> 00:07:52
It is time-consuming but you'll soon fall into a pattern until it becomes second-nature.

00:07:58 --> 00:08:06
Be careful not to overdo the skinning of some joints. Notice how the lower and upper legs show some penetration at frame 340.

00:08:06 --> 00:08:13
This is ok, and certainly better than the spaghetti effect you might get if the mesh starts to "curve" too much.

00:08:18 --> 00:08:21
The same holds true with the bottom of the pants.

00:08:21 --> 00:08:30
There is interpenetration between the pants and the foot around frame 140, and again around frame 260.

00:08:31 --> 00:08:39
You might consider taking that bottom ring on the pants, and assign a very small weight value to the foot bone.

00:08:49 --> 00:08:55
Just don't overdo it as it will then appear quite unrealistic.

00:08:58 --> 00:09:01
Exit Edit Envelopes when done and save your file.

00:09:02 --> 00:09:04
Notice that you have only worked on the left leg.

00:09:05 --> 00:09:09
In the next movie, you learn about mirroring skin data.
Posted By
  • 3ds Max
  • Animation
  • Character
  • 2013
  • Character Animation
  • Workflow
To post a comment please login or register