Home Technical Talk

Blender Vertex Alpha Hack

polycounter lvl 17
Offline / Send Message
Tamarin polycounter lvl 17
I finally got tired of waiting for someone responsible to do something about this.

***WARNING*** artist writing code - prepare for your computer to be irreversibly damaged.

If you have ever tried bringing vertex colors in from Blender - you will quickly run into the issue of no vertex alpha - until now!

This is a two part solution with a custom fbx export script as well as a collection of tools inside Blender for quickly and easily editing vertex colors.
is51ZIh.jpg]


DOWNLOADS
*** edit 09/06/2015

These scripts no longer run with newer Blender versions. Some users at Unity forum have updated the script and you can get the new downloads there.

http://forum.unity3d.com/threads/vertex-rgba-blender-2-5x.254038/

***


INSTALLATION
- replace export_fbx.py in your ..scripts/addons/io_scene_fbx

- place vertexRGBA.py in the../scripts/addons folder. You will need to enable the addon inside Blender "User Preferences."

INSTRUCTIONS
- Blender defines vertex color with 3 variables (x,y,z). The basic idea of these scripts is to add a 4th variable (w) because most shaders make use of (x,y,z,w). In Blender a second set of data is added so there are 6 variables. The data from the first color layer is packed in the fbx as usual and the data from the second color layer is combined and added to a 4th. The second vertex color layer name must always end in "_ALPHA". This second layer is created automatically with the provided addon. You could paint color into the alpha layer but it will always be exported as a single channel.

In Blender you must be in Vertex Paint Mode to paint vertex color. The addon is visible in the 3D viewport tool properties panel.

Replies

Sign In or Register to comment.