HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to use team color?

08-27-2008, 08:34 AM#1
Titanhex
Okay so at first I thought team color was done via alpha channels and editing. Then I got confused cause it'd never work.

So today I found out team color has to be done via model editing. I'm pretty confused as to whether or not you can even add team color though. More important HOW do you add team color? Is it a very complex procedure? I used the search function through the forums and found only blips of info covering it (One thing on removing it) but nothing that really explained it.

Or is Team Color just a really complex thing to add that you'd typically find in advanced tutorials or something?

tl;dr: How do I add team color?
08-27-2008, 08:52 AM#2
Rao Dao Zao
Well, it IS done by alpha channels... Partly.

It's not that complex, it's just a bit funky.

The material loooks something like this:
Code:
Materials 1 {
	Material {
		Layer {
			FilterMode None,
			static TextureID 0,
		}
		Layer {
			FilterMode Blend,
			static TextureID 1,
		}
	}
}

Where the textures are:
Code:
Textures 2 {
	Bitmap {
		Image "",
		ReplaceableId 1,
	}
	Bitmap {
		Image "PATH TO YOUR TEXTURE WITH AN ALPHA CHANNEL HERE",
	}
}
The upper texture being "0", the lower being "1".

Basically, the game renders the first layer, the team-colour, and then renders the second layer over it -- since the filtermode is "blend", the alpha channel is used to define transparency. However, since there is the team-colour layer wrapped all over the model underneath, the final result isn't transparency -- it's team-coloured areas.

Does that help?
08-27-2008, 09:12 AM#3
Titanhex
Hmm, your explanation gives me an idea of what I need to do, but unfortunately I'm still a bit confused as to how it works.

Perhaps team color is far more complex than I gauged. It doesn't strike me as a starter thing.
08-27-2008, 10:57 AM#4
Rao Dao Zao
Even if you don't understand it, just reconstruct the above material with the appropriate textures in your own MDL. Those few lines are all it takes.
08-28-2008, 08:53 AM#5
Titanhex
Ah, but how does it determine what is team colored and what is simply transparent?
08-28-2008, 09:13 AM#6
Rao Dao Zao
Each "geoset" gets one material. If you look at existing models, you'll find that a lot of them have three geosets -- one will be assigned the team-colour, another will be assigned a basic material with just the texture and filtermode "none" (ignore the alpha channel), and the third will be assigned a material with "transparent" (which allows the texture to be there or not there, and nothing in-between).

So the way of deciding what parts of the model get what are based on the actual geometry of the model.
10-01-2008, 06:29 PM#7
Kyrbi0
Hmm, this can be used for to add coloration of team onto models is that don't have none?

(I'm pretending to be European. :P)
10-02-2008, 04:05 PM#8
Rao Dao Zao
No. Adding the appropriate sequence of materials means absolutely nothing without corresponding holes in the texture's alpha channel.

(No, you're pretending to be a dick ;D)
10-02-2008, 06:25 PM#9
Kyrbi0
But then, if I can go in to a texture's alpha channel and add some holes, then adding those sequences will let the Team color shine on through?

(I know; I did it intentionally, knowing all the literate Europeans on this site :P)
10-02-2008, 06:28 PM#10
Rao Dao Zao
Yes.
10-02-2008, 06:35 PM#11
Kyrbi0
Bwahaha.

Wait, I don't have Photoshop anyway. :/
10-02-2008, 06:45 PM#12
Alexander244
The GIMP is a good freeware alternative.
10-02-2008, 06:46 PM#13
Kyrbi0
I remember looking into that... I don't remember whether it worked or not.

Would Irfanview be an adequate equivalent?
10-02-2008, 06:57 PM#14
TotallyAwesome
no... Gimp has brushes'n'stuff. It's good since it's free.
10-02-2008, 07:02 PM#15
Rao Dao Zao
Gee kids, can we keep this to MDL discussion?

Kyrbi0, if you want to have a conversation, get yo' ass into the IRC chatroom.

No, that's rhetorical, don't force me to lock and/or clean this. :(