Babylon Lite use mesh vertex colors

Hi there! How would one go about having the standard material use the vertex colors to render in Lite?

For example, in BJS 9.x we can simply not set a material for the mesh and it will then use the vertex colors. https://playground.babylonjs.com/#ZRZIIZ#2

However, that cant be done for Lite since we need a material for it to be rendered. Is it possible for the triangle to be colored using the color buffer then? I attempted to set the color buffer on a simple triangle but it doesnt seem to work.

Babylon Lite Playground

Standard material in Lite doesn’t support it (yet?). PBR does. is using PBR a viable solution for you?

Thank you for the suggestion but I attempted to use PBR Materials but I ran into another issue. The vertex colors are not all red as expected. It works for a single triangle, but a box for example fails.

Also BJS 9.x does set a default material that is also a standard material. So I would expect the same behaviour or similar via a boolean in the mesh/material interface.

Will appreciate @Deltakosh’s input (when he is available), to see if that was intentional. If it wasn’t, i’ll work on adding it to the standard material

Lite is meant for perf and size. Adding a default material will create a scene dependency that will grow size and bloat the engine.

So in a nutshell: we do not plan to add features that are easy to tackle on the user side.

Checking for the vertex colors issue!

you filled the color buffer wrongly:
Babylon Lite Playground

I’m adding vertex color support to std as we speak

thank you, i cant believe i screwed up the indexes.