Jump to content
  • Advertisement
Sign in to follow this  
pabloes

MD3 - TEXTURE, TRANSPARENT

This topic is 4612 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

Gentlemens, as You probably know - MD3 models have a skin texture applied to them while loading. Imagine a model of a Tree with texture that has leafs on a black background, should i do another mask texture to make that work correctly (black colour transparent) or there is another, quicker way around to achieve that? A good example of what i'm talking about is here: http://www.map-review.com/images/jamodels/yavin/tree10_b.jpg I would like to get rid of the Green colour that acts as a background for those leafs on this tree.

Share this post


Link to post
Share on other sites
Advertisement
This is called "color keying" and it has been discussed before on these forums. It's not directly supported by 3d hardware so you need to take advantage of alpha testing. The basic idea is to create an alpha channel in your texture and where ever the "key color" (green in your case) is you set the alpha to 0.0, otherwise you set it to 1.0, then set the alpha test so that it fails on 0.0. Do a search on these forums for more information. It's probably a better idea to just use an image that already contains an alpha channel for your texture.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!