- Apr 25, 2020
- 19
- 2
EDIT: I fixed it! If you export the texture as tga and import it with version 7.2, it works! I'll leave this online though if someone has the same problem. Also, to speed this progress up (would take quite a while to do this manually for 200 files), there is a neat tool: https://www.tophattwaffle.com/downloads/vtf-version-changer/
So I thought about making a Portal / Portal 2 themed map in Team Fortress 2 and while I wasn't planning to start already, I thought I'd get the textures into hammer today. I thought I could just extract them from Portal with GCFScape and put them into my TF2 materials folder, and while it worked with ten or so textures, it didn't work with over 200.
Of course, I looked at the VMT-files first. And I found out something pretty interesting: Some VMTs have LightmappedGeneric written in their first line, while others have LightMappedGeneric . Also, many have "%keywords" "portal 2 bts" written in them, but all the textures that work have "%keywords" portal . Replacing the lines with their supported variants makes the texture display white in the hammer texture browser, instead of the black-pink no-texture-texture. When putting it on a brush however, it is pink-black, and restarting hammer resets this and the 'fixed' textures are displayed as no-texture in the texture browser again.
So I'd understand if all of them didn't work, but some do, and some don't. Removing empty lines and "%noportal" 1 and this stuff also doesn't work, and while it is possible that I didn't left out important textures when extracting (I didn't extract every single one) and I don't understand all of the shader parameters, it just makes no sense to me that out of two identical VMT files with only different names and different basetextures one works and one doesn't.
Might also have something to do with the VTF, but I couldn't find anything wrong with them either. The selected flags are different, but changing them to those of a working texture doesn't have any effect either.
One more thing I realized just now while writing this: At least in every VTF I looked at the file version of the working textures is 7.2 or 7.3, and the version of those which don't work it is 7.5! Are the newer versions not supported by TF2? Can you change the version? Or could it be a different problem?
So I thought about making a Portal / Portal 2 themed map in Team Fortress 2 and while I wasn't planning to start already, I thought I'd get the textures into hammer today. I thought I could just extract them from Portal with GCFScape and put them into my TF2 materials folder, and while it worked with ten or so textures, it didn't work with over 200.
Of course, I looked at the VMT-files first. And I found out something pretty interesting: Some VMTs have LightmappedGeneric written in their first line, while others have LightMappedGeneric . Also, many have "%keywords" "portal 2 bts" written in them, but all the textures that work have "%keywords" portal . Replacing the lines with their supported variants makes the texture display white in the hammer texture browser, instead of the black-pink no-texture-texture. When putting it on a brush however, it is pink-black, and restarting hammer resets this and the 'fixed' textures are displayed as no-texture in the texture browser again.
So I'd understand if all of them didn't work, but some do, and some don't. Removing empty lines and "%noportal" 1 and this stuff also doesn't work, and while it is possible that I didn't left out important textures when extracting (I didn't extract every single one) and I don't understand all of the shader parameters, it just makes no sense to me that out of two identical VMT files with only different names and different basetextures one works and one doesn't.
Might also have something to do with the VTF, but I couldn't find anything wrong with them either. The selected flags are different, but changing them to those of a working texture doesn't have any effect either.
One more thing I realized just now while writing this: At least in every VTF I looked at the file version of the working textures is 7.2 or 7.3, and the version of those which don't work it is 7.5! Are the newer versions not supported by TF2? Can you change the version? Or could it be a different problem?
Last edited: