Problem when loading several obj models.

Software: Away3D 4.x

Svist, Newbie
Posted: 07 September 2012 10:51 AM   Total Posts: 14

Hi!

I have a problem when I load a few obj models.
For each new load model I create a new Loader3D.

When the loading is completed the model, I add it to Scene3D.

But after completed loading next model - the texture of the model is applied to the previous models!

 

File Attachments
TestLoad3dModels.zip  (File Size: 1882KB - Downloads: 154)
   

Svist, Newbie
Posted: 07 September 2012 10:53 AM   Total Posts: 14   [ # 1 ]

screenshot

 

   

macaan, Newbie
Posted: 07 September 2012 11:06 AM   Total Posts: 30   [ # 2 ]

it would be great to see some code. maybe you mix something up while applying the materials to the meshes

 

   

Avatar
Darcey, Moderator
Posted: 07 September 2012 11:16 AM   Total Posts: 209   [ # 3 ]

I’ve noticed that

loader.addEventListener(AssetEvent.ASSET_COMPLETEonModelParseComplete); 

Fires twice. Place code in the function to only clean up and process asset types of MESH.

Also if your handling multiple mesh’s and have access to their names in the onModelParseComplete function, validate names before applying textures. If name access is an issue, create a unique onModelParseComplete function for each model loaded.

 

 

   

Richard Olsson, Administrator
Posted: 07 September 2012 11:59 AM   Total Posts: 1192   [ # 4 ]

This sounds like a known bug. Please try using the dev branch:

http://github.com/away3d/away3d-core-fp11/zipball/dev

Let us know whether that helps!

 

   

Svist, Newbie
Posted: 07 September 2012 02:06 PM   Total Posts: 14   [ # 5 ]

Hi again!

macaan - I attached the source code


Richard Olsson, thanks!

Without changing anything in my code, I replaced your source code that you gave and compile the project and everything works fine!

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X