[Solved] BitmapMaterial.colorTransform completely overwriting the material?

Software: Away3D 4.x

Avatar
vonWolfehaus, Newbie
Posted: 05 January 2012 04:51 AM   Total Posts: 14

After I add a ColorTransform object to a BitmapMaterial, it completely overwrites the material to basically change it to a ColorMaterial. All I want to do is tint the (greyscale) texture to a certain color. Here’s my code:

var ctm:ColorTransform = new ColorTransform();
ctm.color = (randomShade << 16) | (randomShade << 8) | randomShade;
bmMat.colorTransform ctm

Fairly straight-forward. But am I missing something?

Update: I was missing the color multipliers, which needed to be set between 0.4 and 0.7 to be noticeable. They also need to be set after color is. Sorry, haven’t worked with ColorTransform very much… obviously.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X