Texture Alpha channel shows "color" (is this possi

Questions and answers about the how and why of making maps.
Post Reply
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Texture Alpha channel shows "color" (is this possi

Post by BinarySpike »

Hey, got a great idea for a map, been working on the textures, popped them into bzflag... and my! it makes the boxes half transparent...

Anyway this is what I wanted to do, have a box that you set the color and then have the texture "overlay" it so that the texture itself doesn't change color but anywhere the alpha is low it does change color... I don't want it trasparent... just colored... I only want one texture for everything... not several textures for several colors...

I tried messing with material and all but it doesn't work... I'm sure it's possible in OpenGL because I was trying texturing and set the wrong parameter and it did what I was talking about (that's why I thought of it...)


Thanks,
BinarySpike
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

that is not possible with just a single texture, with the normal blend modes, we use with one pass.

your describing a multi-pass method. You draw your color first, then draw your alpha texture over it. The texture with alpha overwrites the colored parts where it isn't alphaed out.

You can set the color of an object and have it blend with the texture, but it'll do it the same to all parts of the texture.
ImageJeffM
Post Reply