Error creating new textures Created 17 years ago2006-06-23 22:36:11 UTC by RotatorSplint RotatorSplint

Created 17 years ago2006-06-23 22:36:11 UTC by RotatorSplint RotatorSplint

Posted 17 years ago2006-06-23 22:36:11 UTC Post #186637
I was folliwing the Source tutorial on how to import my own textures into Hammer (The tutorial may be found in the "Intermediate" section) and i get to the part where i drag-and-drop the TGA file onto the shortcut of VTEX. The problem arises when i get this error:
"Image demensions must be a power of 2!
Error Initializing texture C:/ etc. (the directory writen leads to the "sourcesdk_content/hl2mp folder, not the other one)"
Is the problem simply that it has issues with the demensions of the texture, and if so, what demensions should it be??
Posted 17 years ago2006-06-23 22:44:52 UTC Post #186640
powers of 2. Ex: 128, 256, 512, 1024. IN any combination

AS for the directory, place them in the sourcesdk folder under materialsrc of the mod of your choice. Create the folder for them to be stored in the sourcesdk folder, and one in your Steam/steamapps/RotatorSplint/counterstrikesource/cstrike/materials/yourtexturefoldername/texture.vtf

Oh, and before compiling with vtex, open source sdk and change the mod to the one you want the texture to go to.
Posted 17 years ago2006-06-24 00:04:06 UTC Post #186645
So when it says "powers of two, i has to be 128 x 128, 256 x 256... etc.?

when you say "texture.vtf", is that the actual texture? and is that what comes out of vtex? I dont wana make a folder with that name when i dont need to :P (especially when it could mess up the program :biggrin: )

And im guessing that the mod that the texture will go to is the drop-down menu at the bottom of the SDK menu "Current Game:"?
Posted 17 years ago2006-06-24 06:29:20 UTC Post #186671
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 etc (power of 2) the best size texture to use (make) is 512x512 I'm pretty sure... Most of the textures for Half-Life 2 is 512x512 and I think it's for the best quality.
Habboi HabboiSticky White Love Glue
Posted 17 years ago2006-06-24 15:08:50 UTC Post #186724
It does not have to be square. IT can be 1024 by 512, or 128 by 256, etc.

.vtf files are the result of a targa being compiled with vtex. I suggest downloading the photoshop plugin that lets you save and edit existing or new .vtf files. If you have it you have no need for vtex. You just create the texture and save it as .vtf in photoshop. It really is excellent for advanced texture techniques when you get more experienced.

Yes, current game drop down menu is the proper place. :)

All your questions are answered in the tutorial here for custom materials.

Good luck :)
Posted 17 years ago2006-06-24 15:54:34 UTC Post #186736
lol, i create(d) my textures using paint XD, import them to IrfanView, save em as Targas, then drop em onto the vtex shortcut, w/ no errors.

However, when i transfer the .vtf to the hl2dm folder (half-life2 death match/hl2mp/materials/MyTexes AND the notepad document (MyTex.vtf), open hammer and look 4 the texture in the browser, it doesnt appear :
Posted 17 years ago2006-06-24 16:04:33 UTC Post #186740
Hm well did you read my guide in my journal?
YAY I got custom textures to finally work in HL2 etc:
I misread the guide at the end where it sayd convert to .vmt so thats why it didn't work :S
I explained this to another guy and I wrote this as to how to do it!

get your .jpg, use irfra to convert it to .tga, make a folder called mytexes in this place
C:Program FilesValveSteamSteamAppshabboicounte
r-strike sourcecstrikematerialsmytexes
and here as well:
C:Program FilesValveSteamSteamAppshabboisource
sdk_contentcstrikematerialsrcmytexes

ok now you have the .tga so right click vtex.exe and send it to desktop, now open up the place where the .tga is and drag it onto the desktop as well.
then again drag it onto vtex.exe and a black box should appear, if successful it will say something like:
input, output directory blah blah and then press any key to continue
you should end up with a .vtf in the folder called mytexes and also an empty .txt
open up the .txt and write:
"LightmappedGeneric"
{ "$basetexture" "yourfoldername/yourtexname" }
(exactly as I have written it but in place of folder name put mytexes and your texname put fence1.
ok nearly done, save as and rename it
to fence1.vmt and copy this new .vmt to the two folder called mytexes in the css materials folder and the sdk one as well!
Ok thats basically it so start hammer, go to browser and type the name of the texture and if it comes up then you are successful!
Make a quick map and it should hopefully work!
Thats it and I found it very useful
Anyway maybe your windows is set not to convert to vmt etc...Hunter and others had this problem:

Use this:

http://img357.imageshack.us/img357/3103/extensions0ls.png

(Credits to Seventh)
Habboi HabboiSticky White Love Glue
Posted 17 years ago2006-06-24 17:08:19 UTC Post #186747
Is your vmt file properly done? 9 times out of 10 in errors its either wrong image dimensions, wrong file type, or improper .vmt.

Here is the proper vmt for a basic texture:

"LightmappedGeneric"

{ "$basetexture" "mikematerials/cliffy"
"$surfaceprop" "rock"

}

Mikematerials is the folder name. cliffy is the vtf name.
surfaceprop is the attributes a material has.

This a proper .vmt file for a Generic basic texture.
Posted 17 years ago2006-06-24 19:53:13 UTC Post #186755
: i followed the quote and link, Habboi, and altered my .vmt file to include the ""$surfaceprop" "rock"", xyos, and added this .vmt to the halflife2 deathmatch folder (in the specified directory), the SDK directory (also in the specified directory) and the SDK_content folder (also ALSO in the specified directory), just to make sure i wasnt missing any folder areas ( :) ) and it still doesnt show up in the browser... i cant figure it out :|
Posted 17 years ago2006-06-24 20:16:14 UTC Post #186757
did you open up source sdk, set game to hl2dm and load hammer?
anyway, i recommend VTFEdit.
yow
1) import image and save to vtf
2) save to your specified directory e.g. steamapps/username/hl2dm/materials
3) go to tools -> create vmt file
4) if not already in there, browse for the vtf file you just made in the 'base texture 1' textbox
5) click create and save to the same directory as the vtf.
6) close vmt window and done!
Penguinboy PenguinboyHaha, I died again!
Posted 17 years ago2006-06-24 21:30:38 UTC Post #186762
WHen you create the .vmt file save the text file as type: all files, and "texturename.vmt" (EXACTLY with the quotes!)

IT should now have the same name as your vmt file.

Ill go over the steps easily. Check if you did all of them

1. Create texture in powers of 2 as a targa file. (BTW when I say HL2 here, just replace that with mod of your choice. MAKE SURE TO SET SDK to mod before compiling with vtex)

2. Save targa in : Steam/steamapps/RotaterSplint/sourcesdkcontent/materialsrc/yourtexturefoldername/

Lets relpace "yourtexturefoldername with ytfm, ok :)

3. Create the same folder with ytfm in your : Steam/steamapps/RotaterSplint/halflife2/hl2/materials/------PLACE ytfm HERE!

4. Back to your sourcesdk ytfm folder. Drag the tga file in ytfm into vtex. IT will drop the vtf here: Steam/steamapps/RotaterSplint/halflife2/hl2/materials/ytfm

5. Now go there. Create a text file. Save it as I told you above. Place the script I posted earlier. Here is what the script should be:

"LightmappedGeneric"

{ "$basetexture" "ytfm/texturename"
"$surfaceprop" "WHATEVER YOU WANT!"

}

6. Ok now. Everything is in order. Open sdk with the mod and its there. THis is all you do. Just make sure to review and carefully follow the directions I gave.
Posted 17 years ago2006-06-25 07:35:00 UTC Post #186806
Even so you can put textures in HL2DM folders and they still show up in HL2 etc...
Habboi HabboiSticky White Love Glue
Posted 17 years ago2006-06-25 14:58:28 UTC Post #186841
TYVM Xyos!!!!! it works now: i guess i misread the tut: i was putting the folder in the sourceSDK directory, not the SDK_content directory, but i fixed that, it it works now!!! TY :P
Posted 17 years ago2006-06-25 15:08:05 UTC Post #186842
Your welcome :)

BTW, when you get more familiar with custom materials check here later on. Im almost finished with my tutorial here on all the advanced attributes of materials. (normal mapping, reflectiveness, reflective masks, reflective masks applied to normal maps) They really add great effects to materials once you get the hang of it.
Posted 17 years ago2006-06-25 15:13:55 UTC Post #186843
ok, but i just discovered a BIG problem :) :
I can see my texture in the browser in Hammer, however when i apply it, the brush that it's applied to becomes transparent. When i run the level in game, its white, and when i get close to it and look directly at it (my cursor over it) it doesnt refresh the immage (like, there is a constant shadow of everything between the player and the brush) WHats goin on here?? :nuts:
Posted 17 years ago2006-06-25 15:18:52 UTC Post #186844
POst a screenie. THat sounds like either improper vmt file, or your actual targa you created was bad. DId you use multiple layers when making it? DId you merge them before compiling it with vtex?

Its probably a .vmt error. Post your vmt information.
Posted 17 years ago2006-06-25 15:40:11 UTC Post #186845
http://i79.photobucket.com/albums/j152/RotatorSplint/fromadistance.jpg
http://i79.photobucket.com/albums/j152/RotatorSplint/Upclose.jpg
http://i79.photobucket.com/albums/j152/RotatorSplint/inhammer.jpg

There are three images i took of the problematic brush, here are my .vmt specs:
{ "$basetexture" "MyBeginningLevelTexes/Shooting_Range_Target1"
"$surfaceprop" "Rock"

}

I created the image using paint (yeah... im cheap), loaded it into IrfanView, and saved it as a Targa, then followed your steps
Posted 17 years ago2006-06-25 18:12:55 UTC Post #186863
Take a look here at my example .vmt again:

"LightmappedGeneric"

{ "$basetexture" "mikematerials/cliffy"
"$surfaceprop" "rock"

}

I believe you forgot the "LightmappedGeneric"
Posted 17 years ago2006-06-25 19:18:27 UTC Post #186865
Ahh.... you are right. I had "LightmappedGeneric" in the SDK_content folder's .vmt, but not the Half-life2 dm folder's .vmt, but it works beautifuly now.

Just a few quick questions so i dont screw myself up again:
A) when creating new textures, will i need to also include the vmt for each individual texture? or do i just add to that vmt?
B) for future textures, do i continue to add the .vtfs and .vmt(s) to these same directories?
C) in the .vmt, what allowed words are there to alter the surface effects. are "rock" and "metal" the only ones allowed?
Posted 17 years ago2006-06-25 19:42:36 UTC Post #186867
First off, you dont need to create a .vmt file in your sourcesdk folder. After it compiles the targa and places it in the game directory then you just place the one in the game directory material folder.

Each texture requires its own .vmt.

You can place other new textures you make in your folder you created. it will compile them and place them in the folder you created. A new folder is not required for each texture. You just have to alter the vmt for the new texture.

You can compile all textures to the HL2 directory, then drag and drop the files into another mod of your choice. Or just replace HL2 with your mod choice based on the tutorial I gave.

THe other surfaceprop types are listed here:

http://developer.valvesoftware.com/wiki/Material_surface_properties
Posted 17 years ago2006-06-25 20:12:16 UTC Post #186877
ahh... i c, yeah, the tut confused me (its a pretty intracate tut :P) so i decided to play it safe, and make the folders in the sourceSDK folder, SDK_content, AND Hl2DM, just to be safe.

thanks a bunch for the info and the link (i coppied it to a notepad document for future reference). I definitely need to get a better program for texture creation :D here's a screenie of the target i made:
http://i79.photobucket.com/albums/j152/RotatorSplint/myawesometargets.jpg
Posted 17 years ago2006-06-25 20:14:52 UTC Post #186879
Why not just add it to the favorites? :)

Some texture tips:

Use a digital camera to take pics of things in RL and transfer them to the computer. Use a photo editing/image editing program to edit out the shadows, add detail, etc.

Good luck :)
Posted 17 years ago2006-06-25 20:51:29 UTC Post #186883
good ideas Xyos :P although the digital cam i have is over 4 years old and has practicaly 2 DPI :D

ill look into PaintShop Pro tho.
You must be logged in to post a response.