Sign in to follow this  

Apply effect to part of an object

Recommended Posts


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this