Issue with importing materials/models


I have a question about importing materials/models and so forth from other games into Portal 2.
I’m using GCFScape, which has been working for materials, but not models.

All the models I’m importing from (cs:s, hl2, l4d) have been placed in the materials/models folder but they don’t seem to show up in Hammer, so is there another path this needs to be directed to?

Another issue I have is lets say you want to import all the materials from each of these games: cs:s, hl2, l4d all into the portal2/materials folder. For example, hl2 will import something named background01.vmt, alright. The problem is, cs:s also has a file named EXACTLY that and because of that, it will overwrite previous files of the same name. Will this cause complications?

What’s the workaround?

Models go into the game\models\ folder not the

[editline]20th January 2014[/editline]

Some complications can arise when overriding materials from different games. you have to find out for yourself.

Is there a way to separate the materials from each game, without overwriting?

It’s really kind of hard to differentiate textures from each other in the editor. Like, once you import all these games, how do you know which one is Portal 2 anymore? Lol.

Some materials have keyvalues in the vmt.
Usually like %keyvalue portal

Check. some have it, some dont.

By the way, do you happen to know where valve stored the .vmt files for hl2?

I’ve got the .vtf files from the obvious hl2 folder, but the .vmt’s have just…disappeared.

EDIT: Btw, Portal 2 doesn’t have a models folder for some unknown reason. I’m under common/portal 2/portal2. It might be under common/portal 2/platform/Models/editor, as far as I can tell.

Its in pak_dir.vpk


can’t find a file named pak_dir.vpk on my computer. what folder is it under? hl2_pak_dir.vpk is only listing a bunch of nonsense. no materials.


oh alright. it’s under misc.

after trying 1000 times, how the hell did i miss this file?

also, can you redirect me to where the models folder for portal 2 is? like i mentioned above, i don’t have one listed in the actual game directory.

sorry for sounding like a noob but really, i just need to get past these steps and they’ve seriously been haunting me all day. thanks for the help, though.

Valve added a special folder to CSS/TF2/DOD/2013 called Custom. You can find this folder in steam/steamapps/common/gamename/gamename/.

The custom folder is basically a way to quickly mount content while keeping it sorted. It functions in a similar way as the common/gamename/ folder, inside of it you need to make a folder (it can be named whatever you want) then inside of it you would put your material and models folders and from there you would put your custom content like normal.

Here’s Valves readme on it:

This folder is automatically scanned when the game boots for VPK files or
subfolders.  Each subfolder or VPK is added as a search path, so the files
inside those VPK's or subfolders will overide the default game files.

See gameinfo.txt for more details.

For example, you might have the following file structure:

	cstrike/custom/my_custom_stuff/   <<< This subfolder will be added as a search path
	cstrike/custom/some_mod.vpk       <<< This VPK will be added as a search path
	cstrike/custom/another_mod.vpk    <<< This VPK will be added as a search path

Mounting a VPK to the filesystem is more efficient that adding a subfolder,
because each time the engine neds to open a file, it will need to make a call to the
operating system call to search the folder.  VPKs can be searched by the engine much
more efficiently.  Each subfolder is a new search path that must be checked each
time the engine tries to open a file.  So for optimal load times, always use VPK files
and don't make any subfolders in this folder!

Note that the following directory structure is NOT correct:


That will add the directory "cstrike/custom/models" as a search path, in which case the
file my_model.mdl actually exists at the root of the game's virtual filesystem.

This won’t prevent overwriting but it is extremely useful in keeping game content apart.