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.
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
Hi, thanks for the addon, it's exactly what I need. However, when I tried to install the script, nothing happens. I don't see the "Vertex paint tools" panel while inside vertex paint mode. Just the regular tools from Blender 2.71.
Help?
Thanks for this amazing plugin.
Have you enabled the plugin in user preferences--> addons? Im using blender 2.72 and its working fine.
Thank you so much for making this beautiful hack. I love it!
As a noob, please permit me to ask - What colours are for opacity and which for transparency? Is 0,0,0 black totally transparent and 1,1,1 white totally opaque? If I simply paint according to that rule, with shades of grey for mixed transparency, will that be enough for the alpha channel?
Sorry for the delay in responding. Traditionally you would make black = transparent but you can write your shader to respond any way you like. I could make the R channel = transparent if I wanted. You need to think about it as 4 empty boxes that you can pack anything into. Hope that helps.