I can make a change of color of this texture using the following script:

mat0 c3d.scene.materials.getByName = ("name");

if (mat0)

{

mat0.emissiveColor.set (0.521569,0.639216,0.482353);

}

The problem with this method is when I use special lighting in more in my scene (spot light) with this script, the color reflected on the cube have not the "right shade" and is not uniform. I think there is a conflict between the emissive and the light source.

To change the apparent colors of a 3D mesh you have to use scripting as in your example, but you must be aware of the interaction between the material and scene shaders if you want to get a specific effect. There are no other ways to modify textures in a 3D scene, other than in the 3D application which created the file in the first place. Remember that the 3D viewport is not intended to display managed colors so getting an exact RGB value on screen is very difficult - the normal color-management rules of PDF do not apply to rich media annotations.

If you have an object with some random material shader and want it to appear 'flat' red, I would typically run a zero-point function against the material and scene:

mat0.specularStrength = 0;

mat0.reflectionStrength = 0;

mat0.ambientTexture.image = undefined;

mat0.diffuseTexture.image = undefined;

mat0.emissiveTexture.image = undefined;

mat0.specularTexture.image = undefined;

mat0.reflectionTexture.image = undefined;

mat0.diffuseColor.set(1,0,0);

mat0.emissiveColor.set(0,0,0);

scene.ambientIlluminationColor.set(0,0,0);

scene.lightScheme = "cad";

If the material has a texture applied to a shader slot, it will completely override the colors defined in the same shader slot unless the texture.amount is less than 1; so if for example you have a teapot with a brick pattern in the diffuseTexture slot and you change the diffuseColor to green, nothing will happen. Set diffuseTexture.amount = 0.5 and you'll get green bricks, set it to 0 and the bricks vanish to leave a plain green teapot.