Springheel@Posted: Sun Nov 25, 2007 11:11 pm :
I've been running some tests without success. Maybe someone can tell me if this is possible.

I'm currently making skins for AI models. What I'd like to do is create, for example, two textures, a blue and a green tunic texture. Then I'd like to create an 'emblem' texture that is transparent, except for the emblem part. I was hoping to then add that texture into the material using a blend stage. By mixing and matching, I could combine each emblem with each colour tunic without having to bake it into the texture file itself.

The trick is, I don't know if it's possible to 'blend' one diffusemap that uses an alpha stage with a diffusemap that doesn't. So far I haven't had any luck...if either diffusemap has a transparent part, it renders as transparent in game (so I wind up with an invisible tunic except for the emblem).

Anyone know if there's a way to do this?



rich_is_bored@Posted: Mon Nov 26, 2007 5:23 am :
A material shader can only have one diffuse stage. So if you want the tunic and the emblem to be separate, they will require separate material shaders.

That said, the way to handle this problem is to treat the emblem like a decal. And that means you'll need a separate surface to apply the decal to.

This means you'll need one of your modelers to add a bit of extra floating geometry wherever an emblem needs to reside. And the end result will be a character model that makes use of more than one material shader. This is actually pretty commonplace if you look at the stock Doom 3 assets.

And one other thing to keep in mind, only alphatested transparency works in conjunction with illumination. So if you want the emblem to be lit, it must make use of a diffuse stage coupled with the alphatest keyword rather than a blend blend stage.