Using Nemesis' VTF Plugin

Tutorial collection, comprehensive listings on main site.

Using Nemesis' VTF Plugin

Postby Tutorial on Sun Jan 29, 2006 12:01 am

category
Texture Creation

description
A nice easy look at using a GUI tool to create textures.

keywords
use, using, nemesis, plugin, plug, vtf, texture, textures.

When source came out I wrote a tutorial explaining how to create materials, but things changed and that method is now obsolete.
This tutorial will explain a easier and faster way of doing this.
Note: This method only works with Photoshop

1. Things you need:
- Nemesis VTF Plugin (clicky)
- Photoshop 6.0 and up
- Notepad

2. Setting up the plugin:
Once you downloaded the zip file, you need to extract it to a temporary folder. You will now find a dll file and a 8bi file, as well as a readme explaining how to install. In case you'r to lazy to read it you should first close photoshop, then put the dll file in the Photoshop root folder(ex: C:\Programs\Adobe\Photoshop 7.0), and the 8bi in the Plug-Ins\File Formats folder (ex: C:\Programs\Adobe\Photoshop 7.0\Plug-Ins\File Formats).

3. Working with the plugin:
Now the first thing you need to do is obviouslly open photoshop and your texture file.
Once you have it open it's as simple as doing File>Save As..>VTF

Image
Save As.. window showing the VTF extension

If the extensions doesn't show up in the list then you didn't installed the plugin properlly. Also please be careful that photoshop automatically renames the file to copy, so delete that part before saving.
Now while using this plugin you don't need to have Steam open, neither to save it in any SDK folder(for now), so feel free to save the file everywhere you want.
After you press save, a box with several options will show up:

Image
VTF Plugin Options window

The first thing you should do is to open the Template drop down menu and select the one that fits the kind of material you want to do. For a regular texture you should use Generic(default). Now it's also a good idea to change the Sharpen filter field to none, since this would change the way our texture looks, and I at least prefer them to look the way i made them.
Now the other settings you can leave in default, you should only change them if you know what you'r doing, and what they do.
Press OK and you now have the VTF of your texture.

5. Make the texture usable in hammer/game:
To make you'r texture work you need to go to the materials folder of the mod/game you'r working on(ex: C:\valve\steam\steamapps\steamlogin\counter-strike source\cstrike\materials) and create a new folder in there(ex: C:\valve\steam\steamapps\steamlogin\counter-strike source\cstrike\materials\my_textures). Now copy the VTF file you jsut created to this new folder.
The way the source material system works is using two files to define a materials. The first is the VTF(wich you just created) wich is the image itself, and the second is the VMT wich has all the information that make the texture a material, like shaders, surface properties, animations, reflections, etc..
Now to create the VMT read the next step

6. Creating the VMT:
To create the VMT you only need notepad. So open it up(Start>Run>notepad) and write the following:

Code: Select all
"LightmappedGeneric"
{
 
}


What this does is to define wich shader we are using, there are several shaders, but this is the standard one wich you should use most of the times.
Next thing to do is to indicate where our material is. To do that we add the following:

Code: Select all
"LightmappedGeneric"
{
    "$basetexture" "folder/name"
}


You just need to replace "Folder" with the name of the new folder you created inside the materials folder, and "Name" with the name of your material(without any extension), so basically this would be the relative path to our material.

Last thing to do, to create a standard material, is to define the properties of our surface, to do this we write the following:

Code: Select all
"LightmappedGeneric"
{
    "$basetexture" "folder/name"
    "$surfaceprop" "metal"
}


You can replace metal with the type of surface that fits your material better, here is a list(this is a old list some may not work anymore, or there might be some new ones) of some of the surface properties avaiable:

CONCRETE/ROCK TYPES:
baserock
boulder
brick
concrete
concrete_block
gravel
rock

LIQUID TYPES:
slime
water
wade

METAL TYPES:
chain
chainlink
metal
metalbox
metalgrate
metalpanel
metalvent
slipperymetal
solidmetal

MISC TYPES:
computer
default
glass
ladder

ORGANIC TYPES:
alienflesh
bloodyflesh
flesh
watermelon

SNOW TYPES:
ice
snow

TERRAIN TYPES:
antlionsand
quicksand
dirt
mud
slipperyslime
grass
tile
gravel

WOOD TYPES:
wood
woodbox
woodcrate
wood_furniture
wood_lowdensity
wood_plank
wood_panel
wood_solid


Now once you have your VMT ready, go to File>Save As.. change the "Save as type" to All Fyles, and in the name write the exact name you used for the VTF but add the .vmt extension to the end(ex: If my VTF was name my_texture, I would write my_texture.vmt in the name), and save it in the new folder you created inside the materials folder, that has the vtf in it.

And that is it, if you followed every step correctlly he material should show up in hammer texture explorer, and later ingame also.

Reference Sites:
- Valve Wiki
- Nemesis @ Wavelenght
- Adobe

-BK-
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Prowl on Sun Jan 29, 2006 2:23 am

I've had trouble getting model skins to showup using this plugin, any advice on settings?
User avatar
Prowl
Regular
Regular
 
Joined: Fri Sep 02, 2005 7:45 pm

Postby slayera on Sun Jan 29, 2006 2:54 am

Prowl wrote:I've had trouble getting model skins to showup using this plugin, any advice on settings?


Instead of "LightmappedGeneric" you need to use "VertexLitGeneric"
Image


"When one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." -Robert Pirsig
User avatar
slayera
Veteran
Veteran
 
Joined: Wed Dec 08, 2004 3:15 am
Location: Near the world's only super volcano.

Postby BaRRaKID on Mon Jan 30, 2006 7:39 pm

i knew this question would show up :P lo0l should had mentioned in the tut
I've no sign
BaRRaKID
Veteran
Veteran
 
Joined: Sun Oct 10, 2004 1:46 pm
Location: PORTUGAL!!!

Postby Jest@ on Tue Jan 31, 2006 8:06 pm

slayera wrote:
Prowl wrote:I've had trouble getting model skins to showup using this plugin, any advice on settings?


Instead of "LightmappedGeneric" you need to use "VertexLitGeneric"


and also put "$model" 1 in the VMT if you havent already.


Nem's VTF plugin is a godsend, and combined with the power of Photoshop Actions, you can't go wrong. I might knock up a little tut on that actually...
Highlight to read:
It was earth all along
User avatar
Jest@
Veteran
Veteran
 
Joined: Mon Nov 22, 2004 1:50 am
Location: London UK

Postby Ripper_hugme on Wed Feb 15, 2006 10:12 am

how come my textures have the pink and black square texture?
Barely working on (I'm still very busy with real life):
cp_yettobenamed (Updated... Sort of)
dm_agoge (Beta 2 out now)
User avatar
Ripper_hugme
Veteran
Veteran
 
Joined: Tue Apr 12, 2005 9:01 am
Location: Australia: Now a Major Motion Picture!

Postby BaRRaKID on Wed Feb 15, 2006 12:25 pm

your vmt is wrong probablly, or you save the the files in the wrong directory.
Both the vmt and the vtf must be in the moddir/materials/yourfolder (in wich moddir is the base directory of the mod you'r mapping for, and yourfolder is the name of the folder with your textures)
I've no sign
BaRRaKID
Veteran
Veteran
 
Joined: Sun Oct 10, 2004 1:46 pm
Location: PORTUGAL!!!

Postby Ripper_hugme on Wed Feb 15, 2006 9:10 pm

I use VTFedit to write my VMTs. is that a problem?

and ther'ye for Hl2 DM
Barely working on (I'm still very busy with real life):
cp_yettobenamed (Updated... Sort of)
dm_agoge (Beta 2 out now)
User avatar
Ripper_hugme
Veteran
Veteran
 
Joined: Tue Apr 12, 2005 9:01 am
Location: Australia: Now a Major Motion Picture!

Postby BaRRaKID on Fri Apr 07, 2006 7:18 pm

Just found out that this method encreases the file size 4 times comparing to the default method of compiling textures, so be carefull when using it :)
I've no sign
BaRRaKID
Veteran
Veteran
 
Joined: Sun Oct 10, 2004 1:46 pm
Location: PORTUGAL!!!

Problems >.>

Postby [TR]Ogaw on Sat Sep 09, 2006 6:17 pm

I've been trying forever to get my skin to work but it wont. I just wanted to do a simple reskin of the vending machine 'sodamachine01a' featured various times in the game. The Dr>Breens mineral water crap just needed to go. The problem is: even following this tutorial creating the .vmt which I didn't have before, the skin still will not show up in game or in Hammer. Well, it shows up in Hammer in the little preview window for textures and stuff, but the texture never actually appears on the vending machine in the 3D camera view for Hammer or ingame. I'm creating a mod fo HL2 deathmatch. This is my folder setup for the skin:
steamapps/sourcemods/boxwarz/materials/sodamachine01a/sodamachine01a.vtf
the modified vmt is also featured in this folder. Can anyone tell me wat i'm doing wrong or what I haven't done? Would be greatly appreciated.
Yawn.
[TR]Ogaw
Member
Member
 
Joined: Sat Sep 09, 2006 6:11 pm
Location: CANADA!

Postby Hona on Sat Sep 09, 2006 6:57 pm

Are you sure you are using the same folder names when you remade the texture, also the same texturename? The model needs to find its textures and if you are placing them somewhere else or using a different name it won't work.
Lev ditt liv som en helg
Hona
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jan 08, 2006 7:15 pm
Location: Sweden

Postby [TR]Ogaw on Sat Sep 09, 2006 7:02 pm

yes the name is exactly SodaMachine01a.vtf and the folders, .vmt file and all the rest are all the same name as that.
Yawn.
[TR]Ogaw
Member
Member
 
Joined: Sat Sep 09, 2006 6:11 pm
Location: CANADA!

Postby Hona on Sat Sep 09, 2006 7:11 pm

Your model needs to be in this directory:

models/props_interiors/vendingmachinesoda01a.mdl

I can't find texture directory for it, try with:

materials/models/props_interiors/vendingmachinesoda01a

All of these directories goes into your mod folder.

Edit: Where did you find the texture, where you found it needs to be the same folders in your mod.
Lev ditt liv som en helg
Hona
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jan 08, 2006 7:15 pm
Location: Sweden

Postby [TR]Ogaw on Sat Sep 09, 2006 10:43 pm

hold on a second. I didn't modify the model at all, does it still belong in my mod folder? All I did was convert the .vtf into a .tga, modify the .tga in Fireworks 8 and reconvert the .tga back into a .vtf and I put the vtf in materials/SodaMachine01a I'll fix the folder path and I hope that does it.

Edit: Changed the materials path for the SodaMachine01a to the path that you specified above and no difference, I still get the default HL2 model...
Yawn.
[TR]Ogaw
Member
Member
 
Joined: Sat Sep 09, 2006 6:11 pm
Location: CANADA!

Postby Hona on Sat Sep 09, 2006 10:59 pm

[TR]Ogaw wrote:hold on a second. I didn't modify the model at all, does it still belong in my mod folder? All I did was convert the .vtf into a .tga, modify the .tga in Fireworks 8 and reconvert the .tga back into a .vtf and I put the vtf in materials/SodaMachine01a I'll fix the folder path and I hope that does it.


Both the texture and the model needs to have the same folder names or else it won't work, like this:

Texture (.vtf and .vmt)
boxwarz/materials/models/props_interiors/sodamachine01a

Model:
boxwarz/models/props_interiors/vendingmachinesoda01a.mdl

If you are using those folders it should work.
Lev ditt liv som en helg
Hona
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jan 08, 2006 7:15 pm
Location: Sweden
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users

cron