Archived

This topic is now archived and is closed to further replies.

johnnyBravo

Giving meshes a colour tint.

Recommended Posts

johnnyBravo    100
to distinguish between teams in my game, i thought i would just tint the colour of each mesh to the team colour. Eg Ive got a tank that is silver. I then give it a tinge of blue for the blue team. How would i do this? With surfaces ive just set the material with a colour, but this doesnt work with meshes

Share this post


Link to post
Share on other sites
Pipo DeClown    804
SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE );
SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_CURRENT );

Does this work? (Of course you''d need to set a texture red or blue

And I think the material solution will work, with the right TextureStageStates. You might want to try it out.

.lick

Share this post


Link to post
Share on other sites
johnnyBravo    100
how do you mean i should set my texture blue etc. How would i do this when its in a mesh?

also you wouldnt happen to know where i can look to set the right texture stages so i can just set the materials?

Share this post


Link to post
Share on other sites