Runtime recoloring of models

Sorry, it’s not obvious to me from these pictures what you expect the color to do, or what is the particular problem you’re having with setColor().

There are two common problems people experience with setColor():

  • It completely replaces any vertex color already assigned from the modeling package. If you’d rather modulate the existing color, rather than replacing it, use setColorScale() instead.

  • It might color parts of the model you don’t expect it to. If you want setColor() only to color certain parts of a model, you have to make sure those parts are set aside as their own nodes, and then you can get a handle to those nodes. The manual explains how to do this.

But, yeah, there’s no requirement to use setColor() or setColorScale(). If you’re happy with directly modifying the vertices, go right ahead with that approach.

David