Reskinning: how to?
Quote from Soundlogic on July 15, 2011, 2:02 pmOK, I'm probably missing something really obvious, but I cannot figure out how to reskin a cube. I have looked online at tutorials, but I cannot find the basic skins for the cubes.
Thank You,
Sound Logic
OK, I'm probably missing something really obvious, but I cannot figure out how to reskin a cube. I have looked online at tutorials, but I cannot find the basic skins for the cubes.
Thank You,
Sound Logic
Quote from Omnicoder on July 15, 2011, 2:15 pmTo do it this for anything except prop_weighted_cube (eg. a prop_physics or prop_dynamic with a cube model):
Extract the model and materials from the vpk, decompile the model with CannonFodder's tool and recompile with a new name or hex* the model and then just put your new skin in the folder you hexed the model to.
hex - With Source models it means to modify the model name and material path in a hex editor.
Skins are at models/props/metal_box.If you want to use it with prop_weighted cube you'll need to do it differently:
Extract the metal_box skin (models/props/metal_box), modify it and then embed it in your bsp with pakrat. This will mean whatever skin you replace is replaced for good everywhere in your map.
To do it this for anything except prop_weighted_cube (eg. a prop_physics or prop_dynamic with a cube model):
Extract the model and materials from the vpk, decompile the model with CannonFodder's tool and recompile with a new name or hex* the model and then just put your new skin in the folder you hexed the model to.
hex - With Source models it means to modify the model name and material path in a hex editor.
Skins are at models/props/metal_box.
If you want to use it with prop_weighted cube you'll need to do it differently:
Extract the metal_box skin (models/props/metal_box), modify it and then embed it in your bsp with pakrat. This will mean whatever skin you replace is replaced for good everywhere in your map.
Quote from Soundlogic on July 15, 2011, 2:23 pmSo I add something in the same folder, called metal_box_skin006? And have the vmt and vmf?
Right?
So I add something in the same folder, called metal_box_skin006? And have the vmt and vmf?
Right?
Quote from Omnicoder on July 15, 2011, 2:26 pmIf you're going to do that you have to take the first option in my post since the existing model only goes up to 5. Adding a sixth will also require modifying the qc before you recompile.
If you're going to do that you have to take the first option in my post since the existing model only goes up to 5. Adding a sixth will also require modifying the qc before you recompile.
Quote from Skotty on July 15, 2011, 7:36 pmThere is another possibility where you don't have to de- and recompile the model.
Warning! Just use if it's not a prop_static casting shadows.
- Download the XVI32 Hex Editor.
- Extract just the .mdl file of the model you want to reskin from the VPK.
- Don't rename this .mdl file or the physical model won't work! Just put it into another directory, for example:
Steamsteamappscommonportal 2portal2modelsmyhexedmodels
If you put it into the same directory like the original, the original will override it.- Open XVI32 and load this .mdl file.
- At the right side you will see a lot of strange things. Just go to the bottom. The last 2 entries are for the textures (if the .mdl got just 1 skin!).
For example:Quote:ball_catcher_sheet modelsprops(for combine_ball_catcher.mdl).
- The italic part is the name of the used .vmt file (without .vmt) and the bold is the path (relative to materials)
Attention: Be sure that the amount of characters is exactly the same!
Just rename the name of the .vmt to the one you want to have and if you want you can change the path to the .vmt.- Put your .vmt with the filename you have chosen into the path you have chosen. In this .vmt you can set the path of your VTF you want to use.
- Save your file.
If the .vmt file and the path are not seperated like in the image below, just do it like it's in your file (so the last one is the vmt and before there is the path). Example for this: vactube_128_straight_glass.mdl
What exactly have you done?
You used a mdl file of a existing model, changed it's material name and maybe it's path. Because there was no change of the modelname itself it uses all the other physical properties of the original model.I recommend to check the model in the SDK Modelviewer.
If the modelviewer crashes or any error is showing up, you or I made a mistake.Oh for everyone who know the original hex method with renaming the .mdl or all who know how to de- and recompile the model:
I know both methods by myself but my method here works with the fewest new files, without changing anything at the model (for example animations) and it's stable!Example where I did it:
Working Energy Balls + Clean models + InstancesOh and Omnicoder: The latest official version of the MDL Decompiler in Cannonfodders StudioCompiler can't decompile Portal 2 models.
Edit: Sorry Omnicoder, it was my mistake. I never noticed that I have to start StudioCompiler with Administrator Rights
Sorry for that.
There is another possibility where you don't have to de- and recompile the model.
Warning! Just use if it's not a prop_static casting shadows.
- Download the XVI32 Hex Editor.
- Extract just the .mdl file of the model you want to reskin from the VPK.
- Don't rename this .mdl file or the physical model won't work! Just put it into another directory, for example:
Steamsteamappscommonportal 2portal2modelsmyhexedmodels
If you put it into the same directory like the original, the original will override it. - Open XVI32 and load this .mdl file.
- At the right side you will see a lot of strange things. Just go to the bottom. The last 2 entries are for the textures (if the .mdl got just 1 skin!).
For example:Quote:ball_catcher_sheet modelsprops(for combine_ball_catcher.mdl).
- The italic part is the name of the used .vmt file (without .vmt) and the bold is the path (relative to materials)
Attention: Be sure that the amount of characters is exactly the same!
Just rename the name of the .vmt to the one you want to have and if you want you can change the path to the .vmt. - Put your .vmt with the filename you have chosen into the path you have chosen. In this .vmt you can set the path of your VTF you want to use.
- Save your file.
If the .vmt file and the path are not seperated like in the image below, just do it like it's in your file (so the last one is the vmt and before there is the path). Example for this: vactube_128_straight_glass.mdl

What exactly have you done?
You used a mdl file of a existing model, changed it's material name and maybe it's path. Because there was no change of the modelname itself it uses all the other physical properties of the original model.
I recommend to check the model in the SDK Modelviewer.
If the modelviewer crashes or any error is showing up, you or I made a mistake.
Oh for everyone who know the original hex method with renaming the .mdl or all who know how to de- and recompile the model:
I know both methods by myself but my method here works with the fewest new files, without changing anything at the model (for example animations) and it's stable!
Example where I did it:
Working Energy Balls + Clean models + Instances
Oh and Omnicoder: The latest official version of the MDL Decompiler in Cannonfodders StudioCompiler can't decompile Portal 2 models.
Edit: Sorry Omnicoder, it was my mistake. I never noticed that I have to start StudioCompiler with Administrator Rights
Sorry for that.
