Go Back   Steam Users' Forums > Steam Tool Discussions > Source Art & Sound Design

Reply
 
Thread Tools Display Modes
Old 09-03-2008, 03:49 PM   #1
FleshWound
 
Guest
Posts: n/a
Where to put new .vmt and .vtf files

I made some edits to existing textures of half-life 2, changing the color saturation and a couple of other things. I made a subtle name change and gave them all .vmts but now I'm not sure where to put them. Valve's developer wiki tells me to put them in my game/mod's materials folder. I tried putting them into Steam/Steamapps/myusername/Half-life 2 Episode 2/Ep2/materials as that is the game I'm using when running the SDK. They all show up in hammer but only as purple and black checkers. Am I doing something wrong? If necessary I can post up my textures and vmts but I based them off the texture's originals, just making name changes so they referenced the right file.

I'm going to start the level compiling to see if they will show up in game but even if it does I need to be able to view them in hammer so I can position them correctly

thanks guys,

Fleshwound
 
Reply With Quote
Old 09-03-2008, 03:50 PM   #2
FleshWound
 
Guest
Posts: n/a
ok in addition it looks like my textures only measure 64x64 instead of 512x512 in hammer even though they register as 512x512 when I open them in VTFedit. Anybody run into this problem before?
  Reply With Quote
Old 09-04-2008, 03:15 AM   #3
Varsity
 
Join Date: Jun 2004
Reputation: 489
Posts: 17,359
You've got the path to the texture file wrong in the material.
Varsity is offline   Reply With Quote
Old 09-04-2008, 11:11 AM   #4
FleshWound
 
Guest
Posts: n/a
Ok, I tried changing the file path in the vmt file but it doesn't seem to work. Here is what I did.

"LightmappedGeneric"
{
"$basetexture" "C:\Program Files (x86)\Steam\steamapps\myusername\half-life 2 episode two\ep2\materials\courtyard_template012a.vtf"
"$surfaceprop" "concrete"
}


I'm still getting the same problem. Am I supposed to put the texture and material into source materials.gcf? I haven't found a way to do anything but extract from those.
  Reply With Quote
Old 09-04-2008, 11:40 AM   #5
Craziestdan
 
 
 
Join Date: Feb 2008
Reputation: 16
Posts: 1,406
You never have to put the whole directory.
You only put the part after materials folder in all Source games. So for you, you would do this:

"LightmappedGeneric"
{
"$basetexture" "courtyard_template012a.vtf"
"$surfaceprop" "concrete"
}


Remember its always after the ep2/materials folder. Or for TF2, it would be tf/materials.

If i had a folder in my materials folder named 'crazy' and my materials were in there, my vmt would go like this:
"crazy/texturename"

Also, you don't need to put .vtf in the line.
Craziestdan is offline   Reply With Quote
Old 09-04-2008, 12:54 PM   #6
FleshWound
 
Guest
Posts: n/a
Awesome, thanks, still pretty new to doing a lot of this stuff.

I'm having problem with the more complicated custom textures. It seems when I run the game the textures with windows just turn into checker patterns while the textures without windows work.

Here's the material file for one of the windowed materials, is the problem here or with the texture?

"LightmappedGeneric"
{
"$basetexture" "courtyard_template012c"
"$surfaceprop" "concrete"
"$envmap" "env_cubemap"
"$basealphaenvmapmask" 1
"$envmapcontrast" 1
"$envmapsaturation" 1
"$envmaptint" "[ .75 .75 .75]"
"LightmappedGeneric_DX8"
{
"$envmaptint" "[.25 .25 .25]"
}
}

Last edited by FleshWound: 09-04-2008 at 02:31 PM.
  Reply With Quote
Old 09-04-2008, 08:15 PM   #7
Sodabus
 
Join Date: May 2007
Reputation: 0
Posts: 113
Code:
"$basetexture" "courtyard_template012c"
That material is looking for "<game>\materials\courtyard_template012c.vtf"

If the VTF file isn't there, the checkerboard texture appears.
Sodabus is offline   Reply With Quote
Old 09-05-2008, 12:24 PM   #8
FleshWound
 
Guest
Posts: n/a
I got it all to work, turns out it was an issue with something I did to the texture in photoshop that messed up the alpha channel.
  Reply With Quote
Old 09-08-2008, 09:53 AM   #9
huge sesh
 
Guest
Posts: n/a
Quote:
Originally Posted by FleshWound View Post
I got it all to work, turns out it was an issue with something I did to the texture in photoshop that messed up the alpha channel.
what exactly did you do? I'm having kind of the same problem myself right now: console gives me an error about being unable to read the file though i'm pretty sure i've got the directory structure down right.
  Reply With Quote
Old 09-08-2008, 03:24 PM   #10
FleshWound
 
Guest
Posts: n/a
I'm still not convinced I've got it all to work out, my texture artist made a change in the way he was copying over and saving everything from the original textures to the new ones we were making in photoshop and somehow they worked, but only when I had VTFedit write the textures their own VMTs, which for some reason are set up by vtfedit to be transparent. I tried changing the VMTs back to look like the texture's original counterpart, except for the name change, and now the texture is doing that black and purple checker routine in-game, even though its viewable inside hammer.

Sometime later today or tomorrow we're going to try doing some more textures in different ways and see which ones wind up working.
  Reply With Quote
Old 09-09-2008, 02:09 PM   #11
huge sesh
 
Guest
Posts: n/a
I think that vtfedit checks the targa for any pixels with an alpha value (which may not be immediately apparent, try view->channel->A in vtfedit). if it finds any it adds "$translucent" "1" to the vmt. i think.

anyways, I just got my textures working. I was using this vtex command (from my materialsrc directory):
Code:
vtex.exe -shader LightmappedGeneric -vmtparam $translucent 1 -vmtparam $surfaceprop flesh stand_0_000.tga
and it would generate a vmt and vtf that would load in hammer just fine but error out with "could not read file" in the game. simply loading the tga in vtfedit and outputting though that works--even with transparency.

so i guess vtex is at fault? i guess they are right when they tell you in the sdk wiki to use the third-party tools.
  Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Art & Sound Design


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Team Fortress 2: Overriding .VTF files? mikesmullin Source Art & Sound Design 2 01-22-2008 10:10 PM


All times are GMT -7. The time now is 11:39 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.