Trimesh: give a color to the triangles (instead of to the vertices)

Hey all,

I m a beginner with Jme, so maybe this is a stupid question …  :expressionless:

I am building a TriMesh and want to give each triangle a single color.  Is there a simple way to do so?

In the documentation I only find how to give a color to eacht vertex.

Thanks a lot!


The vertices define the color of the triangle.  In flat color mode (see ShadeState) you can make the colors look more "per triangle" rather than blended from vert to vert.  In flat mode, the color for the trianlge comes from one of the three verts that comprise the triangle.  If you want to know which vert will define the color of the triangle, see the chart here:

Thank you, I think that will work