3d max texture export

Software: Away3D 4.x

Tom74, Newbie
Posted: 06 May 2015 02:55 PM   Total Posts: 5

So I build my coin in 3ds. Befor exportin I’ve selected 3 groups of polygones and apply 3 different material to it (Basic material - just color, nothing else). Then I’ve exported my model to .obj and .mtl files.

The problem is when I load object into flash there is nothing at all! Empty screen.

function onObjectComplete(event:LoaderEvent):void {
 
var coin:Mesh Mesh(loader.getChildAt(0));

 if (
coin.material != null{
  
var mtl:TextureMaterial coin.material as TextureMaterial;
  
coin.material mtl;
 
}else{
  coin
.material defaultMaterial;
 
}

But… if I switch material type from TextureMaterial to ColorMaterial, I can see my object and it’s all green smile, but still not with my texture from .mlt. What am I doing wrong?

 

 

File Attachments
coin.mtl  (File Size: 1KB - Downloads: 208)
coin.obj  (File Size: 305KB - Downloads: 212)
   

rdoi, Member
Posted: 12 May 2015 01:27 PM   Total Posts: 86   [ # 1 ]

Didn’t try your files as I not sure how away handle objs.
However, by your description, looks like you have a multi-material mesh.

If this is the case, afaik, Away3D just ignores the Mesh.material property and renders the materials assigned to its submeshes.

Just check if your loaded mesh have more than 1 submesh, and loop through then checking each material.

for (var i:uint=0; i < yourMesh.submeshes.length; i++) {
  trace(yourMesh.submeshes[ i ].material);
}

Also, if you assign a material to mesh.material it overrides the submeshes materials.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X