This is VERY IMPORTANT, don't screw it up! Now goto File>"Save as" and save the file as another name "phymodel.max"

NOTE: just so were straight you should have saved the max file you were just working on. lets say you called it girl.max But now you should have saved all your changes to girl.max, then you should have created a copy of girl.max called phymodel.max
that was important because we are going to dice our model in order to create the collision model for the ragdoll.
so lets begin, start by collapsing the stack modifier

TIP: I like to convert Editable Poly when doing model editing such as deleting edges, also it would be best to switch to your "Front" view when doing this.
Now enter Edge Mode. you are going to hold "Shift" and with the pointer tool select and areas where 2 bones meet. we refer to this as a joint
I've basically highlighted the neck, torso, thighs, knees, ankles, wrists etc..

once you do that, just release the shift key, and press the "Delete" key :) and you'll now have gaps in the model. you want large gaps, but not too large of gaps.

TIP: just a heads up, i've screwed up and forgotten to delete edges for the shoulders and upper body. I'll explain a few lines how to fix this
Now exit edge mode, and convert your model from Editable Poly, back to Editable Mesh if not already
then highlight your model, and add a SKIN modifier from the modifier list. Add all your bones to the SKIN list open the weight tool. also turn on vertices, and Select Element. *that is important

Now I've selected all, and weighted everything 1 one bone! *again this follows along with magnets teachings in his ragdoll video. Any how it is important that the model is rigid, meaning you can't use blend, we want Red only or clear only.

Now start rigging your model parts to each relating bone.
*Oops I forgot a few bones, not a problem. under skin go into editable mesh, again in edge mode, select the areas, and delete. then return to skin mode

now continue to weighting each model piece for every bone..
to illustrate what you want, and don't want to do..
This is BAD! you don't want this

This is good, all your bones should be like this

Do this till again your entire model is weighted to your bones. >>again I'll time warp 10mins later..
Now to check you didn't miss anything, click on the bone that we first weighted everything to(refered to as the parent bone). in my case it was the bone called "spine" So i left-clicked on it and it highlighted all the vertices used by that bone. this trick will reveal any stray vertices. which I do have, so I'll have to reweight the leg there

NOTE: not done yet, we still have to export and compile, set the materials, adjust the movement of the ragdoll, create a spawnlist, then we can test our rig in gmod
Right so lets export this thing! save your work, then goto File>Export>SMD then save the smd in your SDK folder. call it "phymodel.smd"
NOTE: where you save the file doesn't matter. but I usually place them in my bin folder or in another subfolder if I have alot of files. just remember you have to also copy the file path of where you save your SMD, in your QC.

here's where your SDK folder is by the way (again you don't need to save here, but my QC has this path in it)
Code:
C:\Program Files\Valve\Steam\SteamApps\********\sourcesdk\bin\ep1\bin
You'll also get a prompt, asking two things. Export as Skeleton Model, or Reference Model. Pick Reference Model then press ok. (Picture above)
Okay, close that and open up your original max file, which I last referenced as "girl.max" then goto File>Export>SMD then save as "reference.smd" and again save as reference model.
Then with the same MAX file up Export a SMD again, only call it "ragdoll.smd" and save it as a Skeletal Animation this time.
That's it!, we're done with 3dmax work, finally! you can close it down and give yourself a huge pat on the back. you've just accomplished what took me 3 years to get to, in about probably a day or 2.
COMPILING SIDE - Getting A QC
We to now make an instruction file to tell the compiler what to do with the three SMD files.
this is the QC you will be using, you can download the file directly here;
NOTE: make a notepad txt document and paste the following code into it. then save it as "myragdoll.qc" or you may also download the QC file here: http://files.filefront.com/13330991
Code:
$cd "C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesdk\bin\ep1\bin\Basic_Ragdoll_Template"
$surfaceprop "flesh"
$modelname "myragdoll.mdl"
$cdmaterials "models\textures\"
$model studio "reference.smd"
$sequence ragdoll "ragdoll.smd" FPS 30 activity ACT_DIERAGDOLL 1
$collisionjoints "phymodel.smd" {
$mass 60.0
$inertia 10.00
$damping 0.01
$rotdamping 1.50
$rootbone "Bone01"
}
NOTE: Note open a QC easily in notepad; double click on the file; you should get a "Windows Could Not Open" prompt. pick choose from list and press OK

then a list of programs will appear, pick notpad from the list and press OK. from now on, all you have to do is double click and notpad will handle the QC files. you can now easily Edit the QC files. :)

Now the QC can be saved anywhere, as long as you place edit the path of your SMDs in the QC when we configure it. Though in my case, I'm going to save it in my SDK folder, so I don't go losing it.
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesd k\bin\ep1\bin\BasicRagdollQC.qc
Configuring The QC
You need to make some changes with the QC, so open it up with notepad
Note: if you haven't already assigned QC to notepad, just right click the file and click on "Open With.." and find the notepad).
Now once you have the QC open in notepad, you'll see exactly what I quote above.
First line you need to edit, is the path to your SDK folder. if you have HL2ep1, (everyone should) then your path will be the same as mine, except yours won't be in a folder called mariokart64n. so adjust your path accordingly, by replacing mariokart64n with your STEAM account name.
Second we have it set for "flesh" if you want to make your ragdoll make a different noise when you shoot it. use can "metal" or "glass" instead of "flesh". there's a whole list on the HL2 Wiki: http://www.hl2world.com/wiki/index.p...ace_Properties
Third I've named the mdl myragdoll.mdl you may wish to change this to something else, like girl.mdl..
Fourth the model will ALWAYS store all its textures and materials in this folder
C:\Program Files\Valve\Steam\SteamApps\*your steam name*\half-life 2\hl2\materials
our QC says "models\texture\" which translates to;
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\garrysmo d\garrysmod\materials\models\textures
to keep organized stay in the model folder, but change the subfolder "textures" to something else. like "$cdmaterials "models\ragdollgirl\"
the last part we need to use HLMV.exe to paste in, which can only be done after the smd's are compiled.
the location of where you saved the SMD files.
$cd "C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesd k\bin\ep1\bin\Basic_Ragdoll_Template"
$surfaceprop "flesh" What Sound Effects to assign to your ragdoll, when shot
$modelname "myragdoll.mdl" Name of your ragdoll to compile as
$cdmaterials "models\textures\" Folder to put the ragdoll's textures in
$model studio "reference.smd" The SMD of the Ragdoll
$sequence ragdoll "ragdoll.smd" FPS 30 activity ACT_DIERAGDOLL 1
The Animation SMD
$collisionjoints "phymodel.smd" { The SMD of the Collision Model
$mass 60.0 Bone Data, that we'll paste in from HLMV
$inertia 10.00
$damping 0.01
$rotdamping 1.50
$rootbone "Bone01"
}
After you've made the apporiacte edits to your QC, save the QC, and for now open Wunderboy's GUIStudioMDL.exe (Don't Close your QC yet)
Note: if your trying to use CannonFodder's Studio Compiler, it doesn't work with the lastest HL@ updates anymore. don't use it
IMPORTANT: there is a bug with HL2 EP1, you must have HLMV open, in order for it to work. So open HLMV prior to compiling.
you can open HLMV one of two ways;
1. Open STEAM, then Tools. double Click on Source SDK. then double click HLMV from the list
2. you can also open the file directly:
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesd k\bin\ep1\bin\hlmv.exe
Alright once you have HLVM, let hop back over to Wunderboy's GUIStudioMDL.exe.
It may prompt you about configuring the program when you first start it.
basically just goto "Configure" at the top of the program and set the two paths
the path of these two items are here, and here
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesd k\bin\ep1\bin\studiomdl.exe
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesd k\bin\ep1\bin\GameConfig.txt

Also make sure your target is set to "Half-Life2",
Then goto the Top: FILE > Load QC File... and find the QC you edited and saved as "BasicRagdollQC.qc"
Now to the left of the program under actions click "COMPILE"
should spit some info out and end with "Completed" :)
..if you get and error It'll indicate the line in the QC it chocked on. if you can't figure the error ok, post the error from the compiler output, and I'll have a look.
OK, if things went good, you should now be able to open the model in HLMV (File > Load Model)

:O holly shit man, she's checkered!!
until we set the materials, she'll remain purple and blacked checkered. I covered this in the other guide on making static props. but I'll recap it.
before that, we want to check the phymodel real quick (do that by checking on Physics Model)

the physics model is shown in wireframe mode, and that's about what you want to see. if see the the parts of the collision model touching another piece, you should go back and edit your phymodel.max and reexport. compile again till your phymodel is a bit more free. you see this model is used to calculate physics and collision. and even it's collision to itself. meaning if the parts touch your ragdoll will be stiff or won't flex properly. also if you have one huge ball as your collsion model, you totally screwed up the entire phymodel step.
here's an example of EPIC fail. you DO NOT WANT YOURS LOOKING LIKE THIS!

OK. now I'm just going to recap getting your materials to work, encase you skipped reading my Prop guide.
Setting Materials
in HalfLife2 Textures are converted to VTF, and a material file is created VMT. the VMTjust instructs the game how to shade the texture on your model. like reflection, or to be transparant, to glow.. etc.
Source SDK comes with a tool to convert your textures to VTF, but it requires your textures to be in TGA first.
Luckily we have this handy tool called VTFEdit, which now allows us to convert from DDS straight to VTF. which is good since 3DripperDX saves textures in DDS
NOTE: [i]HalfLife2 can only use textures having dimensions of the following;
8,16,32,64,128,256,512,1024,2048,4096
if your textures came from 3DRipperDX, your fine. but in the rare case you've downloaded a fanmade model you may have uncompatible textures. if that's true you will have to get photoshop or paintshoppro in order to rescale your images.
Now time to convert your texture. If you don’t already have VTFEdit, get the installer here.
http://nemesis.thewavelength.net/index.php?c=178#p178
one thing VTFEdit doesn't so is create the folder we need. so first we must create the actual folder that our VTF/VMTs will go (>.<) yeah this is annoying.. you have to actually create the folders manually. Geez!
Recall that in our QC, the line;
$cdmaterials "models\textures\"
We need to go into our Halflife2 materials/models/ ..folder and create that folder.
In my case I have this in my QC $cdmaterials "models\ragdollguide\"
So I have created the following folder.
(of course your could be different) just make sure the path matches what you wrote in the QC
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\half-life 2\hl2\materials\models\ragdollguide
Now Open VTFEdit and goto;
Tools > Convert Folder
A "Batch Convert" box will appear, just double check and click on options button in the bottom left. Make sure Alpha Format is set to DXT5, then press OK to back to the Batch Convert Box

also since we are dealing with DDS, not TGA. type this into the filter type box "*.dds" no quotes
then set the Input and Output folder.
Input: the folder with your DDS textures
Output: the folder you created in materials/models/ (mine was /ragdollguide/)
NOTE: yeah I’m aware this takes forever to set the paths, I had to expand 20 folders to get to the right one. (~_~) *if anyone knows of a better faster way, or tool. please let me know
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\half-life 2\hl2\materials\models\ragdollguide\
Once there set press the big CONVERT button. And your DONE!
e) go back to the HLMV and press the F5 key to refresh the model. You should now have textures like below… if not then haha you’ve screwed up your paths. You’ll have to just repeat all the steps. Likely your QC material path does not match your actual folder path

..hrm. that's not quite right is it. let's inspect the VMT file.

yeah that's not right. the converter gave the translusant command to all our textures, which we don't want.
Code:
"VertexLitGeneric"
{
"$baseTexture" "models/ragdollguide/207b4870"
"$translucent" 1
}
your going to have to open all the VMT files in your folder and replace the translucent string with halflambert.. (don't forget to press CTRL + Save or goto File Save, to save changes)
Code:
"VertexLitGeneric"
{
"$baseTexture" "models/ragdollguide/207b4870"
"$halflambert" 1
}
do that to all the VMT's then press F5 again in HLMV

..Alot better, except if you realized you just disabled all transparency on your model. I did this on purpose, HL2 actually has difficulties displaying transparency properly. as you say she went bald for a while.
NOTE: I'll Cover setting up Proper transparency in the Section discussing Advanced VMT Materials
Iif you what to see a quick example of what I mean. I will place the translusant command back

.actually not so bad on this model. but the areas I circled in red show that the layers get confused. you have the eyelashes rendering in front of the hair, and the ponytail also in front. on more complex model this becomes more devastating.
ok wait I'll now enable 2bit transparency on the hair, which HL2 supports very well. maybe you'll see the difference in layering
Code:
"VertexLitGeneric"
{
"$baseTexture" "models/ragdollguide/207b4a90"
"$halflambert" 1
"$alphatest" 1
"$nocull" 1
}

you'll notice the layers are now correct, but we loose the blending, since we're using 2bit, over 4bit(16colours) big difference eh. anyway use translusant(4bit) or alphatest(2bit) until i cover advance VMTs and how to hide this problem.
Setting Bone Constraints
This is the LAST part to compiling your ragdoll :)
Hop back to HLMV with your model open. and toggle to the Physic's Tab
here you'll be able to set the complete motion of each bone or body part of your ragdoll.
haha, yes you have to give rules to every bone in your model!

Tick on Highlight and toggle the drop down to various bones used by your ragdoll.
In the screenshot above you can see I've selected L_UpperArm which shows sliders and XYZ. I can also set the Mass, for the entire ragdoll. 60 is standard.
Now for every bone, your going to go to X and set the Min and the Max, which also means the Forward and backward motion of the bone rotation. once you set a value to the Min and Max Slider, use the Test Slider to test the motion of that bone on the chosen Axis. In my example above you can see I've set the Min for 41, and used the test slider. I can see 41 degree's isn't quite enough for her arm to reach down to her side. so I'm going to increase it till her arm can touch her thigh
you should repeat this until all your bones are done, and yes I do this same process for every ragdoll I make. it takes about a good 15minutes
OK great once your finished, Click the "Generate QC" Button (this copies the bone data to your clipboard)
Now hop back to your QC file for your ragdoll, open it and look for this line. highlight the following text, right click and paste.

and that should paste all the bone data in your QC. except it has pasted some duplicated data we need to delete before using the QC to compile again.
Code:
$cd "C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\sourcesdk\bin\ep1\bin\Basic_Ragdoll_Template"
$surfaceprop "flesh"
$modelname "basicgirl.mdl"
$cdmaterials "models\ragdollguide\"
$model studio "reference.smd"
$sequence ragdoll "ragdoll.smd" FPS 30 activity ACT_DIERAGDOLL 1
$collisionjoints "phymodel.smd" {
$collisionjoints ragdoll {
$mass 60.0
$inertia 10.00
$damping 0.01
$rotdamping 1.50
$rootbone "bone01"
$jointconstrain "spine" x limit 0.00 0.00 0.00
$jointconstrain "spine" y limit 0.00 0.00 0.00
$jointconstrain "spine" z limit 0.00 0.00 0.00
...
BlAH BLAH BLAH BlAH BLAH (removed to save on quoted space)
$jointconstrain "l_foot" x limit 0.00 0.00 0.00
$jointconstrain "l_foot" y limit 0.00 0.00 0.00
$jointconstrain "l_foot" z limit 0.00 0.00 0.00
}
$sequence ragdoll "ragdoll_pose" FPS 30 activity ACT_DIERAGDOLL 1
Remove the line before the Mass Command
"$collisionjoints ragdoll {"
then at the very bottom remove the line under the bracket
"$sequence ragdoll "ragdoll_pose" FPS 30 activity ACT_DIERAGDOLL 1"
..that's it. save the changes to the QC and compile!!
Creating Gmod9 / Gmod10 Spawnlist's
A Spawn List is a file that instructs gmod on where to find the models, so that they can be spawned or created in the game. Unfortunately I suck at scripting, so once again I have a template for you.
Both Gmod9 and Gmod10 use SpawnLists, unfortunately they store them is different places, and the script format is different between them.
So Lets Cover Gmod9, first got the following directory and Create a notepad by right clicking and going to New > NotePad. Name this notepad whatever you want, obviously not conflicting with any other lists you already have.
C:\Program Files\Valve\Steam\SteamApps\SourceMods\gmod9\setti ngs\menu_props
open that text file, and paste the following into it.
Code:
// = prop
// # = ragdoll
// : = car
// ! = effect
// ' = sprite
// ~/@ = label
// = = run console command
"Title"
{
"~SubTitle" ""
"#ModelName" "models/FileName.mdl"
}
I labbled the areas within the quotes, there pretty much self explanatory.
Title, is what you spawn list will show up as when you press Q and toggle your gmod9 stuff.
Subtitle.. same thing.
Model Name, is a little tricky. I've added the switches above. placing a #before the name, will enable you to spawn a ragdoll. and removing the # character, leaving no switches "modelname" means prop. um the rest of the switches I never had the chance to use yet.
FileName, you have to be clear on the name and full path of your model. if it's wrong your model won't spawn in gmod9. just have a look in your QC to get the absolute path.
Code:
$modelname "basicgirl.mdl"
For Example, this is the only line you need to look at. by default the compiler always compiles to the model folder. so anything you make will naturally be written as /model/blehbleh.mdl. unless in your QC you've compiled as $modelname "mario/basicgirl.mdl" then my spawn list would be;
"#Basic Girl" "models/mario/basicgirl.mdl"
well that's pretty simple, save the changes to the the doc, and test out your spawn list's. let me know if there's any trouble.
Next making a a spawnlist for Gmod10, this seems a whole lot complicated, since I don't understand half of the values and brackets it uses. <_< really that's way too many.
again create a notepad, but only in this directory. yours will be under your steam account name.
once again copy and paste this into your blank notepad and save changes.
C:\Program Files\Valve\Steam\SteamApps\mario_kart64n\garrysmo d\garrysmod\settings\spawnlist
Code:
"1"
{
"Information"
{
"name" "Title"
}
"Entries"
{
"1"
{
"model" "models/FileName.mdl"
}
}
}
From what I can figure out, you only need to change the 2 things.
Title - Name Shown when pressing Q and toggling your ragdolls.
FileName - the full path and name of your MDL
theres obviously alot of other stuff to change, but ??I have no clue. hehe
OK YOUR DONE, go try all this shit out. that's all there is to it. A - Z man!
I'll start with more advanced stuff where you'll do more QC scripting, more HLMV configuring and generally more 3dMAX. but that's for other crap.
ok good night (X_X) this whole tut took way longer then I expected to write