Multiple skins, same faces (Source engine)


I’m not new to Blender, but I have been making a model for someone and it has 2 skins when compiled in-game. If you’re not familiar to source engine, this means I have exported the model from Blender and compiled it to run in a game (Team Fortress 2) but it has 2 variations on the texture that can be set when manipulating the model in a map editor.

Here’s the current set-up:
There are 3 textures in play, “conveyer_belt” “conveyer_support” and “conveyer_blet_red”
(conveyer_belt and conveyer_belt_red are the same, but one’s red obviously)
The model uses 2 UV’s and I have applied “conveyer_support” to one and “conveyer_belt” to the other, and they are correctly applied to vertex groups.
The problem I have is getting the compiler to recognise the “conveyer_belt_red” texture as the alternative skin.
Basically, can I make the vertex group assigned to “conveyer_belt” also be assigned to “conveyer_belt_red”.

Help apreciated.

P.S. can I have help ASAP, the guy I’m making this for needs it for a deadline. Thanks

so you need two vertex groups with the same verticities in them? Easy!

Take your first vertex group (conveyer_belt), hit “copy group” & then rename the new one.

I need the same vertices to have 2 materials assigned to them. I din’t think that can do that can it?

I’m not familiar with source so I don’t know exactly how the multiple textures would work, but from the sounds of what you’re saying you just tell it to display texture A or B. If it was an id based game I would eigther know exactly what to do or could easily find out (d3 tech has it all in the material files, q3a in the shaders & q1/2 depends on the model), but I’m going to suggest going to valve’s wiki & see what they say.

Trundled through the Valve developer community (like a wiki) but nothing really specific.

Here’s what I know know about Source engine and textures:
the texture information in stored in .vtf files but the engine uses a .vmt file of the same name to render the texture.
a model can have multiple “skins” by adding this code to a .qc file (which is used to compile the model files into mdl format)

$texturefamilies "skingroupname"
{"skin1" "skin1b"}
{"skin2" "skin2b"}

(where skin1 and skin 1b are used at the same time in one skin and skin2/b is the alternertive skin textures)

The problem I have is that I can’t get my model to use skin1 AND skin2 on the same parts of the model in blender.

bump with question.

could this be done with a wild-card texture name? (conveyer_belt*)

you’re compiling your textures & materials for source, correct?

I’m using the materials already in the game’s gcf

I want to necrobump this just incase I am googling for it again later, apologies to all you necrobump nazis.

You can have two materials on one model in blender purely by creating a new material and changing the mapping from generated to uv. When you write your qc file, the $texturegroups command overrides the material set in the .smd (I think).

Also you have your commands wrong up there, have a look at$texturegroup for the commands you should use.

When you set skins you are using the same UV layout, I don’t think there is a way to change UV coords between skins.

I think I might do a tut on this soon.