[Q] Vertex color

Hi,

I am a bit confused about vertex colors, and hope somebody could explain it to me.
The wiki page about Mesh.colors says:

// (Note that most builtin shaders don’t display vertex colors, you can
// use eg. a particle shader to see vertex colors)

And this is indeed true, if i change the colors array.
However when i model an asset in blender and color it using vertex colors,
Then import it into unity it does get rendered.

So now i am lost, both seem to be vertex colors. One gets rendered one does not.
What am i missing here?

Thanks

Is Blender perhaps baking your vertex colours into texture maps? If you’re using any built-in shaders other than the Particle ones, then vertex colours are not being used by Unity.

How would i check this?
If i look at the model it’s material has no texture.

The model’s materials do not use particle shaders, and have no textures, but you’re still seeing vertex colours rendered in Unity?

I think so…
Here is a screenshot of the model how it looks after importing it from blender:

No textures, but you can see it’s colors.

But if we change the Mesh.colors array, it will because invisible unless we switch the shader to a particle shader.

The colours there are coming from materials visible on the right. Your mesh presumably has two submeshes, but each is being rendered as a solid colour, with lighting. There is no indication of vertex colours being used here.

Are materials the same as textures? The idea was to avoid textures to reduce the amount of requirements?
Or would materials be just as fast/resource heavy as using vertex colors?

Materials are the way most things are displayed on screen in Unity. You can read about them in the manual.

Using vertex colours instead of textures will probably reduce the size of your project slightly, and reduce its size in main and graphics memory. However, GPUs in real computers (not phones and tablets) are very fast at fetching values from textures, so it’s difficult to assess the tradeoff without doing tests on your target hardware.