Print at Feb 28, 2026, 2:17:38 AM

Posted by Keet at Feb 24, 2026, 8:20:32 AM
Re: Problem with optimisation
My intention was when I need to change a material only to do that in one file.
While developing you can do that (as you did) with one mtl file that is used by multiple obj files. I am currently doing that with multiple LED numbers that all use the same mtl file: Ten object files LED0...LED9 and a single LED.mtl file.

What happens when you add your obj file to a Sweet Home 3D project or a library file:
Importing all object files stores all these in the Home.xml file of the Sweet Home 3D project. But it also creates a new mtl file for each obj file with the same name as the obj file: there is no longer a shared mtl file once imported.
Exactly the same happens when you import in a library file: each obj file gets its own mtl file with the same name as the obj file.

With a mtl file that is not in the same directory the same happens: after import each obj file has its own mtl file with the same name as the obj file stored in the project or library file (together in a single directory).

If the importer can't find the referenced mtl file it creates a new mtl file for the obj file with a single material 'default'. That is likely what happened to your obj files. You can check that by opening the .sh3f library file with a zip program. It will list numbered directories that hold the objects stored in the library. Check these directories and the containing obj/mtl files and the contents of the mtl file will tell you if there are correct materials listed. It's the same for the Sweet Home 3D .sh3d project file.

The one thing to remember is that once imported each obj file has its own mtl file.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects