Kitty Corp Meow Mix Forums

Help & Tutorials => Tutorials => Model Tutorials => Topic started by: Oizen on January 17, 2012, 01:25:14 AM

Title: How to import models from Valve's Source games.
Post by: Oizen on January 17, 2012, 01:25:14 AM

I've recently figured out how to port models from Valve's source games (Half Life, Team Fortress 2, Counter strike ect.) and a good deal of Garry's Mod model you can find. (http://www.garrysmod.org/downloads/)
Here's an example of a model I took out of Portal:
(http://i42.tinypic.com/2h6ga3m.jpg)

If you want an in-game shot check this out (http://kc-mm.com/oizenx/dragonborn/01-16-2012/)

Required tools:
3dsmax 2011
The SMD importer plugin. (http://www.chaosincarnate.net/cannonfodder/cftools.htm) The 2010 version works with 2011.
Steam (http://store.steampowered.com/)
A source game. I recommend Tf2, since its free. (http://www.tf2.com)
SourceSDK, you can download this with steam for free if you own one of Valve's major Source Games.
GFScape (http://nemesis.thewavelength.net/index.php?p=26) Only needed if you're ripping from a game yourself.
MDLdecompiler (http://www.chaosincarnate.net/cannonfodder/cftools.htm)
VTFEDIT (http://nemesis.thewavelength.net/index.php?c=178) for extracting materials.

Your favorite Hex editor.

Only read this part if you're extracting a model yourself
Sorry but you are not allowed to view spoiler contents.


next we'll need the textures, which are usually in a similar path, only in the materials folder, again export all of the files with a similar name to your model.

Sorry but you are not allowed to view spoiler contents.


[/spoiler]


This next step may already be done, but its important you check anyway.

Open your .mdl file in a hex editor and make sure the character I highlighted below is a ",". (Tf2 models are 0 by default)

Sorry but you are not allowed to view spoiler contents.



Open the mdldecompiler and input your model, and an output path, The model decomplier must be located in:
C:\Program Files (x86)\Steam\steamapps\*SteamUserName*\sourcesdk\bin\ep1\bin\ for it to work!

Sorry but you are not allowed to view spoiler contents.


Export your model, and open 3DSmax 2011, and import the ".smd" file the MDLDecompliler makes.

Sorry but you are not allowed to view spoiler contents.


Now for the textures,  Open the .vtf files with VTFedit, and go File > Export, and chose whatever image format you want. Occasionally, you have to fight with the settings on VTFedit to get the entire texture.

Sorry but you are not allowed to view spoiler contents.


Apply your texture in 3dsmax, export it as a .dae, and you're good to go.

Sorry but you are not allowed to view spoiler contents.


I'll do .bsp files (maps) some other time.
Title: Re: How to import models from Valve's Source games.
Post by: BriefCasey795 on January 18, 2012, 03:33:46 AM
oh sweet! now we can have tf2 imports! :D
Title: Re: How to import models from Valve's Source games.
Post by: Oizen on January 18, 2012, 05:00:05 AM
Quote from: Redpwnage795 on January 18, 2012, 03:33:46 AM
oh sweet! now we can have tf2 imports! :D

Indeed. I've also been experimenting with importing tf2 maps aswell.

But they're significantly larger in file size, the most promising right now is Watchtower.

Title: Re: How to import models from Valve's Source games.
Post by: BriefCasey795 on January 19, 2012, 03:01:57 AM
Yea we really need some tf2 stages to go with the tf2 hacks. 2fort looks like a cool place to brawl on. maybe you could brawl on the RED second floor and BLU second floor. Also, i hope someone can do a model import for heavy on ganondorf.
Title: Re: How to import models from Valve's Source games.
Post by: JBG on March 20, 2012, 08:38:49 PM
Here's a good question.

If you rip a model, is it already rigged?
Title: Re: How to import models from Valve's Source games.
Post by: BriefCasey795 on March 21, 2012, 12:47:38 AM
Most items only have one bone so basically, yeah. I also have a good question: how do you apply the textures? 3ds max or brawlbox?