import vertex color from blender...?

Hey all…

I have painted my meshes with vertex color in blender, now, i´m looking for a way to export it and then import into unity…
is there any way to achieve that?.. (i don´t have a credit card to buy vertex color paint tool from asset, so i´m forced to use the blender itself…)

Thanks.

I think the FBX format can export those.

otherwise you can use this.

Saving from Blender as usual is sufficient.

–Eric

Put Blender in object mode and save the blend file. You can export it from blender as an FBX and then import to Unity. Unity will create a materials file from the vertex colors you don’t need to do anything special.

I can confirm this works without any special actions in Blender.

Most of my game world is based on vertex colors - I’m using them with a special Unity shader as texture splatting weights. Thanks to Blender’s node-based material system, I even get a perfect preview of how it will look in Unity while painting :slight_smile:

Not quite, without subdiv on, on export and use in Unity, it looks better in Unity.

Really? I"ve exported to FBX and see none of my vertex colouring. What are you doing to prep it?

2 Likes

Are you using a shader that supports vertex colors? I don’t think any of Unity’s default shaders support vertex colors- so the vertex colors are probably there, they’re just not being used for anything. You’d need to find such a shader or create your own.

Use the Vertex color node in shader graph and plug it into the albedo

I can’t find anyone that specifically tells how I am supposed to get my characters vertex colors into unity, can someone help me?

1 Like

As far as I know they should import automatically when you import an fbx. There’s nothing special you have to do to import them.

For anyone trying to make this work, to be able to at least get the vertex colors to be imported by unity, your mesh needs to have ‘Face Corners’ and ‘Byte Color’ vertex color type attributes… none of the other combinations worked for me.

4 Likes

this solution worked for me, thanks

4 Likes

If anyone is reading this, I could only make vertex colors work from Blender to Unity, by deleting the color attribute, vertex paint it so a new color attribute is added, and then baking the texture onto it, but don’t ask me why this works and not simply creating a vertex color attribute from scratch

I can confirm that this worked for me. I have to leave the file as .blend and have Unity read from it directly. fbx won’t work what so ever.

1 Like

its not working at all…

Hello!
I used vevrtex color on my 3d model but it is not showing off on unity…

1 Like

Works! imported .blend file directly to unity and made a basic vertex shader graph (create a vertex color node / plugged the output into : fragment / base color and boom!

.blend model with vertex shader
https://flic.kr/p/2p4e8jm

vertex shader graph
https://flic.kr/p/2p4fzwZ