Reputation: 615
I'm trying to get a model imported into unity from blender showing the vertex colours. I have a shader(shows vertex colours) which I've applied to the model but still just plain white. I know the shader works because I managed to get it working on another blender model, however I just don't know what the settings were used in the blender file.
Here's how I'm currently doing it: I create a model in MagicaVoxel and is coloured. I then exported it as a .obj file. I then import this into blender. If I switch into "texture" mode, I can see all the vertex colours on the model. I save this blender file as just "xxx.blend".
Then in Unity, I drag the .blend file over, and it imports the model. I apply a material and the vertex paint shader to the model on the stage.
Model should start showing the vertex paint colours, but it does not. Just remains white.
Does anyone have any ideas?
Cheers
Upvotes: 3
Views: 8957
Reputation: 477
For other users searching a way of using vertex colors in Blender and importing into Unity WITHOUT ANY BAKING:
Note: when using vertex colors Blender creates a "Col" data field into the "Object data properties" (teen triangle icon).
Upvotes: 0
Reputation: 615
I managed to find a way to get vertex colours showing in Unity.
I needed to bake the texture into the vertex colours, to do this, with the object selected in blender, check the "vertex color paint" box under materials. (Shadeless can be checked if you don't want any shadows on the final bake)
Then switch into "vertex paint" mode (from object mode) and then in the properties under bake, check "bake to vertex colour", bake mode is "textures", then click bake.
Import blend file into Unity and apply vertex shader to see.
Upvotes: 2