How to make a modified version of a default model

Avatar
H2ofiremaster
1 Posts
Posted Sep 15, 2021 , Edited Sep 15, 2021
Hi, this is my first time posting here so tell me if I'm in the wrong place.

So, I've worked with hammer for a bit now, made a couple of maps, but now I want to get into custom assets. I want to start small(ish) so I was wondering: is there was a way to take a model from the base game, (Specifically metal_box.mdl) change the texture of it, (I already have the vtf I want to change it to) and save it as a different model? (still a physics model though)

I've been looking online and I can't seem to find anything.

(sorry if the solution is really obvious and I'm just missing it)

Advertisement
Registered users don’t see ads! Register now!
Avatar
TwoKrazy
6 Posts
Posted Dec 10, 2021 , Edited Dec 10, 2021
Replied 2 months later
This is one of many methods that doesn't override any existing models. There are a few extra steps not provided if you want to override existing materials or models. Let me know if you want those extra steps.

  • Navigate to your Portal 2 root folder (Default for windows is C:\Program Files (x86)\Steam\steamapps\common\Portal 2 or just C:\Program Files\Steam\<same> on 32-bit systems)
  • Create a folder called portal2_dlc#, replacing # with the lowest available number.
  • If you haven't already, extract all of the metal_box models from Portal 2\portal2\pak01_dir.vpk\models\props\ to a folder you'll remember it in.
  • Install and open Crowbar and decompile the model to a folder you'll remember.
  • Open the QC and edit the string next to $modelname to rename the model and/or change its paths. Note that this is relative to the models\folder
  • Scroll until you find $texturegroup <string> and delete all of the skins except for what you need. You can also copy-paste new skins in that list, as long as it stays inside the curly brackets.
  • Change the materials to your custom materials in one of the strings within the curly brackets. Note that this is relative to the materials\ folder
  • Save the file and open Crowbar
  • Compile the model to the portal2_dlc# folder you created. This will automatically create a models\ folder and save the models in the correct folder. Nothing else needs to be done with the models, so you can exit Crowbar.
  • Navigate to your dlc folder and create the folders for your materials. For example, if I stated in the QC that the material should be models\props\custom, I'd create a materials folder, then a models folder inside of that, then props inside that, and custom inside that.
  • Put your materials inside the final folder created.
  • You should be done! Start the Model Viewer and you should be able to open and view the model in there. If not, open or create a map in Hammer, then, on the top bar, click Tools, then click Model Browser and you should be able to navigate to it from there.

Hope this helps! :D