multiple loaders messing up texture references

Software: Away3D 4.x

limewater02, Newbie
Posted: 20 February 2013 04:52 PM   Total Posts: 2

I need to load many obj files into a scene, by means of a for loop.


The way I do this is as follows.

Array objFilePaths//given
Array loaders = new Array();
for(var 
i:int =0objFilePaths.length; ++i)
{
  
//getFilename is a given function that extracts filename from path
  
var fileNS String getFilename(objFilePaths[i]);
  
loaders[i] = new Loader3D(truefileNS);
  
//attach LOAD_COMPLETE and ERROR handlers
  //and ASSET_COMPLETE
}


for(var i:int =0objFilePaths.length; ++i)
{
    
var fileNSString getFilename(objFilePaths[i]);
    var 
urlReqURLRequest = new URLRequest(objFilePaths[i]);
    
loader3d.loadurlReq nullfileNS, new OBJParser());

In my LOAD_COMPLETE handler, I add the correct loader3d object to the scene.

Each of my objfile has a uniquely named material reference and unique texture.  In fact , my ASSET_COMPLETE handlers say that al of these are loaded.

Yet in the display, some of the meshes have materials which correspond to the material from the last obj file that I have loaded.

Does away 3d keep any kind of global state which may be leading to this problem? I can replicate this problem with .ac2 files as well.

Also, btw, does away3d uses s3tc textures internally?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 20 February 2013 07:37 PM   Total Posts: 1265   [ # 1 ]

This bug has been fixed almost a year ago. Use the ObjParser from the dev branch.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X