Material doesn't react to vertex alpha values

Good day comrades,

I think I’m in the point of fixing the problem.

In the blend you’ll find a plane, which has a material. The script should make the plane transparent by changing the alpha values of the vertices.

WHY. DOESN’T. IT. WORK??? HHnnngggh!! :frowning:

If you’ve got an idea, please help.

Attachments

alphas.blend (482 KB)

Have you switched the faces to alpha mode?

By the way you can simply make an Alpha material IPO to make the material transparent. This is much faster then accessing vertices by python.

Yes, the texture is set to alpha. I want just specific parts of the mesh to be transparent, so it looks like there are parts missing, but it just won’t work for some reason. If anyone knows what’s wrong please give me a hand.

You can do it using nodes.
It won’t work at all with normal materials. I think the inclusion of alpha in the vertex colours is a hang over from the usual convention of using 16 bit colors with alpha (RGBA). It doesn’t actually do anything.

So you need to use object colours with an IPO.- Then use nodes with vertex colors as a color mask.
> material 1 in the nodes will be shadeless and have vert colors enabled.
>> use split RGB to use it as a mask. For example every red vert will be transparent.
>Material 2 will be your base texture.
>> material 3 will be a transparent texture using OBcolors and transparency, controlled by IPO.
> mix material 2 and 3 using material 1 (through the RBG split) as a mask.

You can add two materials to one object and make only on of them transparent with Ztransp use OBcolors and controll the alpha by an IPO.
alphaball.blend (419 KB)