Vertex Color Master

I made an add-on that is designed to help make working with vertex color data a little bit easier. The main feature of the add-on is the isolate workflow, that allows you to isolate one particular channel of color data and work on it with all the normal tools. There are also tools to help you move data between channels and between different data types, so you can transfer color to weights, weights to color and even use UV data as well as copying and swapping individual channels of color data.

For good measure, I have also added a bunch of tools that help you work accurately with vertex colors, such as blur, remap, posterize, rgb to luminosity and more.

Note: This image shows the old 2.79 version of the addon, itā€™s quite a lot better in 2.80. Iā€™ll try to update this soon.

Latest Releases:
v0.84 (Blender 2.80)
v0.75 (Blender 2.79)

2.80 quick start: Once installed, you can open the pie menu by pressing the ā€˜Vā€™ key while in vertex paint mode. This exposes most of the functionality, but the right hand 3D View panel contains the full set of menus under the heading ā€˜Vertex Color Masterā€™.

Documentation can be found on the Github page here.

Vertex alpha is supported, but only if you are using Blender 2.80, or one of the latest Blender 2.79 buildbot builds. Blender 2.80 (beta) supports vertex alpha, but currently does not render it in the viewport - however, you can use the isolate channel function of this addon to view or modify alpha, and it should be exported correctly when using export to FBX.

Feature suggestions or bugs reports are welcome, please let me know in the comments below, or on the issue tracker on Github.

24 Likes

Seems like it does not really ā€œmaskā€ channel on drawā€¦ i still can replace red color with blue even when masking set to green.
Is it intended to be so?

Channel masking really needed feature :slight_smile:

IPv6: No, it doesnā€™t do that because I donā€™t know how to mask channels when paintingā€¦ I think it would require modifying c++ code to enable real channel masking. Currently you can either use the active channel buttons with add and subtract blend modes. The UI is designed to make doing this a little easier than using the standard brush tools, as the color is set based on the channels you enable. Also, the active channels do alter the way the fill/clear, invert and posterize functions work.

Alternatively, you can paint in greyscale and then use the Channel transfer features to copy the result to the channel youā€™d like it to be in instead.

Iā€™m thinking of adding a function to make this greyscale workflow easier. Basically, youā€™d press a button to isolate a selected channel, which copies that channelā€™s data to RGB of a new layer and sets the brush up for greyscale painting. Then you then paint it how you want, and press the button again to copy the data right back into the layer you isolated. Even though this wouldnā€™t be as good as real masking, as it would work on one channel at a time, thatā€™s probably what youā€™d want most of the time. Does that make sense?

I added a selection mask to the fill/clear function so you can set the value of each channel masked by a selection now. It works differently depending on whether you have faces or vertex/edges selected. Filling using face masking will leave sharp edges along the selection border, wheras filling with vertex masking will produce smooth edges.

I just put this feature in before I go to bed, but I will expand it to work with the other operations (probably not layer/weight transfer though, since thatā€™s a bit more hassle, and probably less useful)


I keep forgetting to increment the version number, but I guess this should be 0.03 now. I added support for the selection mask in all operators except channel transfer now, so invert and posterize also work properly when masking is enabled.

Updated the addon to v0.03:

  • Add Isolate Mode. Isolate the active channel and work in greyscale before applying changes back to the original vertex colour layer, or just discard the changes instead.

Great addon. I will be very helpful at work. Is there donate button?

Not yet, but I can add one. Glad you like the addon :smiley: Let me know if there is anything you think needs fixing or would be a cool feature.

Iā€™m thinking of adding UV layers to the channels you can transfer to vertex colors, and while I am not sure how useful it would be, it might be cool to visualise the UVs, and is probably not that hard to add. Iā€™ll probably add a way to remap the value of channels too (scale 0-1 to 0.25-0.75 or whatever).

+1 to remap values (something similar to level adjustment in PS).
gradient operator could be useful - verts at bottom would be black, on top white.
PS. I can give you random color per island function if you want to include it into your addon.

v0.05 - Added remap function :smiley:

Iā€™ll look into the UV data transfer thing I mentioned, as it could be interesting to transfer vertex colors to UV data, and maybe there are people who would want to use vertex color to store 2 sets of UVs for some weird reason :slight_smile:

Try the isolate channel feature. It is about the closest I could get without having to understand Blenderā€™s C code and get a patch approved :smiley:

I should make some videos to explain what the addon is actually for, since I feel like there are a few people that would benefit from it but I havenā€™t explained in a very clear way what it does.

When installed should it read 0.0.5 and with an Alpha Support option. In the post above you call it v0.05. Is Andrew Palmer the author? Thanks

Yes, I am Andrew Palmer. The version number was wrong, sorry. It doesnā€™t make any difference to the addon, but Iā€™ve updated to 0.6 now :smiley:

To enable alpha support, you need to use one of the latest Blender buildbot builds available from https://builder.blender.org/download/ Once you are running the addon with a special version of Blender, you can enable alpha support from inside the addon settings in user preferences. If you try to enable alpha without a special build of Blender, you will encounter errors. I plan to improve the alpha support and make it automatically detect support is available, as well as make the alpha support and addon in general a bit more robust in future releases.

Let me know if you have any problems.

v0.6 - Add support for transferring data to and from UV layers.

This was relatively easy to implement and although it doesnā€™t seem super useful right now, I guess it could be used to store extra UV data or to modify UV data with the vertex paint tools in a weird and technical way. In any case, the addon feels more complete with this feature, since UV layers are just another kind of vertex data.

That would definitely be useful, and I thought about adding something like that, but I wouldnā€™t feel satisfied by just implementing single direction gradient and would most likely end up spending way more time on it than I initially expected. Iā€™ll think about it though! For now, you can create a vertex group, then use the gradient tool in weight paint to create whatever gradient you like, then transfer the weight data to a colour channel. Itā€™s a bit of a faff, but only takes a few seconds.

Thanks for the offer of random color per island. What do you use that for? Creating an id map? Iā€™ll have a think about what I want to do to the addon tonight.

v0.65 - Tested on buildbot blender and found and fixed a lot of problems with alpha support. Alpha support is now auto-detected too. Also cleaned up some parts of the UI.

Hello Mr_Flamey,

Thanks for working on this. Does the current FBX exporter export the alpha vertex data?

Thanks,

Adam

adamfarmer: Sorry, I didnā€™t see your comment. The exporter in the buildbot version of Blender (https://builder.blender.org/download/ - go here and get a 2.79 release) should be able to export vertex alpha. The release version of 2.79 does not support vertex alpha.

Wow, I just decided to use vertex colors in our game for lotā€™s of different use cases, and this plugin is just what I was looking for.
When developing a game, saving some data on vertex color saves draw calls and performance by reducing the need for additional textures or materials.
For example, we are adding a detail texture only on faces that have red vertex color. This way we donā€™t need to make two materials, one with detail texture and one without.
And we are also planning to change only some parts of the meshes color by using another vertex color channel. For example, there will be a color property in our custom shader, and that color property will only affect if faces vertex color is blue.
These are just methods to use vertex color as a mask. It can be used as transparency or fake ambient occlusion or fake shadows too.
We just tried using this plugin one hour ago. If we are happy with it and continue using it frequently I will make a donation.

Do you know if future blender versions will support alpha channels for vertex color? I donā€™t want to use a beta version so we can wait for some time until a robust version comes out, and then use alpha as one extra channel.

It seems probable that Blender 2.79a will have vertex alpha support, but I personally am not a Blender developer and am not 100% sure. Current alpha builds have support, and although a,b,c releases are meant to fix bugs, they do sometimes slip in new features and performance improvements.

Anyway, I have just updated the add-on, which now has a few new handy features thanks to JoseConseco, who gave me a bunch of code and also helped to iron out some bugs. Here is the list of new features in 0.75

  • Foreground and background colors both shown in UI and swappable in 2.79 (not just 2.79.1)
  • Gradient tool - Paint colored gradients using the foreground and background colors.
  • Random mesh island coloring - A comprehensive tool for randomising mesh island colors. Useful for id map creation and other things.
  • HSV adjustment tool - Adjust vertex colors using a tool similar to that in 2d graphics apps like Photoshop.
  • Selection masking now uses Blender face and vertex masking.
  • Lots of tweaks and fixes :smiley: