Jump to content
  • Advertisement
Sign in to follow this  
tempvar

Apply effect to part of an object

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

Hey,

Just a simple question. If I wanted to apply an effect to a part of a model such as a glow or a bump/normal map, would the best way to go about this is to just have a separate material for each part of the model (mesh)? For example, if i wanted to put some glow around the blade part of a sword, i would just have the sword be made up of two meshes (one for the handle, and one for the blade), and give each one its own material.

Is there a cleaner way to do this, maybe layering textures over the whole model?

thanks guys

Share this post


Link to post
Share on other sites
Advertisement
There are several ways and you should decide which one fits best in your engine.

1. Different meshes, each with an unique material (good if you have different shaders for different materials).
2. Use the alpha channel of the texture to determine the material (best if you want to blend between two materials).
3. Use vertex color to index into a material array ( best if a material change is along seams, need some kind of ubershader to handle all the materials).

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!