• Advertisement

Archived

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

Giving meshes a colour tint.

This topic is 5311 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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

  • Advertisement