How to dynamically apply a color to one portion of a UV map?

Let’s say I want the user to choose the character’s shirt color.

What should I do it by script to apply a tint color to a certain part of my UV map?
Or is there another way than by script?

2 Answers

2

You can create a shader for this. There are two ways to do it.

  1. create an image in which every part has different RGB values and your shader replaces specific RGB value with the one you provide. for example, if your shirt part in the reference image is red(1,0,0), your shader will replace red with your given color. create this pair for each part.

  2. create mask images for every part and use that masks to change the color of the specific part. use all images to change color in the shader.

Hi there, Thanks for your response. Would that mean I would have to write my own shader? I don't know how to, so I'm better off finding one, or some plug-in. Any suggestion for a ready made shader/plugin? Thanks a lot

You can create model with a couple of sockets for materials, and then change color of each material instance independently.