Changing Color of a Shap3D "On The Fly"

Hey,
I am trying to change the Diffuse Color of a Shape 3D at Run Time. I have set the following Capabilities …
Appearance.ALLOW_MATERIAL_READ);
Appearance.ALLOW_MATERIAL_WRITE);
Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
Material.ALLOW_COMPONENT_WRITE);
Material.ALLOW_COMPONENT_READ);

I am able to succesfully set the diffuse color (setDiffuseColor(color)) and then add the material back into the apperiance and then add the appearance to the shape3d. However, the object’s color in the 3D world doesn’t reflect its new Material/appearance.

Is there anything else I should be doing?

Oh yea, I can see the Color of the object at startup (meaning there are several lights pointing at the object)…

Thanks

I have done this by keeping two appearances with different colour schemes and just swapping them using a behaviour.

Are you saying that it continues to draw with the old appearance?

[quote] Are you saying that it continues to draw with the old appearance?
[/quote]
Yep

Do I need to set the Color on the geometries found in the Shape3D? (ie, set the color on every vertex found in the geometry?

Ok, so apparently I didn’t have my scene light well enough. I had ambieant light and 1 point light; however, these werent’ enough to illuminate the object fully. I added a directional light and now things change correctly.

So I answered my own question; thanks for checking things out though - made me think about what was missing in the scene.