Garry's Mod

Garry's Mod

132 ratings
How to create Bodygroups for Models.
By The Devils Own
Hello, it's The Devil's Own again and here to bring you another guide to the table on porting models. You seen how to port models regulary on my last guide, however today you will witness on how to create bodygroups for these models. This step by step guide will be re-interfated on your knowledge on the last guide, but I will reference on what to do from it from time to time as we explain today on how to create bodygroups for models.
   
Award
Favorite
Favorited
Unfavorite
What are bodygroups...?
Well, bodygroups are assentially just extra addons to models. Whether it be a magazine that can be detatched from the gun, or a scope that can be added onto it, or even an entire new front barrel of the weapon to give it a new look. It is completly different amongst how any other weapon is and it shows off its features on what the modder gave for certain screenshots that many people can create it.

Bodygroups are actually fairly simple to create, but they take a little more time than just a usual standard port off. But the pay off with bodygroups gives your models more use and reocgnition across the Workshop. It's just one of those things where it's nice to have and makes yourself look special really.
What you need to begin?
Well, in reality there isn't many special tools you would need to create a bodygroup for your models. So it will just be in the similar path as always with the standard Garrysmod Porting Station that I created. So below is a link for the pack, and along with it are descriptions of what each of the programs do.

https://mega.nz/#!PJEhWaqB!v_feGYkpLicIvPsPrKhTMOutd8_mapRZ82YMwX5xAX4

The first one we are going to look at is the first one called 'GMADExtractor'
This tool is practically a basic when you want to extract any of your GMA files that is the newly compressed file for the Garrysmod Workshop. You can use this if you ever have a workshop folder on workshop that you want to extract and update which has all the contents.

The next one you have is the 'GUIStudio'. This is the most imporant tool out of all the features. It is what you would use to compile the models all together into garrysmod and other sets of features for it. Whether the model you are uploading is an entity, a standard model, or a ragdolls, this is what does it all. Make sure you keep that.

The next is MDLDecompiler which is basically self-explanatory by the name of it. It decompiles any 'MDL' format model down to all of its animations, reference files, and generic bodygroups it may include down to what is the 'SMD' format. This is another important thing if you are wanting to update any models you have created.

Another important tool is called 'Milkshape'. Sure, you can go ahead and port models without it, but you would be asking for trouble if you are just starting it. Without Milkshape, you will have a very rough time if you are a beginner. Milkshape is there to basically do the hardwork for you and help you through all your problems. I uploaded the full version no charge, so you have all the features once opening it.

The next one you have is the UPK Unpacker which is to unpack any unreal-engine files, but you do not need this if you don't want to, but we are going to use it today. With the UPK Unpacker, you can unpacker, any games that runs off the Unreal Engine, you can extract the models such as games like Red Orchestra 2, Chivalry Medieval Warfare, Mass Effect, and the list goes on. Keep that incase you want to port from any other of those games, but we are going to use it for this tutorial.

The other one you have is the VPK Extractor. Back then, everything was running off of GCF. But when Source Engine 2 was being created and SteamPipe was uploaded, they went to the new format of VPK. It's another extractor that you don't need, but if you want to extract models and edit about like from Insurgency 2, Half Life 2, Left 4 Dead 2, you get the picture. I'd say keep this if you want to port models from any other source games.

Now another important tool you will get is called the 'VTFEdit'. This is what you would use for all your Materials. The Sourceengine uses its own format of VMT and VTF. This will create any files you have into VTF's. Will get more into this later during the tutorial, so be sure you keep this.

And the last tool you have is the GMPublish Workshop Uploader. Not just models, but any other thing you want to upload to workshop, whether it is Sweps, Entities, Tools, or basic Models, you would use this. If you are wanting to upload your work to workshop, it is important to make sure you have this around unless if you are willing to do the hard way through the command prompt. There is already several guides on how to upload to workshop, so I won't go into to depth on how to use it.
Beginning your Bodygroup
Sweet, we can start our bodygroup now. Get yourself some nice ambience music, kick back with your drink and let us begin on the process of bodygrouping your models. Today we will be working with the Killing Floor 2 AA-12. So below is a link to the model itself which you will need.

https://mega.nz/#!zRV0nDYQ!tY6X95ejdd-mLtAzFF95J1bR_tlghUcJR3iLBZmx5E8

Now that you have the AA-12, go ahead and open up Blender.

Blender is a free program modeling tool which you can download on Steam here.
https://steamhost.cn/app/365670/

Navigate through the top left section where it says 'file' and click on it, bringing the mouse down to where it says 'import'. Then hover the mouse over where it says 'Skeleton Mesh PSK'.

(NOTE!!! You have to manually download the plugin script for Unreal Engine in order to import it into Blender. Simply download the script here: {LINK REMOVED}

Then Navigate to your blender main folder and go to '2.77/scripts/addons' and drop the file in there. Then just enable it through your addons tab.))

Open the browser and go down to the Desktop where you should have the AA-12 Model extracted and from there select the folder which has the name 'Wep_1p_AA12_MESH'.


You should now have the AA-12 and the skeleton mesh along on the browser and it should look a little something like this.


Now what you are going to do is you are going to select the bone and you are going to hit the 'del' key to delete it like so.

With the bones gone, you are now going to 'smooth' the model. This was something I forgot to mention on my last guide, but I will show you now so you don't make the same mistake I did. You are going to right click on the model and hover your left mouse over at the transform tab where a button called 'smooth' will be under the shading tab. You will click that and it will automatically smooth your model.



God, that looks so much better now. Now that we have all of it set up, it's time to begin our bodygroup porting across and start off on what everyone's been waiting for.
Starting your bodygroup.
"GET OUT OF HERE STA-" I mean glad to see you all back again to begin your bodygroup. You made it through the pieces, so now it's time to literally put the gun into pieces.

Hover your mouse at the top right where the table of contents resides and find the AA-12 Rig file. Click on the plus sign on the left of it and select the upside down triangle next to the name of the AA-12.


You have it selected now in its bodygroups, what you are going to do now is select the vertex group tab and you are going to now begin deleting pieces. We need to be left with just the base of the gun on what we want to have bodygroup. For this guide, we will have the drum magazine and the charging handle bodygrouped.

Select the vertex group tab and select both the drum mag, bolt, and the charging handle.


Now that you have all those selected, the next thing you are going to do might sound crazy, but it's true. Now you are going to 'DELETE' them. Click on the 'del' key and delete the vertexes.


You are now left with a visual representation base of your shotgun. Simply select the 'file' tab and then export the model as a 'base.obj' to your desktop.


Now that you have done that, go back to Blender and select 'CTRL+Z' to undo the model back to the way it was to get your Magazine, Bolt, and Charging Handle back.



The Next thing you are going to do is go back to your Vertex Group and you are going to 'De-Select' the Magazine to leave it alone, and from there you are going to select everything else and delete them all until you are left with just the model of the magazine.




Now you are going to export the magazine model to the desktop and you are going to name it 'Magazine'. Once done, return the model back by selecting CTRL+Z like before to get your weapon back. If the weapon happens to come back with jagged edges if you left it as an object when you revert it, just smooth it back and delete the skeleton reference again.


Now what you are going to do is we are going to get the bolt of the shotgun for its bodygroup. We are going to first get the bolt back so we can have a reference of the gun to know how far we need to bring it back. So go to the Vertex Groups and select the bolt to highlight it.



Now that you have it selected, you are going to bring it back to a certain degree until it is visible as the action of a shotgun would be like so.


Now that you ahve the bolt back to the way you want it, you are now going to deselect the bolt and select the rest of the gun, deleting it until you are left with just the bolt.



Now you are going to export this model as 'bolt2.obj'. The reason why your exporting it for 2 is because the normal action with the bolt not back will be number 1.


Press CTRL+Z and regain your model once more.

Be sure the bolt is back where it was like so, and once it is, select all of the weapon but the bolt, be sure to leave it as it is.



Now you will export this as 'bolt1.obj'. And from there, you now have the bolt of the shotgun done, leaving only the Charging Handle left to do in the bunch.

Now select all of the gun until you are left with only the charging handle.


Delete the rest of the weapon and from there, you will export the charging handle as 'Charginghandle 1'.


Press CTRL+Z to regain the model back, and here you will select the charging handle, bringing it back to a certain degree that's reasonable for the model to handle.



Once you have the charging handle back to that point, you are going to select the rest of the gun and from there you will delete it until you are left with the charging handle once again.



Now you are going to export this as 'Charginghandle2.obj' and you will now be finished with all the model bodygroups.


Now that it's finished, we are going to now begin on the next section where we place the textures on them and begin to re-instate the model collected together.
Compiling your Bodygroup Together.
Now that we have all the models needed to compile the bodygroup together, we are now going to begin with this period. We are now almost done, so it is going to be an easy point of just following along. I won't show you how to create your textures to VMT's, so if you want to learn that, please view my other guide on 'How to Port to Garrysmod.'

Be sure to have your model collection, and what you are going to do now is open up milkshape and you are going to begin selecting 'EACH' and 'EVERY' part and you are going to select the textures on them all, exporting them as SMD's and ensuring they are the same name as the parts like so. Here are the textures you will need for them, simply drag them in your garrysmod/garrysmod folder: https://mega.nz/#!WdNlWRbB!_nFcWeTdtqmSFu7gZ08q64g78CCEupFdsckLRJEsgus

Start by importing the base of the AA-12 into the Milkshape Editor through the Wavefront of the model.



You are now going to go to the right and you will select to create a new material group, and from there you will add the material 'aa12black_d'. Make sure you get the material that's inside of the Garrysmod Materials Director folder and then 'assign' the texture to the model. Just remember to do what you did in the last time you learned to make a model.




YOU ARE GOING TO DO THIS TO ALL OF THE MODELS. THE MAGAZINE, BOLTS, AND CHARGING HANDLE. I REPEAT, YOU ARE GOING TO DO THIS FOR ALL OF THE BODYGROUPED MODELS YOU PORTED FOR THE WEAPON!!!


From there, you are going to export the model as a 'Half-Life SMD', and at this point you will do the same to all the other models. Continue this until you have all of the models as SMD's.



Now that you have all of the models together and textured ready to go, what you are going to do now is put them in this simple folder by naming it 'AA-12'. Once you do, you're going to drag all the files into the folder.


When you have all the files in the folder, you will then create a '.qc' with this corrected format that you will reference below. It should look exactly like this.

$cd "C:\Users\jess\Desktop\AA-12"
$modelname "Killing Floor 2\AA-12.mdl"
$model "mybody" "base.smd"
$bodygroup Magazine
{
studio "magazine.smd"
blank
}
$bodygroup Bolt
{
studio "bolt1.smd"
studio "bolt2.smd"
}
$bodygroup Charginghandle
{
studio "charginghandle1.smd"
studio "charginghandle2.smd"
}

$cdmaterials "models\kf2\aa12\"
$texturegroup skinfamilies
{
{ "aa12black_d" }
{ "aa12digital_d" }
}
$hboxset "default"
// Model uses material "aa12black_d.vmt"
// Model uses material "aa12digital_d.vmt"
$surfaceprop "Weapon"
$illumposition -1.976 1.162 -1.269
$sequence idle "idle" loop ACT_VM_IDLE 1 fps 30.00
$collisionmodel "base.smd" {

$mass 8.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}


From there, you will compile the model and your model is completed. Just follow the compiling process as usual like you did through the previous guide.

Finished
Model is now finished. Thank you for checking on how to create bodygroups. Sorry if I may have not been too updated or descriptive, but if you have any questions I will respond to them with the best I can. Thank you again, and have a great day.


28 Comments
Anothuor 8 Jul, 2023 @ 7:07am 
outdated dont use dont waste your time
Soerix 22 May, 2023 @ 4:47am 
Does this work with player models
[ARP] Kinppy 7 Nov, 2022 @ 1:49pm 
I tried to do a playermodel bodygroup but it just floats in the air and just drags behind the player. I don't know what I'm doing wrong.
links are dead
Edgy name 8 Jul, 2019 @ 1:24pm 
thats a shredder?'the gun'
⑨lnsmall 11 Nov, 2018 @ 8:03am 
If anyone is looking for the links, they're available through Inspect Element.

For anyone who doesn't feel like doing that, here are the removed links that are still available (remove the spaces):
Garrysmod Porting Station: https://mega . nz/#!PJEhWaqB!v_feGYkpLicIvPsPrKhTMOutd8_mapRZ82YMwX5xAX4
Unreal Engine Blender plugin: https://www.mediafire . com/file/uycpz61ag547oh4/Blender249%5BPsk%5D%5BPsa%5D%5B2014-08-31%5D.zip

The AA-12 model and textures have been removed from MEGA, unfortunately.
Scaly_Pride 13 Feb, 2018 @ 7:07pm 
ther is another thing i really Wanna Know in Depth is Waaaaaaay below The Texts Contains a X y Z And Coordinates Those thing I just Wanna Know Before Compiling them
Guquis (selling posters) 30 Nov, 2017 @ 9:55am 
How would it work if I wanted to make additional bodygroups for eye and/or mouth textures for Pokémon models to give them more facial expressions?
Taberone 24 Sep, 2017 @ 10:13pm 
Link got removed, I think you need to put spaces or something in the middle of the links to fool steam's auto-censorship
Gabrielium 15 Aug, 2017 @ 5:17am 
Uhh, all your links have been removed.