I3D-Blender-Addon icon indicating copy to clipboard operation
I3D-Blender-Addon copied to clipboard

No warning when mergegroup objects have multiple materials

Open StjerneIdioten opened this issue 3 years ago • 3 comments

Describe the bug The exporter does not show a warning when an object exported as part of a mergegroup, has multiple materials. This leads to having multiple subsets on merge group shapes objects, and that makes GE crash instantly.

StjerneIdioten avatar Nov 08 '20 18:11 StjerneIdioten

I found that if you try to export two meshes as a merge group, and they have different materials, you end up with one mesh (with its own material, but no child mesh) and one empty that's just an empty. If they're set to the same material, it works fine.

However, the Giants exporter will happily export a merged mesh where the individual meshes have separate materials. Both materials get assigned to the actual-mesh, and it works fine.

Kieruss avatar Sep 09 '22 11:09 Kieruss

While the Giants Exporter will export this, this method is not recommended. Even Giants themselves did not allow a mesh with two materials at release of FS22.

ssnd292 avatar Sep 09 '22 11:09 ssnd292

I guess I could make it add two materials to the parent object and then only "paint" the vertices that the material came from before merge, but as Redphoenix mentions it's not exactly recommended. Without bothering to look it up too much atm I seem to recall that it would increase drawcalls or something since you have multiple materials? In any case if it didn't hurt performance at all then we wouldn't need the vehicleshader and the UV trickery 😆

StjerneIdioten avatar Sep 09 '22 19:09 StjerneIdioten