3D Model: How to extract

Avatar
Pamaxxx
3 Posts
Posted Sep 08, 2012
Good evening, I have long sought a way to extract the models from Portal 2, in particular: the turrets, the cube and the portal gun. Not only to play, but to use them with Pepakura and print them with the 3D printer. I also looked in the forum, but I could not find a guide to help me. Someone can help me, treating me like an idiot incapable ? Step by step. Thank to all.
Advertisement
Registered users don't see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Sep 08, 2012
Replied 56 minutes later
  1. Portal2 models are into the packed file pak01_dir.vpk located into Portal2/Portal2 folder.
  2. You should install GCFScape in order to access .vpk files
  3. Open pak01_dir.vpk and go to models folder. And the following are the locations of your desired models:

  4. models/props/metal_box.mdl (for the prop_weighted_cube)

  5. models/props/portal_door.mdl (for the prop_testchamber_door)

  6. models/npcs/turret/turret.mdl (for the turrets)

Avatar
FelixGriffin
2,680 Posts
Posted Sep 08, 2012
Replied 3 minutes later
You have a 3D printer? That's awesome!

To extract a model, you'll first need to get it out of the VPK using GCFScape. Go to your Steam directory /steamapps/common/portal 2/portal2/ (or _dlc1, or _dlc2 depending on what you want), and open pak01_dir.vpk with GCFScape.

Go to root/models/ and look for the one you want. For a cube it would be (iirc) props/metal_box.mdl, plus the .phy, .vtx, and .vvd files. A turret would use /npcs/turret/turret.mdl or something like that.

Then you need the materials, in the VPK in root/materials/models/(usually the same path).

Once you have all of those, you can feed them into MDLDecompiler, and it should get you a pretty good reference.smd file. That's really the one you want - you can import it into Blender, then export it into whatever other format you need.

The big problem with the decompiler is that it screws up animations, so don't try to use any of the other files. They usually won't work. That means you won't get a turret that can open and close its "wings" unless you animate it yourself.

If you do print anything, I'd like to see it! Remember that most models have several "skins", such as the cube having normal, rusted, companion, blue gel, orange gel, etc.

Avatar
Pamaxxx
3 Posts
Posted Sep 09, 2012
Replied 19 hours later
It Works!!!!!!!!!! Thank you! I'll post some images next time!
Avatar
Pamaxxx
3 Posts
Posted Sep 09, 2012
Replied 3 hours later
No f*** I got some other problems: compiling the turret or the cube I can't get a file to use in blender... And the portal gun exits broken.
Advertisement
Registered users don't see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Sep 10, 2012
Replied 16 hours later

Pamaxxx wrote:
No f*** I got some other problems: compiling the turret or the cube I can't get a file to use in blender.

what kind of file do you need? Have you decompiled the .mdl file to get the .smd that Felix suggested?