How do you use the Alpha channel of Vertex Colors?


I’ve been able to modify the alpha channel of my vertex colors using “Erase Alpha” in Vertex Paint mode, but how do I go about accessing that alpha channel in a material shader? I’ve tried the “Separate RGB” node but that only gives me RGB without the Alpha. I assume since there’s a way to edit alpha, there must be a way to use alpha?

This is as far as I got:

I’ve tried figuring this out in 2.79 and 2.80 with no luck.

Thanks for any tips!

Nope, the vertex colours don’t actualyl have an alpha. What you tend to find is, painting a black and white mask using vertex colours can be used as an attribute for mixing either colours or shaders.
This might help:

Thanks colkai,
I may use one of the RGB channels as alpha if that’s my only option. The vertex colors do seem to have an alpha channel since you can choose “Add Alpha” or “Erase Alpha” in the blend mode in Vertex Paint mode:

I was even able to use those blend modes to modify the alpha, then export the file as an FBX and read the alpha channel from Unreal Engine. But I was hoping to use the alpha channel in a material in Blender so I could preview the material before exporting to Unreal. It seems that’s not possible, so I’ll stick with the existing RGB channels.

EDIT: Sorry, I should clarify the version: the “Add Alpha” and “Erase Alpha” modes seem to only be available in 2.80 and 2.79.7 (hash 054dbb833e15).

Alpha channel of vertex color was a GSOC project in 2017.

So, student made it work in a 2.7 UI, 2.7 viewport. But making it work with Cycles, was out of scope of his GSOC.
Then, it was merged into 2.8 but work, to make it possible to render it, was constantly postponed as a less priority task among huge amount of tasks relative to 2.8.
So, painting alpha is there in 2.8 but you can’t see it or render it.

On the contrary, if you use a recent build of 2.7 branch, you can see vertex alpha painting effect in viewport and you can render it with Blender Internal.

1 Like

Thanks zeauro,
I think that last sentence is my solution for now: I’ll paint alpha using 2.79.7 just so I can see what I’m painting. I’ll be making the final material in Unreal anyway, so I won’t worry about previewing the material in Blender.

So it sounds like the task to support rendering alpha is on the roadmap, just not high priority right now?


2.8 is a massive refactor of every aspect of Blender like 2.5x series was.
But in 2.5x series, almost all releases were alpha or beta. The first stable release happened after 2 years of development.

This time, developers are trying to achieve first release of 2.8x series as a stable 2.80 after one year of development.
They are more numerous but Blender has grown during a decade between 2.5 and 2.8.
So, 2.80 UI was frozen before everything could be treated.

There will be some holes into 2.80 workflow : Vertex Alpha Painting, Easy Baking of textures, Baking of Indirect Lighting for animations, Overrides, etc…
But community will not have to wait one more year for a stable release allowing to use EEVEE and Grease Pencil objects for serious productions.

2.80 was announced for July. But amount of bugreports did not decrease in June. Maybe it will be released in August.
Some 2.81 targets have already be postponed : UDIM, overrides, etc…
Some ambitious projects like Mantaflow, Fracture modifier, or sculpt mode features are expected to merge quickly for 2.81 or 2.82.
2.80 release will continue to deliver a lot of feedback, and reports about undetected bugs.
So, devs will still have a huge amount of work after 2.80 release. Nothing is carved in stone.

But as something already partially present that need Viewport and EEVEE improvement, there is a big probability to see this fixed for 2.81.

Awesome, that roadmap looks exciting!
Thanks for the info zeauro!

I know this is a crazy old topic, but since I’m spending my days dealing with this recently, I thought I’d share what I’m doing. I made a material that uses a noise map and an alpha threshold to help see where alpha values are. This works well enough if I’m using the alpha for actual transparency, but alternatively, you could always split the RGB and output Alpha instead of one of the other channels. This would let you see smooth gradients more obviously too.

Thanks for sharing that material! That’s a pretty cool way to visualize the alpha channel, kinda like dithering basically.

The original issue I had was that the Alpha channel of the vertex color wasn’t available at all in the material nodes, but luckily they added it in version 2.81:

1 Like