HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Material/Teamcolor Faq

07-22-2003, 10:14 AM#1
Guest
Ok, in the last few days Ive seen more questions regarding teamcolor and materials, so I think you guys are ready for more indepth information (didnt posted this earlier as like only 10% knew mdl editing.. -_-) Also, dont expect a grammatically correct Faq or neatness...mesa tired! NOTE THAT THE FORUM SCREWS UP THE TABS SO KEEP THAT IN MIND!

==============================================

1. Introduction

What are materials and how I set up teamcolor? Well, first of all, the tc question will be answered below. In the meantime ill explain materials. Materials are the textures assigned to geosets. It controls how the texture should behave and in what mode it should be (which and how many layers). Needless to say is that the materials are a important part of a model. Also, keep in mind that textures can have multiple layers , which means that one geoset for example can have two layers; one regular skin/texture, and one that is the teamcolor itself. But oh well, next section now...

2. Material Modes

There are a few modes that a material can be. Each mode gives a different result and is used for different purposes. Theses are;

-None =nothing special, Alpha channels are not used and disables tc effectively (if you want a rpg with chars in no tc, then this is the best option)

-Transparent =Alpha channel is used as transparent area's, which mean are see-through. This is quite usefull option to make a detailed object without having too many polygons (like the bushes; they didnt model each vine in full 3d but used a clever way of four geosetplanes with a texture slapped on it)
Note: you CAN use this in conjuction with teamcolor, but its not recommended as ithe tc will not be blended wih the original skin, which can result in a ugly contrast between the skin and the tc.

-Blend = Used in conjuction of teamcolor. The Alpha Channel is blend with the teamcolor, which makes a contrast between skin and tc less horrid and noticable. A blended skin can make a different look on a teamcolored geoset then when transparent is only used. Best option in case when a geoset has to be skinned normally but has a few teamcolor spots. Blend must NOT be used on a geoset if there is only ONE layer. The unit will be blended with overlapping geosets from other models etc. Even selection circle will go through the model.

-AddAlpha = Makes the geoset alphaéd. In other words, you can see through and the model becomes "shiny" (see building phase of undead structures when almost done) . Good for glow planes and " shiny" geosets.

-Additive = Similar to addalpha, but then in conjuction of teamcolor
(for example drax mech controller's headset. the glasses were made of additive mode, where the tc can be seethrough and "shines")

Always check which mode is most suitable for your geoset model!
Or keep these modes in mind when modelling a unit. Next section.
07-22-2003, 10:37 AM#2
Guest
3. TeamColour

This is a easy section so ill skiff through it. First of all be certain that you have the teamcolor texture in your texture section. Without it you cant do jack. The Bitmap is:

Bitmap {
Image "",
ReplaceableId 1,
}

Keep in mind that:
ReplaceableId 1 = Teamcolour
ReplaceableId 2 = HeroGlow

After that is done we can mess with the materials. In this case, I will use Oinkerswinkle Mdl section of his material. This was before and probably what most people will have:
==============================================

Textures 1 {
Bitmap {
Image "Textures\Bunker.blp",
}
}
Materials 1 {
Material {
Layer {
FilterMode Transparent,
TwoSided,
static TextureID 0,
}
}
}

==============================================
Lets add a teamcolour bitmap to the textures first...This will lead into the following:

Textures 1 {
Bitmap {
Image "Textures\Bunker.blp",
}
Bitmap {
Image "",
ReplaceableId 1,
}
}
Materials 1 {
Material {
Layer {
FilterMode Transparent,
TwoSided,
static TextureID 0,
}
}
}

==============================================
Now, in case you want replace the current material of your geoset , you only have to alter the existing one. If not, then make a new material...but keep in mind to update the materialID in your geoset (will be explained in another faq) In this case, we ALTER the existing one. IF you payed attention in chapter 2, you will know that the best filtermode is Blend (skin) and None (teamcolour raw). But wait! This material only has one layer! This can be easily fixed, as you can see in the next snippit:

Textures 1 {
Bitmap {
Image "Textures\Bunker.blp",
}
Bitmap {
Image "",
ReplaceableId 1,
}
}
Materials 1 {
Material {
Layer {
FilterMode Blend,
TwoSided,
static TextureID 0,
}
Layer {
FilterMode None,
TwoSided,
static TextureID 1,
}
}
}

==============================================
What happened? First of all I've CnP the layer so we have two. Then, we assign the first layer to be the "skin". We change the filtermode into Blend. Because the static TextureId of the first layer is correct now, we dont have to change it.

At the CnP 'ed second layer, I have changed the filtermode into None, which ALL TC should be! Now, look closely at the Static TextureId. it has been changed to reflect the texture its using.
Always count from 0 is the general rule in mdl editing, so keep that in mind when counting Id's. In this example, the first bitmap is the bunker.blp. This will be read as TextureID 0. The teamcolour bitmap will be read as TextureID 1. Simple as pie!

==============================================
You have now succesfully changed your geoset into a skinned/teamcoloured geoset! Save the mdl and convert it back into mdx. Now a note of warning. If you EVER happen to stumble in a convert problem in yobguls editor (program refuses to convert into mdx), please DOUBLECHECK for any open spaces, wrong tabs and incorrect referals to non existing Id's. Best way to avoid any problems is to CnP sections from other mdl's. (in mdl they use tabs, not empty spaces, keep that in mind) Even the slightes error can be caused by typing the wrong filtermode. addAlpha is NOT the same as AddAlpha, as its case sensitive.
Three tabs is NOT equal to alot of spaces; you must use tabs .

Now to next chapter, additional modes that can be set....
07-22-2003, 11:07 AM#3
Guest
4. Additional submodes

Each Material can have different submodes. They influence the behaviour of the geoset somewhat in certain situations. Usually those situations are when the model is in a fog, in shadows, needs to be twosided, has a certain alpha value, or is simply animated (you can have animated textures in two ways). Here is a list and explanation of each submode:

-Unshaded, = The geoset is not shaded and is undependable from lightsources. Best used for glows and "shiny" stuff.

-TwoSided, = The geoset has the texture on both sides (blind side as well). Best used when you use a plane geoset that has to be seen from all sides.

-Unfogged, =The geoset is not afflicted to fog types and will stand out of it. Best used for glows and "shiny" stuff

-static Alpha X, = Regardless of animation frames, the Alpha will always be at value X

-Alpha, = value differs for each animation frame that has been set.

-TVertexAnimId X, = Refers to the animated texture verticles section.

5. textureId

A bit more indepth info about textureid's. Instead of having a constant texture assigned to a geoset, you can make it so that the texture changes in a certain animation frame. An example is the wate elemental:

Material {
ConstantColor,
Layer {
FilterMode Blend,
Unshaded,
TextureID 8 {
DontInterp,
GlobalSeqId 0,
0: 0,
83: 1,
166: 2,
249: 3,
332: 4,
415: 5,
498: 6,
581: 7,
}
TVertexAnimId 0,
Alpha 5 {
Linear,
0: 0.99,
2167: 0.99,
4867: 0.99,
10167: 0.99,
16633: 0.99,
}
}

==============================================
Instead having a solid value in Textureid, it has now a "frame selection" in conjuction of the globalseqid. GlobalseqId refers to the Globalsequences at the end of Sequences. You can see Globalseq as a seperate animationframesequence that always is being played in a loop, regardless where the Globalseq might be in the main sequences. Ill give more information about it later on.

Anyways:
TextureID 8 {
DontInterp,
GlobalSeqId 0,
0: 0,
83: 1,
166: 2,
249: 3,
332: 4,
415: 5,
498: 6,
581: 7,
}

each framenumber has a value. That value represents the textureId that it will use at that frame. Because it has a globalseqid, this animation frame will ALWAYS be looping, hence the low values of the frames. Usually they refer to textures that have:
WrapWidth,
WrapHeight,

That means the textures will follow each closely and will fill the empty gaps that might occur (only applicable if TvertexAnim is in use!) If you want to add a animated texture for your model, keep that in mind that you need a globalseq section. Ill update this later on.
07-22-2003, 11:11 AM#4
Guest
and a small note regarding the following values:

Material {
PriorityPlane -1,
Layer {
FilterMode Additive,
Unshaded,
Unfogged,
static TextureID 1,
}
}

PriorityPlane sets its behaviour regarding particles. It will make sure that the geoset "blends" with the particle emitter (otherwise the particle gets overlapped by the geoset)

Material {
ConstantColor,
Layer {
FilterMode None,
Unshaded,
TextureID 8 {
DontInterp,
GlobalSeqId 0,
0: 0,
83: 1,
166: 2,
249: 3,
332: 4,
415: 5,
498: 6,
581: 7,
}
TVertexAnimId 0,
}

ConstantColor...meh. never seen it usefull..oh well. Usually applied at textures that have no color at all on themselves (generic glow for example) and are dependant on the static color value set in the geosetanim.....but thats a entire ifferent story...
07-24-2003, 08:51 AM#5
FireAarro
I always thought AddAlpha turned darker areas of the skin into more alphaed areas, eh? GlobalSequences are looping bits right?

Oh, if you want to use tabs, use the code tag.
07-24-2003, 05:45 PM#6
Ari
Quote:
Originally posted by FireAarro
GlobalSequences are looping bits right?


Yeah. They'll loop irrespective of the current animation. If you look at an example, you'll see that they're created at the top, right under animations, and then defined using a "global sequence" identifier.
10-08-2003, 01:33 AM#7
Andy
This post will prob b deleted but i gotta try, how do u get rid of the tc? Do u just take out the material ID and texture thingy or what?

(This bit)

}
Bitmap
{
Image"",
replaceableid 1 blah blah:D plz help
10-18-2003, 06:53 PM#8
-={tWiStÄr}=-
ok well, i already asked and almost got my question answered by KDE but then he left :( so heres the thread http://www.wc3campaigns.com/forums/s...threadid=32661

so if you could just tell me what i need to put to have texture t1 use team color and texture t2 not, i think the geoset t1 goes on is second and t2 goes on first goeset. and also, can you tell me why you do what you did?
·Thanks
11-16-2003, 03:25 PM#9
WC3player2
how do you remove team color.
01-06-2004, 06:42 AM#10
MantisScreamer
color over it with a normal brush in psp.
01-06-2004, 06:56 AM#11
Andy
no you delete the ReplaceableId 2 bit in the MDL
01-07-2004, 07:41 AM#12
Alfred
Quote:
Originally posted by Andy
no you delete the ReplaceableId 2 bit in the MDL


...? huh? i thought it's ReplaceableID 1?
01-07-2004, 09:26 AM#13
Andy
well, I think 1 is Team Glow or something....

btw, love the sig :P
Zoom (requires log in)
01-13-2004, 08:08 AM#14
Alfred
:) i luv it too:)

btw i wonder if cookie is going to continue this tut, like animated textures... though i can get it to work but i wud love to see if im doing right :)
01-23-2004, 08:51 PM#15
WC3player2
Is There Anything About Putting New Textures Into MDl And Getting Them To Work?