Garry's Mod

Garry's Mod

85 ratings
Ultra Simple custom Garry's Mod Player Model
By g9f605
Use Blender and Crowbar to make an ultra low poly custom player model for Garry's Mod. For those with little or no modding experience. Very streamlined work flow.
5
   
Award
Favorite
Favorited
Unfavorite
Introduction
-=-= BIG OOF =-=-

This system has a MAJOR drawback that stems from my lack of experience with this stuff. The directory structure can cause issues when you start making multiple models with this same system. Basically, GMOD will expect another layer to the directory structure when you have multiple PMs with the same name. I hope to update this soon

-=-= END OOF =-=-

Making a custom player model for Garry's Mod is fun and totally doable for anyone. But there are a number things that can easily trip you up. The goal of this tutorial is to make an extremely simple model that you can have in game fast.

Having said that, making an EPIC model is something that will take years of practice and study. The weight painting video below sums it up quite well:
Royal Skies LLC from the video "Weight Paint Introduction (Advice For Beginners)":
"What you are about to learn is so difficult, it is basically it's own professional career"
Not daunting at all! Pretty sure you can follow along without too much Blender experience. Whatever you learn on your own will be totally worth the effort.

Consider doing this over 3 days. "Slow is smooth, and smooth is fast" (not my saying)

I'll be glossing over a lot. But to paraphrase the great Andrew Price:

The Great Andrew Price being paraphrased by me because I can't find the video where I heard it sorry please correct me but I think I got the gist of it:
"We are artists. And artists are lazy."

Check these tutorials for more in-depth info:

Pte Jack's "How Valve Materials Work" Bookmark, you'll need it.


Download and Install
Crowbar
Blender[www.blender.org]
Blender Source Tools Addon[steamreview.org]
https://www.getpaint.net/
https://gamebanana.com/tools/download/6791 Paint.net vtf extension - take the one called pdnvtfplugin111.zip
Download this, unzip and put the "gmod_pm_tut" folder on your desktop.[drive.google.com]

All of these programs are free.
(Consider donating. Talk about bang for your buck omg .. )
Blender
Full video here:

link to tutorial video
In Blender delete the cube, light and camera. From the "Gmod_PM_tut" folder, import 'male_09_reference_less_materials.smd' This is a model from Half Life 2, from which I removed things not needed here. Delete the mesh so you are left with the skeleton. Save your Blender file as 'sm' (short for 'stickman') in "Gmod_PM_tut/sm"


Create a mesh to outline the bones of the skeleton. If you are comfortable with Blender this will be easy. Otherwise, it's worth taking the time to learn. When doing the hand area, pay attention to the bones. One of them is for the weapon attachment. Encompass that with your model.


Name the collection "reference". This is crucial for this tutorial.


From object mode, parent the mesh to the armature. This allows the skeleton to control the movement of the body. Parent with empty weights.

In object mode, select the mesh. In the properties window > Object Data Properties, you can see something called Vertex Groups. This is a list of the vertices that each bone will control. Currently the bones do not control the movement of any vertices. Weight Painting is the process of assigning vertices to the bones, and how much influence the bones have over their vertices.

From Object mode, select the mesh, and select Weight Paint.


Using the Vertex groups window on the right, we will select the vertex groups one at a time and assign the verticies' weight. Every weight will be set to 100%. This normally done with the paint brush, but for this tutorial select the verticies and using SHIFT+K assign full (1.0) weight.


When finished weight painting, go over it one vertex group at a time. Go to the Vertex Groups list and click on the top one (probably ValveBiped.Bip01_Pelvis) Go down the list (possible to use arrow keys as long as mouse is hovering in that box) and check to make the weight painting is ok. Turn the model around and check the different sides.

Side quest: From here you could go into pose mode and check to make sure the weights are acting as expected. Not necessary for this tutorial. If you want to, go to Object mode and select the armature. Go to Pose mode, and select some bones and move/rotate them around. When done, reset the pose. From pose mode, press A, A (so that all bones are selected), Pose > Clear Transform > All.

From Pose Mode press A, A (so that all bones are selected), CTRL+A > Apply Pose as Rest Pose




















Getting to this point is hard! Pat yourself on the back!

Our player model will look pink and black unless we give it material and texture. On the right side of the screen, click on Material Properties and then New.



Very important:

Change the name of the material to 'sm' Otherwise your pm will have missing textures.

Well, that's one reason anyway 😭😭😭





Change the Editor Type to "Image Editor" Click "New", name it "sm", 2048x2048, select a colour, and select 32bit float. Where it says Untitled, change it to "sm" Then go to Image > Save As and save it as "sm.png" in Gmod_PM_tut/Blender_files.


It's important to save textures/images in this way. Otherwise they will disappear from your Blender file when you exit.


On the right side of the screen (in the Material Tab) use the dropdown menu to select "sm"

Change the Editor Type back to "3D Viewport", select the mesh, and go to Edit Mode. Press A to select all faces. Go to UV > Smart UV Project. This takes your 3d collection of faces ("mesh") and divides them up so they can fit flat on a 2d plane.



















Assign the texture (or image) sm.png to the base colour of the Material.




















From the Materials Properties tab on the right of the screen, click "Assign"


Side Quest: observe the UV by changing the Editor Type to "UV Editor"

Now we have a mesh with an assigned armature and material. This is all we need for a player model.

Side Quest: Material and Texture are different things in Blender, as are VMT and VTF for Valve games.

From Object Mode select the mesh. On the right side, go to Scenes > Source Engine Export > and change Export Path to "Gmod_PM_tut\for_crowbar"

Export Format: SMD
Target Up Axis: Z
Engine Path: Program Files (x86)\Steam\steamapps\common\GarrysMod\bin\ (or wherever your GarrysMod\bin\" is)
Target Engine: Source

Underneath "Source Engine Exportables" it will show the name of the .smd file you will export. It should be reference.smd

Export "reference.smd"


This creates an .smd file, one of 4 files that Crowbar will need to compile our player model.

  • Tips:
  • Blender terminology: Mesh - the collection of 2d faces combined to make a 3d object. Armature - the collection of bones that move the mesh. Try not to call this a skeleton. It's confsing because sometimes your mesh will be the shape of an actual skeleton. Try not to call the mesh a body, because body is a very important term that means something else in Blender. Conversely, bones in the armature are called "bones" .. not confusing at all.
  • It's easy to end up with duplicated vertices and faces that end up the wrong way. An easy way to fix that is to use Mesh > Normals > Recalculate Outside and then Mesh > Clean Up > Merge By Distance (like everything Blender, those commands are worth studying)
  • From Object mode select the armature, click the 'running man' icon on the right > Viewport Display > select 'Names' to see the bones' names. It's kind of messy so you won't want this on all the time.
  • Get used to hitting ALT+A to deselect everything before selecting in Blender. It is extremely easy to assign vertices and weight where you didn't meant to.
  • You can delete unnecessary vertex groups (like Fingers, in the case of this tutorial) and reorder them. Don't rename them!
  • Most tutorials will have you parent with automatic weights. This works will in most cases. But if your model isn't quite human looking, or is extremely simple, empty Weights will save you time.
  • Personally I advise working with empty weights if your character isn't very humanoid.
  • Even pro animators struggle with weight painting. However, because our model has extremely few vertices it will be ultra simple.
  • Blender pays attention to where you hover the mouse.
  • UV does not mean Ultraviolet. U and V are the coordinates that images are mapped to on each face of your mesh. Still, you probably should put on sunscreen.
  • Blender offers tools amazing for making materials and textures.
  • If you open an .smd file with Notepad++ it will show you all the faces, and the material assigned to each.
Crowbar pt1
Crowbar utterly simplifies the use of valve modding programs. Also facilitates model preview. So nice.

Open crowbar. Under Set Up Games, choose Garry's Mod.
Engine: Source
executable: <library1>\steamapps\common\GarrysMod\hl2.exe (or wherever yours is)
GameInfo.txt: <library1>\steamapps\common\GarrysMod\garrysmod\gameinfo.txt (or wherever yours is)
Model Compiler: <library1>\steamapps\common\GarrysMod\bin\studiomdl.exe (or wherever yours is)
Model viewer: <library1>\steamapps\common\GarrysMod\bin\hlmv.exe (or wherever yours is)
Mapping Tool: <library1>\steamapps\common\GarrysMod\bin\hammer.exe (or wherever yours is)
Packer: <library1>\steamapps\common\GarrysMod\bin\gmad.exe (or wherever yours is)
The rest can be left as-is.

Go to Compile, Browse... > navigate to your "Gmod_PM_tut\for crowbar" folder and select "please_compile_this_crowbar.qc"

Set Output to: "Subfolder (of .qc input)"

Game that has the model compiler: Garry's Mod

Click Compile. Crowbar will output 6 files.
At the bottom of the screen, click 'Use in View'. Crowbar will go to the View tab and open sm.mdl. At the bottom-left of the screen, click 'View' This will open Valve's HLMV program. If it works here, it should be fine in GMod. Right now it will be pink and black, this means the material is missing. This is fine for now. In HLMV go to the Sequence tab and try a few animation sequences. From here you can see where the weight painting needs work. In this case I can see that Garry's Mod wants Susan to be a headbanger, I'd have to go back and fix that.

  • Quick Tips:
  • The .qc file is a list of instructions for the Valve model compiler, Studiomdl.
  • avoid_spaces_and_capitalization_for_file_names
  • In model preview, choose a walk sequence and set move_x to 1.0
  • HLMV = Half Life Model Viewer
Paint.net
In Paint.net, open sm.png from the "Blender_files" folder and save it as sm.vtf in folder "Gmod_PM_tut\for_workshop\materials\sm\"
(FYI, drawing on the texture is not necessary, I am just doing it so you see can the difference in game)
  • Tip: The next part involves a lot of finicky syntax. This tutorial will skip that. But be warned, there is a lot of finicky syntax with Valve textures. This tutorial aims to keep it as simple as possible. But bear in mind that getting file and folder names correct is ***crucial***
Crowbar pt2 - Publish
Move the 6 files Crowbar outputted to "Gmod_PM_tut\for_workshop\models\sm"


In Crowbar, go to the "Publish" tab. Crowbar will take your Player Model and upload it to your Steam workshop. Make sure you are signed into your Steam account. Set Game to "Garry's Mod". Click "Add Item". Name your player model in Title. Give a brief description. Tag Type should be "Model" and choose tags. In "Content Folder or File" browse to your "GMod_PM_tut\for_workshop\sm" folder. Under Preview Image browse to "GMod_PM_tut\sm_thumb.jpg" Set Visibility how you like.



















Publish!

Give Crowbar a few moments to do its thing. Close Crowbar. Go to your Steam workshop page. Subscribe to your addon.


















Run Garry's Mod. Enjoy!



















Thanks!
Thanks for reading! Constructive criticism please. Want to make this as useful to as many people as possible. I will do my best to answer all.

Massive shout to Pte Jack for helping me format this guide!

HUGE thanks to those who taught me what I know (in no particular order): ZeqMacaw, Timbleweebs, Vengeance, Buu342, Pte Jack, Blender Guru, Royal Skies LLC, Marek, Frees. If you want to thank me, spend some time lurking in help forums helping others.
390 Comments
g9f605  [author] 4 Dec @ 7:52am 
Np glad it worked :steamthumbsup:
ludo!! 3 Dec @ 11:59pm 
i tried it and it actually worked without it! :VSnake: thanks
g9f605  [author] 3 Dec @ 5:25pm 
Hm. I’ll be honest I don’t even remember what that file does. And from what I can tell, it may not be necessary to have this file when publishing to the workshop. Try publishing without it?
ludo!! 3 Dec @ 2:38am 
this is a really well made tutorial :D but i'm having trouble. when compiling in crowbar, the file sm.sw.vtx isn't there in the output, even though the other 5 files are. is there something i've missed in the process?
xX_BandaGes_ConsuMer_Xx 13 Nov @ 7:52am 
I don't know

I have yet to try it out
g9f605  [author] 12 Nov @ 5:49am 
Can you adjust the pose in Blender (in pose mode)? If so then you should be good to go?
xX_BandaGes_ConsuMer_Xx 12 Nov @ 4:51am 
I think so? I should try out

Thought considering it has jigglebones I think it is already weighted
g9f605  [author] 11 Nov @ 7:22pm 
Not sure, but I am guessing if the mesh is patented, and you do some weight painting, export, you’ll have something?
xX_BandaGes_ConsuMer_Xx 10 Nov @ 6:55am 
Yeah

It has and i installed them

All i have to do is do proper bones and i think it would be it?
g9f605  [author] 9 Nov @ 1:19pm 
I see … does blender not have addons for MMD? Export to obj or something?