StjerneIdioten / I3D-Blender-Addon

Rewriting the I3D blender addon from scratch and adding long-sought community features
GNU General Public License v3.0
66 stars 18 forks source link

Exporting Several Meshes at once will only apply one material to all of them in i3d #36

Closed ssnd292 closed 4 years ago

ssnd292 commented 4 years ago

Describe the bug If you have several unmerged meshes with different materials applied to them in Blender and export them to i3d, the exporter only applies a single material to all other meshes.

It seems it only reads and applies the first mesh in thats exported (in my case the 03_Cube)

Expected behavior would be the correct export from all materials applied to the correct meshes.

MultiMaterialExport.zip

StjerneIdioten commented 4 years ago

Hmm, this is strange. Looking through the i3d file I see the following: image image

But inside of GE they are all sharing the same material for some reason? There are no errors in the import log of GE or anything, this is very strange.

StjerneIdioten commented 4 years ago

I just tested it. Turns out that it isn't anything to do with the exporter. I tried changing one material and GE would then use both materials. So it seems that if you have two (or more) identical materials, but with different names, GE will just ignore the fact that they are two different materials and just use whichever material it encountered first for all objects that might have used a "twin" material.

I am closing this and filing it under Giants Engine Quirks :-)