Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
Checkers on my custom model [Archive] - TF2Maps.net Forums

PDA

View Full Version : Checkers on my custom model


Hawk
12-05-2007, 03:11 AM
Hi! I've been able to accomplish a lot thanks to the information on this site. I was wondering if somebody could help me with what I assume is a common and simple problem....

http://www.alternatedimension.com/post/checkers.jpg

I'll bet this problem looks familiar to somebody...

I created a custom battleship model for a map I'm making. I first compiled it and placed it in the proper directory. As you can see, it worked because I can put it in my level in Hammer. It's the texture that's the problem.

I'm not sure why, but Vtex gave me lots of trouble, so I eventually turned to a Photoshop plugin solution as was suggested in another thread. It properly exported my texture. I also created a very simple .VMT file that looks like this:


"LightmappedGeneric"
{
"$basetexture" "battleship"
"$translucent" 1
"$ignorez" 1
"$vertexcolor" 1
}


I placed both the battleship.vmt and battleship.vtf files in the "team fortress 2/tf/materials" directory. However, the texture doesn't show up in Hammer, the model view, or the game itself. I wasn't clear on where to put the battleship.vmt file, so I copied it into the "tf/models" directory as well (where my battleship model files are). Also, the texture file opens just fine in Photoshop using the plugin.

Are my files in the wrong places? Or could it be that the 5.5mb texture file is too big? (I admit it's big, but so is the object I'm putting it on!).

Many thanks to anybody who can help me solve this.

spaceweasels
12-05-2007, 09:50 AM
If there are regular material textures, I would remove the $ignorez and $vertexcolor parameters. I might also get rid of the $traslucent parameter and replace it with $surfaceprop.

Also what VTF formatare you saving them as? I find GRA8888 works well for regular textures, and DXT5 for decals or textures using an alpha channel.

Hawk
12-05-2007, 11:15 AM
Thanks for the advice on the .VMT changes. I've changed the file, as well as changing it from LightmappedGeneric to VertexLitGeneric (which I heard was better for objects). Also, the VTF's formature is BGRA8888 (I kept things pretty default).

The object still gives me a checkered texture. I'm just curious because I can't find the answer in any of Valve's online documentation, but where does the .VMT file go? In the materials directory with the texture, or in the models directory with the model? Or even somewhere else?

spaceweasels
12-05-2007, 12:32 PM
I put the VMTs in the same folder as my VTF files. In fact, I made a subdirectory called spaceweasels in my materials folder. This is where I put my custom textures (so I can put in a filter called spaceweasels in Hammer to easily find my custom textures).

This is what one of my VMT looks like:
"LightmappedGeneric"
{
"$basetexture" "spaceweasels\Brickwork"
"$surfaceprop" "concrete"
}

One problem I had early in my texture making was adding the VTF extension to the texture file name in my VMT files. This made Hammer look for a file called Brickwork.vtf.vtf which didn't exist.

Hope that helps.

Snipergen
12-05-2007, 01:34 PM
hawk if you have it sorted by the help of other guys it would be great, i have done custom modeling so many times already i can do it blindly so if it still doesnt work i can help you.

Just remember 1 model = 1 square texture

Hawk
12-05-2007, 02:13 PM
I've become more and more convinced that I've made some sort of silly mistake somewhere. My texture actually shows up as a usable texture in Hammer, just not connected to the model I want it on. I wonder if there was something I was supposed to do in the compiling phase to connect the texture to the model.

Spaceweasels - thanks for clarifying where my VMT goes and giving a good examle. Mine looks a lot like that. I've luckily avoided the .vtf.vtf problem.

Snipergen - Could you do that for me? I would greatly appreciate it. Hopefully seeing what you do will show me what I'm doing wrong. I've got the files here in the .RAR file (http://www.alternatedimension.com/stuff/battleship.rar) and sorted like I have them on my hard drive (tf\models and tf\materials).

Hawk
12-06-2007, 12:47 AM
All right... I've been racking my brain over this thing and looking over all sorts of tutorials, plenty of them being for other source games like Half Life 2. One of them clued me in on a line I didn't have in my model's .QC file for compiling:


$cdmaterials "models/weapons/"


Well, given that information and a little help from the Neil Jedrzejewski's MDL Texture Information tool, I was able to set where the texture should be and in turn know where it was supposed to go.

It works! I did the engineer dance of joy.

Thanks for your help, spaceweasels and Snipergen.

Snipergen
12-07-2007, 03:17 AM
Im sorry i didnt reply fast enough hawk but im happy it works now. Great feeling isnt it? I had it too when it finally worked because all the tuts around are absolute SHIT.

But once you get it its easy. But still a pain in the ass, i miss an option in hammer like : tools->import->.obj or something :(

Hawk
12-07-2007, 08:49 PM
Im sorry i didnt reply fast enough hawk but im happy it works now. Great feeling isnt it? I had it too when it finally worked because all the tuts around are absolute SHIT.

But once you get it its easy. But still a pain in the ass, i miss an option in hammer like : tools->import->.obj or something :(

No kidding... Valve could seriously stand to take out some of the middle steps in importing a model.

I'm going to tackle a few more custom models. Maybe when I get this down I can make a TF2-specific tutorial that isn't full of holes.

Deadeye2007
01-06-2008, 09:48 AM
Hawk,

I would very much appreciate if you could post a walkthrough of how you got your models to work. I've spent 3 days now trying different things, and it simply will not work for me.

Any help you could give would be much appreciated.

Youme
01-06-2008, 09:51 AM
"LightmappedGeneric"


should be


"VertexlitGeneric"


but i doubt this is the source of you're problems, this usually manifests itself in other ways (like telling you whats wrong)

Deadeye2007
01-07-2008, 09:26 PM
Still really hung up on compiling models for TF2. Unlike most other tutorials on the net for HL2, the modeling compiling ones don't seem to work for the orange box directory structure.

Anyone care to post a basic compiling walkthrough for a newbie mapper.

Intraman
01-07-2008, 09:56 PM
What you might want to try is reverse engineering one of the valve models. That's how I figured out how to get my skybox texture working.

horza
01-09-2008, 04:42 PM
hi all,

I have this exact pink check problem, but having read through this thread and used the tools mentioned i still have the problem, i even see pink checks when using the texture browser to view my texture.

I can open my VTF file in photoshop and it's fine (i created it in PS, tried loads of different save options, res 512x512)
MDLTexureInfo shows my VMT file name is correct (VTF file is the same name in the same folder) and that my paths are correct

=============
TEXTURE NAMES
=============
Texture 1 - "Hull01DiffuseMap.vmt"

TEXTURE FOLDER(S)
=================
Texture path 1 - "<Mod Folder>\materials\models\horza\parts\"
=======================

my vmt is the same as the one spaceweasels posted but with $basetexture set to "models/horza/parts"

i have tried both "VertexlitGeneric" and "LightmappedGeneric" but still the same pink check.

regarless of what the mdl is looking for i should be able to see the texture using the texture browser shouldn't I? but all i see is 64x64 pink checker

any help appreciated, this is doing my head, which hopefully it'll be obvious to one of you :)

thanks

Horza

Dox
01-09-2008, 06:46 PM
Im having the same problem i think... which is annoying cause i made the model that doesnt work almost the exact same way as one that does.

horza
01-10-2008, 07:29 AM
i'm at work so not had time to try this as yet, but using this little app may solve the problem...hopefully:)

http://nemesis.thewavelength.net/index.php?c=149

horza
01-10-2008, 12:21 PM
VTFedit rules :)
I used it to create the VMT and i can now see the texture in the hammer brower

now i have seen the autocreated VMT I have realised what my problem was...
in the VMT i thought basetexure was just a path so i had

"$basetexture" "models/horza/Parts"

What i didn't realise is that the last part is actually the file name with out he VTF extension, so i needed

"$basetexture" "models/horza/Parts/Hull01DiffuseMap" (Hull01DiffuseMap.vtf being my texture)

kinda obvious now :P but thought i'd share incase anyone else manages to make the same stupid mistake. Must have missed a line of text while reading up on all this :)

Cheers

Horza

TF2Maps.net is proudly hosted by