Supporting customizable colors on linked characters

I’ve always maintained my characters in a linkable format. Meaning a character resides exclusively in its own blend: When I pose or animate it in a scene, I link its collection from that file then make the armature a proxy. Apart from a few annoyances, such as hair and cloth physics being impossible to customize and bake per scene, this lets me keep my characters in one place without duplicating large data, while changes made to the character are automatically applied to each scene using it.

Now one character set I work with has a little issue I’m trying to find the best way around: It uses grayscale maps to specify customizable colors. The colorization is done easily in the material setup: I simply use a mix color node to colorize my grayscale image to any desired RGB input, then add the result on top of the normal diffuse texture.

The problem is the input color; For a character contained in the scene where it’s used and not meant to be customized per instance, you set a color directly in the material nodes and that’s it. But how do you do this when your character is meant to be linked, and the only thing you’re going to turn into a proxy is its armature to animate it? You can make bones to control the colors and use a driver to translate their XYZ scale to an RGB input node or something, but that’s one ugly way to do it.

So I was looking at custom object properties for this purpose. I figured out how to give an object a custom color setting, albeit the interface makes you jump through a few loops to do it right.

Screenshot_20210519_155405

In the material I simply use an Attribute input node with my color parameter. Obviously the attribute source I set in this case is Instancer.

The “color” attribute can now be set on both the normal object as well as the empty instancing said object: I can confirm this always works at least in a simple test case, both when instancing my object in the same scene as well as linking its collection from an external blend file.

So I technically have it all figured out: Part of this is itself an answer and hopefully an useful tutorial for others! But I’m also posting to ask what you think about the configuration, granted I couldn’t find much discussion on doing things this way: Is it a safe way to go about it, and can it be further improved? Let me know what else you think I should do, and how you’d go about setting up customizable colors on linked characters in general.

For example: The instanced character won’t show you which color attributes can be set to override a color… if you have too many such as “color_hair” or “color_shirt”, you need to remember the names or check the original blend to see what the custom properties were called. Worse yet you seemingly NEED to set all the color attributes after instancing your character, as leaving them empty won’t default to fetching them from the object, causing the color to default to white.

wow your art is good

1 Like

Awh, thank you! Can get even better if folks may help me figure out questions like this :slight_smile: