Hammer crash upon apply custom texture

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
So, first of all .. not quite new to mapping (or Hammer / WorldCraft in theory). But, haven't mapped before for Source games - only the older GoldSrc games (HL1, TFC and various mods).

I am running the version of Hammer installed with TF2 (i.e. in the C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin folder). I seem to recall reading somewhere that post-SteamPipe that version must be used?

I can create brushes and move them around, apply stock textures to them, etc. - all without any issues.

I have a number of custom textures loaded-up. Each has both the VTF and corresponding VMT file. Hammer does not seem to be having any issues finding the custom textures - in the sense that they show-up in Hammer's texture-browser without any problem.

However, as soon as I apply any of these custom textures to a brush - Hammer crashes. More specifically, Windows says it is "not responding".

I have tried this on two different machines (thinking maybe Hammer didn't like the graphics card or something) without any success.

I have also tried putting the custom textures in a number of places - without making any difference:
  • tf/materials/customtexturefolder
  • tf/custom/customfolder/materials/customtexturefolder
Neither seemed to make any difference.

So, I am kind of at a loss as to where to do next?

:cursing:
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
I've never heard of this issue in my life, but are you sure you saved the textures in VTF 1.3 format? Orange Box Source can only handle that version or lower, I think.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
I've never heard of this issue in my life, but are you sure you saved the textures in VTF 1.3 format? Orange Box Source can only handle that version or lower, I think.
You mean 7.3? If so, yes that's what I compiled to (7.3).
What's weird, is this isn't problem trying to compile or run the map in-game (no where near that far yet) it's just crashing Hammer when the 3d preview window tries to render them. If I leave Hammer's preview Window set to "wireframe", it doesn't crash (I think, will have to go back and re-verity), but of course doesn't show the texture either - which is kind of the whole point.
The textures show-up just fine in the selection list too.

Update: I take that back about wireframe, it crashes up application of the texture - irrespective of preview window mode.
 
Last edited:

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
PS: Here's a sub-set of the custom textures - it's pretty simple stuff ("fill glue" in this case) -- download link. That file includes the VTF's and the associated VMT's.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
PS: The textures were created as BMP, converted to TGA, then converted to VMT via VTFedit's "convert folder" function - which created both the VTF's and associated VMT's.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
Does Hammer only understand certain VMT formats? I mean like "RGBA8888" (which I used) -vs- "BGRA8888" -vs- "DXT5"? Again, the texture selection/browser shows the correctly - so not sure why anything else would have an issue. Just grasping at straws here.

Update: Re-compiled all my textures as BGR888 (for non-transparent textures) and BGRA8888 (for those with transparent parts). The thinking being that maybe I had messed that up. Unfortunately, that did not help - so obviously that was not the problem.
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Those would be VTF formats. The VTF is the image data. That aside...

I was kinda expecting complicated VMTs with some weird thing that choked up Hammer, but instead you have the most basic possible materials... so I have no idea. I would start thinking maybe it isn't your materials at all, but some other cause that those just happen to trigger.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
Those would be VTF formats. The VTF is the image data. That aside...

I was kinda expecting complicated VMTs with some weird thing that choked up Hammer, but instead you have the most basic possible materials... so I have no idea. I would start thinking maybe it isn't your materials at all, but some other cause that those just happen to trigger.
Yeah, I also tried DXT1/DTX5 and it was the same issue.
What's wierd, is that for the version of Hammer under the Team Fortress 2/bin folder, it is not as if there is much of anything to configure either - it is already pretty-much setup. So, it is not like a mis-configured anything.

I am just thinking at this point Hammer does not like my graphics card or something. I have tried on two different machines, both running Windows-7 - but one with "AMD Radeon HD 7450" card (which I game on regularly), and the other (a laptop) with the default built-in "Intel" graphics.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
I did some experimenting importing in VTFedit over and over changing one setting each time, looks like it had to do with the LOD settings. It is on the "Resources" tab of the import window. Your materials have the clamps set to 31, I looked at all my custom textures and about 10 random stock textures and all of them either had no LOD settings, or 9 (saw an 8 and a 5 too). I'm not entirely sure offhand what texture LOD does (it is separate/different from mipmaps), but given your textures are solid colors I'd assuming turning off LOD would be the best choice.

As an aside: VTF 7.4 works fine, that's what all my recent custom textures are made with the steampipe-era VTEX.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
protip: use $color 255 255 255 instead of $basetexture for textures that are solid colors. That way you don't even have to deal with vtfs
Most of the textures will definitely not be all solid colors - that's just what I resorted to in order to see WTF was going-on. But, thanks for the tip anyway!
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
[...] Your materials have the clamps set to 31, I looked at all my custom textures and about 10 random stock textures and all of them either had no LOD settings, or 9 (saw an 8 and a 5 too). I'm not entirely sure offhand what texture LOD does (it is separate/different from mipmaps), but given your textures are solid colors I'd assuming turning off LOD would be the best choice. [...]
Thanks! I try messing-around with the LOD settings ore removing it. I think those were either default values, or copied from a Valve FAQ on VTFedit.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
Thanks! I try messing-around with the LOD settings ore removing it. I think those were either default values, or copied from a Valve FAQ on VTFedit.
I re-created the VTF's & VMT's using VTFedit - this time leaving out the LOD settings (un-checked).

The good news: Now, when I apply the to a brush in Hammer - it no longer crashes.

The bad news: Now the faces on the brush show the notorious "black and purple checker-board" pattern in the 3d textured preview window - instead of the actual texture.

The textures still show fine in the browse/select tool, but in the 3d preview is shows that "black and purple checker-board" pattern instead of the actual texture.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
That means either your material file isn't pointing to the right spot, or you didn't restart Hammer since you compiled the new textures.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
That means either your material file isn't pointing to the right spot, or you didn't restart Hammer since you compiled the new textures.
Definitely have closed and re-opened Hammer. So, that's not it.
Regarding the paths in the VMT files, if the VTF and VMT are in the same folder, does the path need to be specified? - i.e. is the path always relative to the "materials" folder? or is it relative from the location of the VMT file?

I've been doing it like this:
  • VMT files are located in tf/materials/mycustomfolder/
  • VTF files are located in tf/materials/mycustomfolder/
  • Inside the VMT files, "$basetexture" it set to "mycustomfolder/whatevertexturename"

PS: I also tried this:
  • VMT files are located in tf/custom/customfoldername/materials/mycustomfolder/
  • VTF files are located in tf/custom/customfoldername/materials/mycustomfolder/
  • Inside the VMT files, "$basetexture" it set to "mycustomfolder/whatevertexturename"
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
the path always relative to the "materials" folder

  • VMT files are located in tf/custom/customfoldername/materials/mycustomfolder/
  • VTF files are located in tf/custom/customfoldername/materials/mycustomfolder/
  • Inside the VMT files, "$basetexture" it set to "mycustomfolder/whatevertexturename"

that.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
There's the problem. Don't put your custom textures and materials in /tf/custom/anything. Put them directly into /tf/materials/whateverfolder/. Hammer doesn't look in the /custom/ folder because it assumes that's meant for client-side mods and stuff, not assets for mapping.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
...what? no... I was telling him that IS what you do. That is what you are SUPPOSED to do. That's what I have done ever since steampipe landed and it works just fine. https://dl.dropboxusercontent.com/u/98931/pics/searchpaths.PNG
ALL of my personal content is in my snarkstuff folder. The root/raw folders are supposed to be only stock stuff. Though ultimately it does not matter where you put things. Root, download, custom... they are all read and used equally.
 

WeaselsLair

L1: Registered
Jul 11, 2014
30
3
Sorry guys, tried it both ways. Neither works for me currently (black and purple checker-board in the 3d textured preview).
 
Last edited: