tip on using setColor

It took me awhile to find out why setColor wasn’t working for me. I finally found some information provided by zerobyte that helped alot. To use setColor the model can’t have a material assigned to it. Open your egg file and look for a node. Delete that block and also any references to matial.

Won’t setColorScale() work with a material? I thought it did…

It depends on the material. The material defines the color of the object in the presence of lighting. There are two kinds of material definitions: (a) the material says “let the vertex color be seen”, or (b) the material says “the color will be (r, g, b, a)”.

Since both setColor() and setColorScale() affect the vertex color, then if your material is of type (b) then neither of these operations will have a visible effect.