Error: A Material instance cannot be shared across renderables with different animator libraries

Software: Away3D 4.x

Bug1453731, Newbie
Posted: 07 July 2015 09:22 PM   Total Posts: 4

I had a model with armature and 3 different materials. Different polygons of same geometry using different materials is possible in Blender but not in Away so I split the model by the materials so now I have 3 parts each having it’s own material. I exported all as a Collada file.

Loader3D along with DAEParser loads the parts and their respective materials/textures fine. However there’s no animation and animator property is null. Using ASSET_COMPLETE events and assetType values, I can see each mesh triggering a seperate skeleton, animation node and animation set assets so I’m pushing them into arrays. I also create seperate animators from these assets, play the animation and assign them to their respective meshes.

If I assign only 1 animator at a time, I can see that they work. However when I assign them all in a loop like “meshes[_n].animator = animators[_n];” I get the error.

“A Material instance cannot be shared across renderables with different animator libraries”

What is the meaning of this? Each model has it’s own material and each material uses a different texture image so how can there be any kind of material sharing?

   

dimaka, Newbie
Posted: 17 August 2015 05:49 PM   Total Posts: 1   [ # 1 ]

Hi!
I’m have same mistake in MaterialBase.as 470 line (method addOwner ).

I’m have 2 models in AWD format (mesh, skeletonAnimation, textures and animation), in my code use AssetLibrary:

AssetLibrary.load( new URLRequest('myCharacter.awd'));
AssetLibrary.load( new URLRequest('myOtherCharacter.awd')); 

by a 2-nd loader call, i’m see error: A Material instance cannot be shared across renderables with different animator libraries. If i’m comment throw in addOwner method, all so good working.

My files AWD all names have unique names in: mesh name, skeletonAnimator name and material name.
what do I do not so, and tell as correctly to load these AWD files, I can have many AWD files with different data and load them separately?

Forgive another for English, my native language! smile

   

rmilburn, Newbie
Posted: 28 August 2015 01:48 AM   Total Posts: 3   [ # 2 ]

We had the same issue with AWD and Animators. After about 4 hours of debuging we found that the shared material was actually the DefaultMaterial that is applied to all of the models when null is passed as texture. This seems to always happen when importing from AWD form 3D Studio MAX

by not allowing the default material be assigned to any model, the material is not shared.

You will need to change this line of code in the Mesh class

[/code]
this
.material material || DefaultMaterialManager.getDefaultMaterial(this);
[code] 

to this

[/code]
this
.material material //|| DefaultMaterialManager.getDefaultMaterial(this);
[code] 

we found that it worked perfectly and we did not get any errors. All our models loaded complete with animation and textures

   

rmilburn, Newbie
Posted: 28 August 2015 01:50 AM   Total Posts: 3   [ # 3 ]

We had the same issue with AWD and Animators. After about 4 hours of debuging we found that the shared material was actually the DefaultMaterial. It is being applied to all of the models when null is passed as texture. This seems to always happen when importing from AWD form 3D Studio MAX

by not allowing the default material be assigned to any model, the material is not shared.

You will need to change this line of code in the Mesh class

[/code]
this
.material material || DefaultMaterialManager.getDefaultMaterial(this);
[code] 

to this

[/code]
this
.material material //|| DefaultMaterialManager.getDefaultMaterial(this);
[code] 

we found that it worked perfectly and we did not get any errors. All our models loaded complete with animation and textures.

we are using away3d version 4.1.6

   

rmilburn, Newbie
Posted: 28 August 2015 01:50 AM   Total Posts: 3   [ # 4 ]

We had the same issue with AWD and Animators. After about 4 hours of debuging we found that the shared material was actually the DefaultMaterial. It is being applied to all of the models when null is passed as texture. This seems to always happen when importing from AWD form 3D Studio MAX

by not allowing the default material be assigned to any model, the material is not shared.

You will need to change this line of code in the Mesh class

[/code]
this
.material material || DefaultMaterialManager.getDefaultMaterial(this);
[code] 

to this

[/code]
this
.material material //|| DefaultMaterialManager.getDefaultMaterial(this);
[code] 

we found that it worked perfectly and we did not get any errors. All our models loaded complete with animation and textures

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X