Apply effect to part of an object

Started by
1 comment, last by tempvar 11 years, 6 months ago
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
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).
Thank you.

This topic is closed to new replies.

Advertisement