Welcome to ‘Garry’s Mod: Bob’s Guide: How to Port VRChat/Unity Models into Gmod Easily’! This guide is perfect for players and creators looking to bring VRChat/Unity models into GMod. In this guide, you’ll learn valuable tips and tricks, such as how to commission models and overcome common problems. The best part? You don’t need Unity engine, just a well-prepared model and textures. It took me a week to put this together, so don’t forget to leave a like and award if you find it helpful. Let’s get started!
+*Notes & things to know*+
➤ So, This guide may be hard to do in your first time. But you’ll probably become professional at porting models later.
➤ This guide will also learn you “Blender basics , Qc. coding , Common problems and basic lua codings for PM & NPC”.
➤ Remember to check **Troubleshooting** tab if you got any problems!.
➤ Also I tried my best to make the guide easy as possible so don’t worry. Sorry for alot of scrrenshots.. but it can makes you understand faster!.
“Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work.” – Steve Jobs
So don’t get bored when you see alot of sections and alot of stuffs to do! It’s nothing compared to real world!!
══════════════════════════════════════════
+*Requirements*+
So, Before we starts, We’ll look into model requirements to port.
⚠ Stop here if your model doesn’t meet these requirements but mostly you’ll fine.!
For MMD and Unitypackage types, Check under section!⚠
❖ Requirements ❖
- Model format must be FBX, OBJ , gltf or Blend file (most of booth.pm models have blend. files)
- Model must contain “Textures (png.)” files. (Not necessery bcuz’ most vrc models come with png.)
- Model must be rigged and every first bones parents must be hip. Pelvis must be the root bone and no bones should be beside the Pelvis, but they can be under it. (No need to worry bcuz’ most models are already rigged and set their first bones to hip.)
- Model can’t be have more than 4 spine bones. (but no need to worry that much if your model is not a big guy. :p)
- Fingers are optional. (You can port the model even it has 1 finger..)
- Model can’t be a heavy model with 150k polygons or something more but idk about it.
(But you can still continue if your model have alot of bodygroups already.) - Model must not be have more than 256 bones. (Try removing unnesssery bones until you get 256 bones.)
💡 : To see bone counts and others. Just click “Viewport overlay” and check ☑ “Statistics”. And press “Tab” while your model bones are selected and you’ll see.════════════════════════════════════════════
Viewport overlay & Statistics
Edit mode & bone counts while model “Armature” with green stickman icon selected..
════════════════════════════════════════════
(We’re gonna use dmx. in this guide not smd.)
★ If your meet all requirements, you’re free to go.! ★
+*Tools for MMD & Unitypackage*+
You may need these to import MMD (pmx) and extracting unitypackage into fbx.
⏚ Cat Blender Plugin : Essential for importing MMD models, Optimising models and more for MMD & Vrchat models both.
➤Link : https://github.com/absolute-quantum/cats-blender-plugin
As my recent discovery , there may be a error when you import the addon into blender so use “Youtube” if error appears!
══════════════════════════════════════════
⏚ EasyUnitybundleExtractor : A tool that can extract the unitypackage. into files including fbx. & png. textures.
➤Link : https://github.com/HakuSystems/EasyExtractUnitypackage
I used this before and it goes smooth!.
══════════════════════════════════════════
⏚ UABE : Another tool that can extract the unitypackage. Haven’t used this before but ik it can..
➤Link : https://github.com/SeriousCache/UABE
══════════════════════════════════════════
+*Required tools & items*+
══════════════════════════════════════════
★ You’ll need two diffrent versions of blender (for bone naming , Keyshape renaming , Physic mesh & proportion trick ) ★
⏚ Blender : Essential for most steps
➤Link : https://www.blender.org/ (Download older versions if your device is low-end. Example 2.9)
⏚ Blender 2.79 : Essential for proportion trick
➤Link : https://www.blender.org/download/releases/2-79/
══════════════════════════════════════════
⏚ Bone naming script : To rename bones + save your time..
➤Link : https://drive.google.com/file/d/1ixOJSOR9n4pFavBIpa1FqXm_KqmTDewl/view?usp=sharing
• Big credit to @Darkshoro (Original creator of the script and my inspired guide.)
══════════════════════════════════════════
⏚ Crowbar : For complie & decomplie
➤Link : https://steamcommunity.com/groups/CrowbarTool
══════════════════════════════════════════
⏚ Notepad++ : To edit Qc. & Lua.
➤Link : https://notepad-plus-plus.org/downloads/
══════════════════════════════════════════
⏚ VTFEdit : To bake materials.
➤Link : https://gamebanana.com/tools/95
══════════════════════════════════════════
⏚ Template : Essential for most steps
★ (Contains Dmx qc. Physic mesh + Size reference & Source tool plugins ★
➤Link : https://drive.google.com/file/d/1XAm994QyV4IOZmS-hfl9KcsIm4nF8opY/view?usp=sharing/b]
══════════════════════════════════════════
⏚ Proportion Trick : One of most important scripts.
➤Link : https://github.com/sksh70/proportion_trick_script
⚠ Make sure to download all of them! ⚠
══════════════════════════════════════════
+*Setting up & Preparing stuffs*+
⚠ Skip this if you come from my l4d2 guide or already set.⚠
Step 1: Open Crowbar.
Step 2: Go to “Set up games”.
Step 3: You’ll see like this.
══════════════════════════════════════════
══════════════════════════════════════════
Step 4: Choose the game “Garry’s Mod” or add a new game and change the name to “Garry’s Mod”.
Step 5: Go ahead and set the require paths for specific items.
⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯
⏚ Engine : Source
⏚ Executable (exe.) : Your gmod exe.
☞ C:\Steam\steamapps\common\GarrysMod\hl2.exe
⏚ Gameinfo.txt : Gmod’s info file.
☞ C:\Steam\steamapps\common\GarrysMod\garrysmod\gameinfo.txt
⏚ Complier / Viewer / Mapping & Packer : Essential tools for crowbar
☞ C:\Steam\steamapps\common\GarrysMod\bin\
⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯
════════════════════════════════════════════
Step 6: Go to “Complie” tab.
Step 7: Choose “Garry’s Mod” on game that has the model complier.
══════════════════════════════════════════
══════════════════════════════════════════
Step 8: Now, We’re done for crowbar.
★ And, Another one for blender source’s tool plugin to Import/export dmx. files ★
• First We’ll go with latest blender.
⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯
⚠ For Blender 4.2 LTS ⚠
➤ : Extract the template zip i linked before.
➤ : You’ll see some files including “Blender source tools plugins with 2 diffrent versions”.
⏚ (3.3 for latest version blender or blender downto blender 2.9)
⏚ {2_10.2 for old blender which is 2.79}
➤ : Open the latest blender 4.2 LTS which is latest version currently.
➤ : Click “Edit” and then “Preference”.
➤ : Click “add-on” and click the arrow from right upper corner and click “Install from disk” and the browse inside template folder and install “Blender source tools 3.3” plugin.
⚠ Check ☑ the addon’s box if haven’t. ⚠
══════════════════════════════════════════
══════════════════════════════════════════
⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯
⚠ For older blender than blender 4. downto blender 2.9 ⚠ [For low-end pc/laptop that doesn’t support newer versions.]
[Skip if you have latest blender].
Step 1: Open your blender which is 2.9 or a little bit higher you have.
Step 3: Go to “Edit” from upper left corner.
Step 4: And Click “Preferences”
Step 5: Click “Add-on” and click “Install..”
Step 6: Browse inside the template find and you’ll see two plugin zips.
⏚ (3.3 for latest version blender)
⏚ {2_10.2 for old blender which is 2.79}
Step 7: Choose “3.3” and press install add-on.
Step 8: Search “Source” and check ☑ the box “Blender source tool”
════════════════════════════════════════════
════════════════════════════════════════════
★ For the 2.79 blender, There’ll be slightly diffrent steps. ★
Step 1: Click “File”.
Step 2: Click “User preference” and head to “Add-ons”
Step 3: Click “Install Add-on from file” and browse into the template folder and choose 2_10.2 zip.
Step 4: Search “Source” from search and check the “Blender source tool” if not checked.
⏚ (make sure to check ☑ or plugins may not work!)
════════════════════════════════════════════
════════════════════════════════════════════v
💡: Also go to “Edit” and click “Save startup file” so you won’t need to import the plugin again!.
★Now, We’re done set up.! ★
+*Bone naming*+
So we’ll import our model into “Blender” first.
I’ll be using “Sara” as our tutorial model. (But I’m sure you already have your model.. Right?)..
https://booth.pm/en/items/5323373
(Don’t blame me for using this model for guide 💀 )
OK,.. So in this model… I get these files.
- FBX.
- Textures (png.)
- PSD (photoshop textures but no need for our guide..)
════════════════════════════════════════════
What i got..
FBX. ☑ checked!
PNG. ☑ checked!
════════════════════════════════════════════
Now, We got our required files so we can continue our process.!
⚠ If you have diffrent files such as OBJ and others. It’ll still work as i mentioned!. ⚠
Step 1 : Open “Blender 4.2 LTS”. or other blenders.. (Downto 2.9)..
Step 2 : When you’re in, Press A and delete the “Light , Cube , Camera” by pressing “delete” on your keyboard bcuz we don’t need them.
Step 3 : Then, Press “File” and choose your model type and import it by selecting your model file.
I’ll import my FBX. file bcuz’ my model is FBX.
★ If your model include .blend , Just open it.
════════════════════════════════════════════
════════════════════════════════════════════
So, You won’t see your model bcuz’ it’s too small. Use “Mouse scroll wheel” until you see your model.. If you see. Go ahead.
Step 4 : Delete the “Collection” by clicking the “Collection” with a box icon and press “Del” on your keyboard bcuz’ we don’t need collection. Now , We’ll rename our bones by using script i linked before.
════════════════════════════════════════════
════════════════════════════════════════════
Step 5 : Go to “Scripting” tab , click “Open” and import the script i linked before and press “Open text”.
════════════════════════════════════════════
════════════════════════════════════════════
Step 6 : Now you’ll see alot (alot) of texts but don’t worry.. that’s child’s play if you follow carefully..
First , You won’t need to touch the first “5” lines which are “hips , spine , chest , neck , head).
But i only tested in FBX. so you might need if you use other types..
════════════════════════════════════════════
════════════════════════════════════════════
Step 7 : Click “Armature” from right-side panel.
Step 8 : Now you’ll see your model’s bones..
════════════════════════════════════════════
════════════════════════════════════════════
Step 9 : Click the small arrow of “hips” and then “Chest” (Continue to “Neck and then Head if you’re using other model types but as i mentioned before i haven’t tested other types of formats..)
Step 10 : Click the small arrow of “Shoulder” and then “Elbow , Wrist” and you’ll see your model’s finger bones.
⚠ Shoulder , Elbow , Wrist bone names might be diffrent due to model authors..but remember Elbow might be upperarm or something diffrent , Wrist might be hand.. so don’t worry just click until you see five bones with finger names ⚠
Step 11 : Now, Click the small arrow of “Leg” and then continue clicking the arrow until you reach the toe.
⚠ Remember bone names might be diffrent in your model..⚠
Step 12 : Ok. now you might see the bones you need to rename.
⚠ You must click your Right & Left both. You need to rename both. ⚠
════════════════════════════════════════════
Here are examples..
════════════════════════════════════════════
Step 14 : Now Copy the bone names and paste into the script with its places.
★ Mini guide ★
Double click the bone name and press “Ctrl + C” and you’ll copy the bone name. Now, Paste it inside the ” ” with their belonging places.
So, We will copy the bones inside “Shoulder” including itself.
⚠ Things to careful ⚠
Sometimes , Model fingers order might be not correct in some models. But order must be.
“Thumb” must be “Finger0”
“Index” must be “Finger1”
“Middle” must be “Finger2”
“Ring” must be “Finger3”
“Pinky” must be “Finger4”
And others are
“Shoulder” must be “Clavicle”
“Arm / Elbow” must be “Upperarm”
“Forearm / Wrist” must be “Forearm”
“Hand” must be “Hand” (simple..)
“Upperleg / Thigh” must be “Thigh”
“Lowerleg / Knee” must be “Calf”
“Foot / Ankle” must be “Foot”
“Toe” must be “Toe”.
Also some model leg bones might be tricky such as alot of toes , wrong named legs but you got eyes.. so just look out.
════════════════════════════════════════════
⚠ Name Left & Right both!. Also be careful with naming with Left side & Right side..! ⚠
Hips section example
Shoulder & Fingers section example
Leg section example
════════════════════════════════════════════
Step 15 : Now, You might be done with copy+paste.. (boring right?..)
Now press the play button to run the script.!
Big credit again to @Darkshoro.. 😛
★ Swipe the corner a bit if your screen is too small and you can’t see the play button.
════════════════════════════════════════════
Here how it bone names looks after renaming.. Check your model bone names if it’s correct like this screenshot.!
════════════════════════════════════════════
Now, We’re done with Bone renaming section!.
+*Size reference & Shapekeys*+
Step 1 : While blender is opened. Click “File” and then “Import”.. then “Source engine”.
Step 2 : Import the size reference file inside my template folder with “Size reference” named on it with bone append mode to “Make new armature”.
══════════════════════════════════════════
══════════════════════════════════════════
Step 3 : After that, You’ll see a bigger reference. (Now, you’ll see your model is smaller compared to the gmod models.)
Step 4 : Now, Delete the reference’s skeleton cuz’ we don’t need it. To delete it, just click the “reference_skeleton” from right-side panel and press “Del” from your keyboard. (basic..)
Step 5 : After that, You’ll have to select your model and your model skeleton by pressing “A” on your keyboard and hold “Ctrl” and then slowly double-click the “size_reference” and its collection to deselect the reference.
══════════════════════════════════════════
It looks like this after you selected.!
══════════════════════════════════════════
Step 6 : Put your cursor in the middle of your small model. And press “S” and swipe up until your model perfectly fit the reference.
⏚ If your model is a child/kid/loli 💀 character, Just scale your model to half of reference or any size you want for it.
⏚ Also your model doesn’t need to be fit perfectly. Just scale it as you want!. but don’t be too small..
══════════════════════════════════════════
How i scaled.
══════════════════════════════════════════
Step 7 : After that , Delete the reference and its collection. (Select from right-side panel and just press “Del” from your keyboard.. simple.)
Step 8 : Now, Press F3 and type “select all” and then click “Select • All” and again , Press F3 again and type “All transforms” and click “Object • Apply (Ctrl+A)”. Now, We saved the model scale.
Faster way : Press “A” on your keyboard and then press “Ctrl+A” and choose “All transforms”.
⚠ Don’t forget this step or you’ll get big trouble in next steps. ⚠
══════════════════════════════════════════
Here are the commands
══════════════════════════════════════════
Now, We’re done with size. We’ll head to shapekeys this time.
Step 1 : Select your model parts by clicking on the right-side panel.
Step 2 : Now, We’ll check the meshs to see if there’s other shapekeys hidden inside or not.
Most models have main shape keys inside “Body” which is head. So, We need head.
Just click other parts and click the green triangle icon and see the shape keys if there’s any or not in other parts. If there’s any.. you can delete them by selecting shapekeys and pressing the ” – minus” button.
💡 : To understand why’re we deleting other body parts shapekeys. We can only have shapekeys in one body part. Source won’t accept shapekeys from muti-body parts. But you’ll only need “Body” for face-posing.
⚠ “Body” means your model’s head.your model might be named something else! ⚠
══════════════════════════════════════════
Shapekey button
Removing button
══════════════════════════════════════════
Step 3 : So after removing necessery shapekeys from your body parts (Ik it’s pain bcuz some model were supposed to customize model with shapekeys and there’s alot..) We’ll edit the shapekeys of your model’s head “Body”.
Step 4 : Select the model’s head which is msotly named “Body” or “Head” depending on the model.
Click the green triangle button and you’ll now see your model shapekeys (faceflexes).
Step 5 : Now, You’ll have to do some stuffs.
Renaming : Most Booth.pm models always named model keyshapes with japanese language , If it’s try using a translator to translate them. But if you’re using a blend. or your model is already textured.
Just click the “Pin” button to pin the faceflex, So you can know what faceflex it’s and you can rename.
To rename , just double-click the keysh
ape name and type any names you wants.
Deleting unnecessary shapekeys : You have to delete “vrc.blink” and “vrc.blinkleft/right”. Bcuz’ they didn’t work in gmod when complied but there’s still a chance it can work.. Also you can delete “vrc. ” shapekeys if your model has alot of shapekeys bcuz’ some included shapekeys might be same as those vrc. shapekeys. Such as “Blink” included from model.
Removing symbols : Be careful with ” _ underscore” and ” – minus” symbols. and other symbols such as ” + plus”. Sometimes it work but sometimes it won’t so you better remove them and rename something better.
Duplicated keyshapes : Just remove the duplicated or shapekey name with same name.
❖ Future 乃ㄖ乃爪卂匚 Ü : you’ll get this error in future if you don’t.. ❖
══════════════════════════════════════════
How it look like when “Head” / “Body” is selected.
══════════════════════════════════════════
⚠ Things to check ⚠
- Your model can’t have more than “96” shapekeys.
(Remove the unnecessary shapekeys!) - Make sure to translate every shapekeys if your model shapekeys needed to be translated to english.
(Just doing this bcuz’ you might not understand what those faceflex are in-game). - Make sure to check other body parts if there’s any leftover shapekeys.!
For my model, There’s only some shapekeys so im not gonna delete and rename the most shapekeys..
+*Material check & Exporting*+
Step 1 : Some model might be incorrectly named the materials of model. To check it, click the arrow beside with orange triangle with model parts. And you’ll have to click the arrow besides green triangle and you’ll see your model part’s material with its name. faulty material names example shown below.
══════════════════════════════════════════
══════════════════════════════════════════
We’ll see that material is named to “Material #822” instead of hair texture for the tail of model.
Step 2 : To correct it, Go inside of your original model folder and then check inside of textures files (png.) and check the name of textures and copy the name and go inside “Blender”. Double-click the material’s name and rename it . i’ll rename “Material #822” to “Hair01” bcuz my hair (png.) file name is “Hair01.png”.
══════════════════════════════════════════
My model’s hair file name.
Double-click the material name.
Copy and paste the texture name.
══════════════════════════════════════════
Step 3 : Other parts which using hair’s texture may rename itself.
Check for other parts and correct the faulty names for other parts to make sure texture file names and model’s material names are matched correctly!.
Step 4 : After that, We’ll export the model. To export, Go to “Scene” tab. Choose your export path.
And make sure “Engine format” is “Dmx”. (We won’t use dmx. here)
══════════════════════════════════════════
══════════════════════════════════════════
Step 5 : After that, Click “Export” and choose “Scene export”. But You’ll get some warnings for sure. To check, Click “Windows” and then click “Toggle system console”. You’ll see the warning shown below.
══════════════════════════════════════════
══════════════════════════════════════════
Step 6 : We’ll have to use “Weight link cull threshold” option. Swipe it and set it to 0.20 first.
And try exporting again. Check console for errors. If you get these, You’re good to go for next section.
══════════════════════════════════════════
══════════════════════════════════════════
If you still get the “Source doesn’t export this” error in console. Increase 0.05 to the “Weight link cull threshold”. example as 0.25 , 0.30. until you get the warnings log above.
⚠ Keep an eye sharply on error log to make sure there’s “no source doesn’t support this!” error lefts.
+*Proportion trick (Necessery!)*+
Now, We’ll have to proportion trick and this is the one of most important steps.
Step 1 : Open the old “Blender 2.79”. (I linked before.)
Step 2 : We’ll import our model. Click “File” and then “Import”.. then “Source engine”.
Step 3 : Find your model and import the model’s head first with bone append mode “Make new armature”. I’ll import the “Body” one first bcuz’ that’s my model’s head.
════════════════════════════════════════════
Here a screenshot.
════════════════════════════════════════════
Step 4 : And then import the other body parts with bone append mode “Validate against target”.
💡 : Hold shift and select the parts to save your golden time..
════════════════════════════════════════════
════════════════════════════════════════════
Step 5 : Now , Double-click the “Armature” from right side panel with orange stickman and rename it to ” gg “. No capital letters.
Step 6 : Click the orange stickman and it’ll select the model’s bones. And then, Click “Run script” from above.
Step 7 : Use your mouse scroll up and get a little closer view and you’ll see your model’s armature with green bones.
════════════════════════════════════════════
Here how it looks normally.
════════════════════════════════════════════
But if you get more closer to the model’s chest. You’ll see a black bones.
⚠ Search around for black bones, If you find black bones in fingers (Not included if your model only have less fingers.) , or others places such as arms , legs.. You may need to check your bone namings. (That’s mean you f- up the bone naming process, So you might need to go back and rename them in “New blender”. ⚠
⚠ Another one, If your model only have like 4 fingers or less.. It’ll show other fingers with black bones. but that’s not bone naming process. I’ll explain in next steps. ⚠
Step 8 : Now hold “RMB” to swipe around. and turn a little bit right-side view to see black bones.
════════════════════════════════════════════
════════════════════════════════════════════
Step 9 : Now hold shift and right-click those black bones which are spine bones. And then also right-click the nearest green bone with those black bones. I recommand you to click :
════════════════════════════════════════════
This is the green bone you need to select.
════════════════════════════════════════════
Step 10 : While those 3 bones were selected (including the hip bone which is green one). Press “Spacebar” on your keyboard. And type in “Copy constaints to selected bones”. Then choose that one and click.
════════════════════════════════════════════
Command you need to choose.
How it’ll happen when you clicked the “Copy constraints to selected bones”.
════════════════════════════════════════════
Step 11: As you see in the image, Your black bones will be become green bones and moves to the hip bone which is originally green one.
Step (Optional for less fingers models) : If your model have less fingers. Just select the black bones and then select the closet green bone.. then do “Copy constaints to selected bones”.
💡 : Fingers usually have 3 bones in one finger so select one black finger bone and then select one green bone beside it and do the command thing. I mean “do for each finger bones.”I can’t show example for you but please try to understand and try it by your genius brain.!
Step 12 : When all of bones are green, Press “A” and then press “A” again to select your model’s bones. and then click “Pose” and then “Apply”.. then “Apply pose as rest pose”.
════════════════════════════════════════════
════════════════════════════════════════════
Step 13 : Now select the bones again by pressing “A” and press “Spacebar” and type in “Clear pose constraints”. and then click it. Now, Your bones will change the color to “Blue”.
════════════════════════════════════════════
════════════════════════════════════════════
Step 14 : And we’ll switch layer. To do that, You have to click these button shown below.
════════════════════════════════════════════
Click the dot from left side.
════════════════════════════════════════════
Step 15 : And now, You’ll see your model. We’ll switch the script. To do that , Click the button shown below and choose “Proportion trick 2”.
════════════════════════════════════════════
════════════════════════════════════════════
Step 16 : Press “A” to deselect and click the orange stickman to select the bones only or you’ll get a error when we run the script. (Someone got that error and complained me in l4d2 model port guide so do that.!)
Step 17 : Now, Run the script.
Step 18 : Ok, We’re done with proportion. Export your model with “Scene export”.
⚠ Must do “Scene export” or you won’t get the proportion anims files. ⚠
Also i’ll recommand you to export into a new folder inside your exported model.
⏚ You don’t need to do “Weight Link cull” thingy again..
════════════════════════════════════════════
════════════════════════════════════════════
Done for proportion..
+*Physic mesh*+
Step 1 : Now , We’ll go back to “New blender”. Open it and import the “Physic mesh” from my template folder.
════════════════════════════════════════════
════════════════════════════════════════════
Step 2 : We have to delete the “pm_physics_skeleton” by clicking it in right-side panel and press “Del” from your keyboard.. (very simple..)
════════════════════════════════════════════
Delete the skeleton..
════════════════════════════════════════════
Step 3 : Um.. Import your model from proportion tricked model folder. Import model’s head first with “Make new armature” and other parts with “Validate against target”.
Step 4 : We’ll change to wireframe mode so we can see clear between physic mesh and model.
To do that, Press “Z” and move the cursor to left-side and let the mouse go when wireframe mode is selected. Or you can click these button shown below.
════════════════════════════════════════════
════════════════════════════════════════════
Step 5 : After that , Click “pm_physics” from right-side panel. and press “Tab” on your keyboard to change to “Edit mode”. So we can adjust the physic mesh until it fitted.
Step 6 : So, You’ll have to make the physic mesh fit perfectly with model. (It’s easy.)
Here useful basic blender controls for you to edit physic mesh.
⏚ Basic controls ⏚
LMB : Select verts or parts
RMB : Move around
Middle mouse button : Spin around
A : Select everything
Shift + Mouse swipe : Select each verts with muti selectable
Ctrl + L : Select the linked verts (Combo : Select with mouse and press to select linked verts)
S : Scale the selected object
Use these tools as well. (Move, Scale , Rolate etc.)
G : While selected use “G” to move around (Use with Ctrl + L combo) and then click again to confirm.
Ok, Have fun doing it until it fit perfectly for you.
⏚ Don’t blame me for not explaining big. I don’t wanna write the same thing just like my l4d2 guide again, But if you’re having some troubles.. check my l4d2 guide and switch to “Physic mesh” section.
https://steamcommunity.com/sharedfiles/filedetails/?id=3313639808
So some of model like kid.. (WHYY). You’ll have to adjust the physic mesh alot because of your model’s size. My model only have to move the physic mesh arms a-bit up..
════════════════════════════════════════════
════════════════════════════════════════════
Step 7 : When you’re satisfied , Go back to “Object mode” by pressing “Tab” Just delete your model’s parts bcuz’ we only need the physic mesh.
⚠ Don’t delete the model’s bones “Armature”. ⚠
(From right-side panel..)
════════════════════════════════════════════
════════════════════════════════════════════
Step 8 : Now, You’ll have to go into “Modifiers” tab with blue wrench icon. Once, You’re in.
Just click the black box beside with “Object” and choose “Proportion” which is model’s bone.
⚠ Don’t forget this step or you’ll get t-pose ragdoll.. ⚠
════════════════════════════════════════════
════════════════════════════════════════════
Step 9 : So, You can export your physic mesh now into your proportioned model’s folder. not the old one.
+*Qc editing & Jigglebones*+
Step 1 : Copy the Qc. file into your model folder from inside of template folder.
Step 2 : Now, Right-click the “QC Example” and open with “Notepad++”.
Step 3 : First, You have to rename the model mdl. name as you want. To do that,You’ll need to edit the “$modelname” line. I’ll edit “Yourmodel.mdl” into “Sara.mdl” as my model name.
❖ You can name anything you want.! ❖
Step 4 : Now edit “Name” with your model name again.. And then edit “Body.dmx” into your model’s head dmx. file name. My model’s head is already “Body.dmx” so i don’t have to touch it.
Step 5 : Ok, We’ll edit material path to any path you want but path is also important.
Example to give.
VRC/Sara/
Bobmac/Sara
So give it as you want. i’m just giving examples. We’ll put
════════════════════════════════════════════
════════════════════════════════════════════
Step 6 : We’ll go to bodygroup commands. As you’ll see i gave two type of bodygroup command.
One with “blank” and one with no blank under the studio. Now put your model part dmx. file name into the ” ” beside “studio”. Copy & paste the given commands if you have alot of body parts to do bcuz’ you’ll have to do “$bodygroup” for every model parts or undone parts will not show up in game.
Here example usage with normal one and blank one.
════════════════════════════════════════════
════════════════════════════════════════════
❖ Explaination ❖
I used body-2 bcuz’ it’s body of model so i don’t have to make it toggleable but i used blank one for ears so i can toggle and untoggle ears of model in-game. So, Copy the blank lines and normal lines. Customize your own. Use blank included line for bodyparts that you want toggleable in game.
Example as (Ears,Tails,Mask etc.) But if you’re a coomer or a damn r-18 mf. just use on.. uhh idk.. skirts, clothes ig. but please don’t do it…
════════════════════════════════════════════
════════════════════════════════════════════
Ok, That’s how i managed. Tails , Ears , Hair deco with blank and others with no blank.
Step 7 : For now.. Jigglebones. First thing you have to do is open blender.. Check your model’s bones that you want to be jigglebones or just do a definebones from crowbar. And then i putted the parameters for you with each parts. Just replace the $Jigglebone “Ears” with your model’s ear name. duplicate the line if you have other ear bones. Others goes well as same.
Ears : For model’s ear bones like.. (Cat ears , Fox ears..) but don’t do with human ears..
[]..
Tail : For model’s tail bones. (Usually, models with tail has alot of tail bones attached. so just copy-paste the original one for alot of time and then replace.
Oppai : UHHH B–bs.. You know what i mean but don’t do if your model don’t have.. 0_o.
Other doesn’t need to explain alot so just read those and see what they’re for.
════════════════════════════════════════════
Example with tail. I grabbed Bip_tail07 and put it in jigglebone line like this,
Example with ears. I grabbed ear bones. and paste inside jigglebone lines for ears.
════════════════════════════════════════════
So, You might be understand now. just copy bone names from blender. paste inside the line ” ” with their places and duplicate , triplicate or more for bones that want to do as jigglebones.. Have fun copy-pasting!. >:)
Step 8 : So, After suffering from copy-paste, You can finally scroll down and find a line.
“$sequence reference “anims/reference_female” fps 1″
Name “female” to “male” if your character is male.
Step 9 : Scroll down a-bit. And, You’ll see some “$includemodel” lines..
Replace “female” with “male” for male character.
E.g $includemodel “humans/female_shared.mdl” To $includemodel “humans/male_shared.mdl”
And replace ” f ” with ” m ” if your character is male..
E.g $includemodel “f_anm.mdl” to $includemodel “m_anm.mdl”
════════════════════════════════════════════
Replace with “male” if your character is male.
════════════════════════════════════════════
⚠ Only for male characters. For female. Go ahead. ⚠
Now, You’re done with Qc. & Jigglebones. Press “Ctrl + S” to save.
+* C_arms (optional) *+
Step 1 : Open “New blender”.
Step 2 : Import your proportion tricked model.Remember to use the bone append settings i mentioned before.. (Old one is only for backup purpose only if something goes wrong!).
Step 3 : Now , Delete unnessery parts (Deco , Leg accessories etc.) by selecting from right-side panel but leave your body and some clothes. Select your model. (Bones not included.!) And press “Tab” so we can go into “Edit mode”.
══════════════════════════════════════════
How i cleaned some meshs.
══════════════════════════════════════════
Step 4 : Start ripping your character until you get 2 arms. (Use the blender controls you learnt before)
Step 5 : Ok, It’ll be easy bcuz’ it just deleting verices. Mouse swipe.. Select.. Pressing “Del”, Pressing “Enter”.. That’s how we deal..
══════════════════════════════════════════
Done in 15 seconds..
══════════════════════════════════════════
⚠ Make sure there’s enough space between two arms or you’ll get bad view when holding crossbow.. ⚠
Step 6 : Now, Join the parts with Ctrl + J if your model used two parts. select both and press Ctrl + J.. easy. also rename the body part to “yourmodel_arms” or anything u want as a name..
══════════════════════════════════════════
Joining parts
Renaming
══════════════════════════════════════════
Rename the collection also if you got a collection with it.!
Step 7 : Ok.. Export it into my C_arm folder from template. (There’s anims and qc. inside.)
Step 8 : We’ll have to edit the qc. of arms.. Open the “pm_carms.qc” with “Notepad++”.
Replace “model_arms.mdl” with the model name. I’ll go with “sara_arms.mdl”.
Replace “your_arms.smd” with your exported c_arm dmx., Mine is “sara_arms.dmx”
⚠ Replace smd. with dmx. ⚠
$cdmaterials to the material path you used for model’s qc before.!
I used “VRC/Sara/” so i’ll put it.
And you’re done.. Replace the anims ” f & female ” with ” m & male ” in $includemodel lines like before. Then press “Ctrl + S” to save the qc.
══════════════════════════════════════════
══════════════════════════════════════════
Step 9 : We’ll complie it using crowbar. Set your export path to somewhere you want.
⚠ One thing to mention before you complie the arms & model.. If you come from my l4d2 guide, You might be replaced the complier with custom one, Try to verify game files of gmod to remove it. Bcuz’ that complier can’t complie dmx. If you haven’t.. go ahead!. ⚠
══════════════════════════════════════════
Done.. No errors.
To make sure. Use “View” button to view your model’s arms.
It’s seems fine here!.
══════════════════════════════════════════
Step 10 : Also go complie your model!. Check if there’s any errors.!
Try viewing your model also..
══════════════════════════════════════════
Ok, My model seems fine!.
══════════════════════════════════════════
If you’re fine, We’ll proceed to next section..!
+*Materials & VMT*+
Step 1 : Open VTFEdit that i linked before.
⚠ One thing to mention.. While you’re in installer, Make sure to check ☑ these two option.! ⚠
If you haven’t, try to reinstall it with those options checked ☑!
════════════════════════════════════════════
════════════════════════════════════════════
Step 2 : Now, Click “File” and then “Import”. Find your model’s textures (png.) files and import it.
When this thing popped up, Just click “Ok”. It may take a while depending on your device..
So i recommand you to open a lot of VTFEdit and import every materials. Uncheck ☑ “Generate normal map” if it’s checked ☑!. but we’ll need it later.!
Step 3 : When it done. Just click the save icon.
════════════════════════════════════════════
════════════════════════════════════════════
Step 4 : You’ll have to make the material path for the materials that you used for qc before. I used “VRC/Sara/” so i have to create two folder.
First one is “VRC” and then “Sara” inside again and then we’ll save the materials inside of that “Sara” folder. So you might be understand what i mean. Your materials path u used will be diffrent depending on what you putted inside qc.!
Step 5 : Type the “filename” same as your texture’s name. Im exporting body’s texture (body.png) so i’ll type “Body.vtf” in “filename”.
════════════════════════════════════════════
════════════════════════════════════════════
Step 6 : After saving the vtf. , Click “Tools” and click “Create VMT file”.
Step 7 : Click “options” and choose shader to “VertexlitGeneric”. And uncheck ☑ Transluent and check ☑ “Nocull” if you want to render materials in both-side in-game. “No decal” if you don’t want any decals on your model. (blood etc.). Then click create and save it into your material folder.
════════════════════════════════════════════
════════════════════════════════════════════
Step 8 : Repeat the same process for other materials. After doing every materials. Re-import every materials and now check ☑ “Generate Normal map”. And save them with other names. i imported “Body.png” for normal map so i’ll save it as “Body_m.vtf”, Do for other textures as well.. Just doing this to avoid confusion.!
Also you don’t have to do the VMT for normal maps.
════════════════════════════════════════════
How it looks when normal map is generated.
════════════════════════════════════════════
Step 9 : After that , Go inside the material folder and edit the VMT with notepad++.
And we’ll add some parameters.
Open the vmt. files and put these codes inside of them!. i mean replace the written codes.
{
“$basetexture” “Material path/Material name”
//”$bumpmap” “Material path/Material normal name”
$lightwarptexture “Material path/Lightwarp name”
$nocull 1
$nodecal 1
$phong “1”
$phongboost “.02”
$phongalbedotint “1”
$phongfresnelranges “[.1 .1 .1]”
$PhongExponent “1.0”
$halflambert “1”
$selfillum 1 //alpha 10 10 10
}
Step 10 : After pasting them inside of their own vmt.
We’ll have to edit and replace some parameters.
Replace “$basetexture” “Material path/Material name” with your material path and material’s name.
Example, Im editing body.vmt.. So I’ll have to edit it to
“$basetexture” “VRC/Sara/Body” (vtf not included!, only name.)
And now, We’ll edit “$bumpmap”.
Replace “$bumpmap” “Material path/Normal map name” with your material path and material’s normal map name.
Example, I have “Body_m” as normal map of body that i generated before. So I’ll have to edit it to
“$bumpmap” “VRC/Sara/Body_m”
You might understand what you have to do now. So open every vmt. and edit those parameters with path and material names and save those vmt. files by clicking “Ctrl + S”.
Finally as, “$lightwarp”..You have to go inside my template folder, Copy and paste it to your model’s material folder or you can make one if you’re a professional gmod modder. Ok, Go back inside to vmt. Replace the “Material path/Lightwarp name” with your material path and “basewarp”.
Example, I have a lightwarp file and it’s named “basewarp”. So , I have to change it to.
“VRC/Sara/basewarp”.
⚠ Lines for lightwap are same for every vmt. so you can just copy paste the “lightwap” line. ⚠
════════════════════════════════════════════
Example
════════════════════════════════════════════
When you’re done with every vmt. You can go to final section…
+*Lua coding & Testing*+
Step 1 : So, We’ll create a addon folder. Create a folder and name it anything you want.
Step 2 : Go inside that folder and create three folders. And name them :
- models
- materials
- lua
⚠ No capital letters! ⚠
Step 3 : Go inside “models” folder first. Go copy the complied model’s mdl and model’s arm files.
And paste it inside “models” folder or create a another folder inside of “models” ,name it and paste them inside if you want. but it’ll make lua line longer.!
════════════════════════════════════════════
So i created a sub folder and paste the model & arm files inside!.
════════════════════════════════════════════
Step 4 : When done, Copy your material folder that you created in last section and paste it inside “materials” folder.!
════════════════════════════════════════════
════════════════════════════════════════════
Step 5 : Now, Go inside “lua” folder and create a new folder named “autorun”.
⚠ No capital letters! ⚠
Step 6 : Go copy the lua file from my template inside “pm lua” and paste it inside “autorun” folder.
════════════════════════════════════════════
════════════════════════════════════════════
Step 7 : Open the lua. file with “Notepad++”. We’ll do some codings but it’s easy.
════════════════════════════════════════════
★ To write lua for work. You’ll have to replace some codes. ★
**Replace**
➜ *Category* : to your desired category name. *You can change any*
➜ *Name* : to your desired model name. etc. Sara. *You can change any name*
⚠ “models/*Name*/*modelname*.mdl” Not included! ⚠
➜ *modelname* : with your mdl. name. etc. Sara.mdl *You have to put exact mdl. name from your model folder so go inside the model folder and copy the model mdl. file and replace with *modelname*, Wrong mdl. name will not work so check it’s matched or not*
➜ *arm* : with your model arm mdl. name. *check your model folders and copy the arm mdl. name,Wrong mdl name will not work just like modelmdl name.*
➜ Mdl. path : Check inside your model’s folder, As you saw before.. i created a sub folder inside “models” so i putted “models/VRC/sara.mdl”. You don’t have to put the middle one if you didn’t created a sub folder inside “models”. Check below for compared screenshots.
⚠ Don’t remove “models” from line. ⚠
I took the lua file from my l4d2 guide so there’ll be “survivors” in lines below but you already replaced them.. right?
────────────────────────────────────────────
**Customize**
# Health = “100” *Change 100 to any amount you want*
# Numgrenades = “4” *Change 4 to any amount you want*
════════════════════════════════════════════
Here is comparison of **Uncompleted** one and **Completed** one.
Lines i modified will be shown with greens from left side.
⚠ To avoid confusion, Please look at those two comparison carefully! ⚠
════════════════════════════════════════════
Step 8 : After editing the lua. Press “Ctrl + S” to save the lua. Now you can name the lua file with your desired name. I named it “Sara.lua”.
Step 9 : You can test the model now. Go to this path. Or browse the game file from steam and go inside “addons” folder.
” C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons\ “
( Drive name may depends on your storage card. etc E:\ , D:\)
Step 10 : Paste the model folder inside “addons” folder and now you can launch your game to test it!.
════════════════════════════════════════════
════════════════════════════════════════════
Step 11 : You may need this addon to spawn ragdoll.. Or you can kill the Npc inside.
https://steamcommunity.com/sharedfiles/filedetails/?id=104603291
Step 12 : Create any game. (Now, wait till it loaded.. also rip if you have 1000+ of addons).
Step 13 : Now, We’ll spawn ragdoll first to see if there’s any physic errors like stretchy ragdolls.
You’ll see your addon at “Addon – Legacy”.
════════════════════════════════════════════
────────────────────────────────────────────
Ragdoll also fine
Npc also seems fine.
PM also fine..
Arms also fine.!
Future 乃ㄖ乃爪卂匚 Ü : Model in screenshots might be bright, that was before i added lightwarp.. So you’ll be fine.
════════════════════════════════════════════
Now, We’re done! Congratulations!! You have ported the model into GMOD.! If you have some problems. Move to next section for troubleshooting the common problems.
+*Troubleshooting*+
**Common problems/mistakes**
Encountered vertex in delta state : Check every bodyparts except model’s head to make sure there isn’t any shapekeys. You got this error bcuz you have some inside in other parts.
T-pose ragdoll : Make sure you did the “Modifier” thing at “Physic mesh” section. Please go double-check it. And view the model from crowbar.. while HLMV, check the Collision model. And see if it’s ok or not.
Error model : Make sure you linked the model mdl name correctly in lua.
Example “models/VRC/sara.mdl”
Can be mistake with “model” without “s”, no mdl behind modelfile name such as “models/VRC/sara”.
Error model arms : Make sure you linked the arms mdl name correctly as well.
Same as above. Just need an sharp eye to check.!.
Lua corrections : use “/” instead or “\” in lua code if you copied from path shown in file explorer.
════════════════════════════════════════════
**Rare problems**
Stretchy model parts : Basically bcuz’ model parts are heavy, try optimizing the heavy bodyparts by decimating , Un subdivion and other tools.. i recommand “Cat Blender Plugin[github.com]“.
ERROR! : R_addvertextomesh : bad vertex (numbers) : Same solution as above. Model just need some optimization. But even myelf still figuring it out..
Weird c_arm fingers : Issue comes from model’s finger bones being upside down or faulty directions instead of straight. You may need to fix it yourself or try seeking a professional..
Stretchy C_arm fingers : make sure to name fingers in order. Thumb , index , middle , ring and pinky.
Too many material coordinates : Remove unnecessary UV maps from model. Models only needs one.
If still not helped.. it might be issue with model itself.
Unattached parts : Sometimes.. ported models can be a little bit quirky with bodyparts such as flying parts , unattached parts. All you have to do is do “CTRL + J” with the part that floating around and a good part. I mean join 2 parts.
════════════════════════════════════════════
+*Credits*+
Bobmac – Writing guide & assets from template.
Darkshoro – Bone naming script
K10[booth.pm] – Model author
Deadwater2 – Tutorials for proportion trick and other stuffs.
Make sure to give a credit to me if you used my guide for a workshop item!!
That’s all folks. Like & comment down if you encountered any problems I haven’t encountered.
Bye.!
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
+*Updates*+
No updates so far!. Come check soon and report any issues if found!.
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
And that wraps up our share on Garry’s Mod: Bob’s Guide : How to port VRChat/Unity models into Gmod easily!. If you have any additional insights or tips to contribute, don’t hesitate to drop a comment below. For a more in-depth read, you can refer to the original article here by 乃ㄖ乃爪卂匚 Ü, who deserves all the credit. Happy gaming!