Apply effect to part of an object,
Members - Reputation: 152
Posted 26 September 2012 - 05:22 AM
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?
Crossbones+ - Reputation: 13468
Posted 26 September 2012 - 05:41 AM
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).