Replacing TextureMaterial with set lightPicker results in black object during a couple of frames

Software: Away3D 4.x

Ontheronix, Jr. Member
Posted: 19 April 2012 05:18 PM   Total Posts: 37

Hi all,
when I replace a TextureMaterial with another TextureMaterial that has the same lightPicker set as the old TextureMaterial, the Mesh is black during a couple of frames.
When I replace the TextureMaterial with a new one that hasn’t a lightPicker set, no problems occur.

As far as I see, setting a lightPicker is the only way to get non-default lighting on a TextureMaterial?

Thanks in advance smile

var txt:BitmapTexture = new BitmapTexture(bm);
var 
mat:TextureMaterial = new TextureMaterial(txt);
   
mat.specular 0.7;
   
mat.gloss 400;
   
mat.mipmap false;
   
//mat.lightPicker = oldTxt.lightPicker;
   
msh.material mat
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X