Vertex alpha's painting? Possible??

Hiya all.

I’m new to this forum but hopefully this should be a quick easy question.

How on earth do you set a vertex alpha value? I’ve tried doing it with Vertex painting but have had no joy. I need this for creating external game levels as I’ve written a little script for exporting the basic mesh data and textures out to a custom file.

I’ve searched the net including this site and the blender site but hav’nt found a single thing.

thanks in advance!


PS sorry forgot to mention, I’m using Blender 2.27 but will soon be going on to 2.28


As far as i know, you can’t set Alpha value with the Vertex Painting tool.
You must assign a texture with Alpha chanel to the desired faces, and enable
the Alpha button in the Painting window


I haven’t tryed anything like that…but I were you I would start by asigning a full transparent texture to your object (and I mean true trasnparency, not the ‘calc alpha’ thing) and then having the vertex colors to afect the texture color by ¨ADD’ or 'Mix¨, maybe ¨Multi¨

After some twiking you should get what you are looking for.

Thank you both for your replies.

As you say, I’ll just have to experiment with alpha’d textues. I’m a programmer rather than an artist so don’t always see the best way of doing something. I had wanted to at least be able to have 2 layers of poly’s eg one a stone/rocky floor…and one slightly above it with a grass/moss texture on it…and then use the vertex alpha’s to blend the poly’s at the edge…sort of creating a dirty path effect. obvisouly deleting the completely transparent polys in the middle.

I realise I can do that now probably more effectively just using the textures properly, so will look into that.

I’ll also look at writing a script to alter the vertex alpha’s myself! ;o)

Thanks again!

Any more ideas are MOST welcome!


What you are looking for is already present on every self-respecting 2D painting package.

On Gimp that is called a Layer Mask. Things go more or less like this:

You have an image composed of 2 layers, one is the stone floor image and the other is the soild/dirt/grass image.

The dirt layer is on top of the stone layer… apply a transparency mask to the dirt layer and make that mask total transparent, in other words, the dirt is there but can’t be seen because is hidden by the mask… all you see is the stone layer.

Now you just paint holes in the mask where you want the path to go.

The same thing could be done inside Blender, and you don’t need two mesh layers for that…

The trick is using the ¨stencil’ option on the texture settings, having 2 separate images (one for stones and one for grass) and 1 alpha image (used to ‘cut’ the path out of the stones and let the grass to show trough it).

That sounds like a much more promising solution, thanks!

The only problem I can see perhaps, is that if I have a large area to texture, I might have to create several versions of the texture to cover the area neatly, well to avoid obvious repetition anyway. That’s when using the vertex alpha method becomes more appealing, becuase I could just have effectively 2 basic textures…and let the blending do the rest…but I’m going to try what you’ve suggested anyway.

It’ll be nice to get something remotely interesting on screen! :O)


Find a tutorial on how to make tileable textures, they are everywhere… then you could get alone with just one image, specially since the path is going to have an irregular shape.

… and who said that you can’t use vertex color with the solution I proposed? You can use them to introduce sligh color variations to the tileable image, so that it is even more dificult to notice it was tiled.

I wasn’t saying you couldn’t use vertex colours with your method, I meant I feel it’d still be more useful to have control over the vertex ALPHA directly. I’m a professional computer games developer playing around with stuff at home…hence using Blender and I’ve noticed artists using vertex alpha to great effect in levels in our games. That’s why I emphasise it so much.

But, like I said, I’ll learn about using the textures themselves more effectively. Plus I’ll play with the vertex colouring as you’ve suggested.



As far as I know you can’t set the degree of alpha transparency in the blender consol for vertex colors or game textures but I have seen it done in the realtime engine. I suspect there is a way to set it with python(outside the game engine so it is permanent) and will research it. If sombody knows please tell.
See the thread below.

correction-I have not seen alpha used without a “tex” enabled in faceselect. oops. Still It’s funny that it’s set up the way it is.

I know what you’re trying to you, and I’m not even sure if you can script it. You’ll have to check the python API docs, but I don’t believe Blender even has a provision for a separate alpha channel per vertex.

I’ve been thinking for a while that it would be great to have available an artibrary number of paintable greyscale channels that could be mapped to any of the material channels (col, alpha, nor, etc.) you choose. I might suggest it on the New Feature Tracker. That would certainly do what you’re asking.

But I’ve already done it. I actually don’t understand what a channel is. Is it the same as a variable? Each vertex of each face (ie 24 in a cube) has an alpha variable in it’s NMCol object. I believe with a lot work you could make a new feature for vertexpaint that can paint transparency just like painting a color.
The only thing I don’t understand is why this function isn’t built in? And why only for textures? Is there a comand key I don’t know? I don’t know if it renders properly since I’ve only cotten it to show in the game engine which still has a glich I think somtimes called alpha sorting. Any tips would be usefull.