Print at Jan 30, 2026, 2:09:38 AM

Posted by Keet at Dec 6, 2024, 10:35:24 AM
Re: Help creating new object & light source from scratch
Great that you have managed to get your brace as you wanted it!

I named the FILE:'Structural Brace'

In the obj. file for it one of the top lines says,
'mtllib Structural_Brace.mtl'

This is just a tag to find it in the library, isn’t it?
I cut and paste the file name into the obj. text when needed. I don't know if my not using any underscores was causing a problem?
I think I understand how the obj. and mtl. Files work with each other, and that I have to use the same object name between them, but can the file name be something different? Can I use ‘Structural Brace with Light’ as the file name, and eventually what it’ll be listed as in SH3D, if I use ‘light’ and ‘brace’ for the internal file purposes within those files?
In general try to avoid spaces in object names. Use an underscore or use camel casing (i.e. "CamelCasing") by leaving out the spaces.
The line "mtllib ..." in the obj file is a reference to the .mtl file. The object importer looks for the material references on the "usemtl" lines in the mtl file as mentioned in the "mtllib" line. If it doesn't find the mtl file all materials will be reduced to a single material "default" with a grey color. Generally file names with spaces are handled graciously but it's better to avoid problems in the first place by simply not using spaces. And don't forget that all names are case-sensive in obj and mtl files.
The actual name that shows in the catalog is the name you give in the Furniture Library and that can be anything you want. Your obj and mtl file could be named xyz.obj and xyz.mtl and in the Library you can name it "Structural Brace", that's what will show in the catalog.
In short, you could name your brace object 'brace', your light 'light', and the combination 'brace_and_light'. Then in the Furniture Library you can set the name you want to show in the catalog in Sweet Home 3D.

Getting a bunch of old file names can get confusing. I often use the name 'tmp' while developing a piece of furniture or part of it and keep overwriting it until I get something that 'deserves' its own name. Then I start the next part and start using the 'tmp' name again. This avoids having an endless stream of old files but you have to know what you are doing because you are overwriting previous exports. You could lose something you didn't want to lose.

I don’t understand how the files work together. When I bring an item into Furniture Library Editor, is the program only drawing on the data stored in the SH3F file?
When you import an object into a Furniture Library a copy is added to the Library zip file (the .sh3f file). You could delete the original obj file and the Library would still retain it. The same happens with your project file (.sh3d) files, that's also a zip file that contains a copy of the objects you added to your project. Essentially that's why it grows in size when you add furniture. Both the Library and your project file add extra's: the library extra properties like the lightSourceMaterialName and the project file adds things like object size, position, elevation, colors you changed, etc.

You will have to develop your own system in how you manage all the different files. Here's what I do but every designer has his own way of organizing.

I create all furniture in parts, mostly using the name 'tmp' to avoid file clutter. Only when a part is finished I give it a name and start the next part using the same method. Working with parts makes it easy to change material names, either by manual edit or in Blender.
In most cases there are steps where a few parts are combined to create a sub-part. All sub parts together form the endresult. That endresult is exported with a final name. Usually there are several edits in obj and mtl files and I often export/import between Sweet Home 3D and Blender for specific edits. I use Blender mostly to easily optimize objects by combining groups into a single group and to smooth surfaces. (Smoothing is something Sweet Home 3D can't do. It's primarily a house and interior design application, not a 3D modelling application.)
When the endresult is really finished I zip the obj and mtl files along with the textures used in the object. That zip I move to a subdirectory 'zip'. When I'm ready to add furniture to a library I import the zipped objects from the zip directory and set the additional properties in the Library.

At the end of each day I zip the complete project directory I have been working in with yyyymmdd added in the zip file name and backup the zip to two different drives, one external. Then I update the original project file with a new version number. (My project files are al named like 'ProjectFileName-v0.0.sh3d'. This method avoids having a bunch of project file copies in my working directory while I still have the old ones as backups if I ever need them.

For any other questions not related to the Brace and Light start a new thread. Good Luck!
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects