Textures not being properly mapped

Software: Away3D 4.x

Wilson Silva, Newbie
Posted: 13 March 2012 04:08 PM   Total Posts: 2

Hello,

I have a house.obj file made in Google Sketchup and exported via TIG’s OBJExporter. Everything works fine but the textures are not being scaled as they should. What’s causing the problem is the exporter or I should fix it in Away3D?

Here’s my code:

[Embed(source="house.obj"mimeType="application/octet-stream")]
private var HouseMesh:Class;
private var 
houseMesh:Mesh;

...

Parsers.enableAllBundled();
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETEonAssetComplete);

AssetLibrary.loadData(new HouseMesh());

...

private function 
onAssetComplete(event:AssetEvent):void
  {
   
if (event.asset.assetType == AssetType.MESH
   
{
    houseMesh 
event.asset as Mesh;
    
houseMesh.geometry.scale(100);
    
houseMesh.= -50;
    
houseMesh.rotationY 180;
    
    
scene.addChild(houseMesh);
   
}
  } 

 

   

Avatar
Fabrice Closier, Administrator
Posted: 13 March 2012 04:27 PM   Total Posts: 1265   [ # 1 ]

pass the property repeat = true to your materials, as it seams that you have defined the tiling into your editor.

 

   

Wilson Silva, Newbie
Posted: 13 March 2012 06:41 PM   Total Posts: 2   [ # 2 ]

Thans Fabrice!

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X