when scaleX=-1,light effect is inverse

Software: Away3D 4.x

Avatar
Cheng Liao, Administrator
Posted: 22 September 2011 04:58 AM   Total Posts: 116

Because of model which is exported from 3dmax , is mirrored in away3d,I set
mesh.scaleX = -1;
MeshHelper.invertFaces(mesh);
But the light effect is also inverse.

The first jpg is generated before scale -1;
The last jpg is generated after scale -1;

 

   

Richard Olsson, Administrator
Posted: 24 September 2011 01:33 PM   Total Posts: 1192   [ # 1 ]

This is expected. When you apply a negative scale, you also transform the normal vectors. The normal vectors are used to calculate lighting effects.

I guess it would be nice to have a convenience method (like invertFaces()) which inverts just the normals, not the winding. Please file a feature request.

In the meantime, you can try to flip your models manually instead of using negative scaling.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X