Strange lines in Away3D material

Software: Away3D 4.x

zamylin, Newbie
Posted: 28 November 2012 12:10 PM   Total Posts: 2

I am trying to get the original material that object has and add the directional light that I have in the scene:

protected function onMeshComplete(event:AssetEvent):void {

        
if (event.asset.assetType == AssetType.MESH{
         myMesh 
event.asset as Mesh;
         for 
each (var m:SubMesh in myMesh.subMeshes){
          
var mat:MaterialBase m.material;
          
mat.lightPicker staticLightPicker;
          
m.material mat;
         
}
        }

    } 

As a result, as expected, I have the original material and the directional light. But my problem is that I have some strange lines as at the picture below.

Is it the problem with my code? Away3D code? Or 3D model?
Thanks!

 

   

Avatar
Fabrice Closier, Administrator
Posted: 28 November 2012 12:43 PM   Total Posts: 1265   [ # 1 ]

Its not strange. Its because your model has uv’s values lower or exceeding 0-1. You need to set repeat:true to your material. The lines that you see are the pixels of your map (in this case the default engine bitmapdata) being stretched.

   

zamylin, Newbie
Posted: 28 November 2012 01:43 PM   Total Posts: 2   [ # 2 ]

Thank you very much! It makes sense!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X