Please or Register to create posts and topics.

Modding Portal 2 Models

I'm looking for a way to decompile Portal 2 models. Specifically, I'm looking to add a few skins to some of them.

Particularly I'd like to add new skins for some of the various light models so they have a "turned off" skin.

I'm aware of MDL Decompiler and StudioCompiler, but neither semm to be currently working with Portal 2 models. Any ideas?

And my inner computer programmer (wait, is it really inner when I do that for a living?) discovered that the file format for MDL is fairly well documented and I might be able to write a utility to do just that.

Hmmm...

You know, if only I didn't have all these side projects related to mapping and could actually map. :-p

to make new skins you dont have to decompile the models just search for their materials and edit them

Adding skins is really simple, like naitoookami said you just Decompile them and then add a new skin when you recompile it. I'm not sure if the tools have been updated for Portal 2 (there is usually some sort of format change between game versions), but I don't know for sure.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
naitoookami wrote:
to make new skins you dont have to decompile the models just search for their materials and edit them

I didn't want to replace the original skins. I wanted to create an altered version of the model that adds more skins on top of the original ones.

msleeper wrote:
Adding skins is really simple, like naitoookami said you just Decompile them and then add a new skin when you recompile it. I'm not sure if the tools have been updated for Portal 2 (there is usually some sort of format change between game versions), but I don't know for sure.

The whole problem is I haven't managed to successfully decompile any Portal2 models in the first place.

I have, however, managed to successfully (using the program I'm writing) insert 300 bytes or so into the middle of a model file and have the model still (mostly) load in model viewer after patching up various things. The goal here is to be able to take an existing model, add a few textures to its catalog, and then add a few skins using the new textures. This requires increasing the size of various structures in the file and relocating them -- not easy, but fortunately the MDL format is fairly well documented.

You're reinventing the wheel. Just wait for the decompile/recompile tools to get updated and released and this operation will literally take 2 seconds.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

the .mdl format is very easy, its been used for over a decade in thousands of the best selling games ever by now and there are tons of tools and turorials for it.

how hard cann you fail?

ok didnt know you wanted an entirely different model all ya gotta do is edit the texture then hex the model you can look up model hexing on google