Print at Dec 16, 2025, 12:33:08 PM

Posted by Puybaret at Nov 8, 2023, 10:07:33 AM
Re: How to obtain the ID of a light source
As light sources are not exported in OBJ file, you won't find them without a trick.
If you want them in the exported OBJ file, you'll have to change the "original ID" of light sources in the OBJ file where they were defined. If you look in your SH3D file with a ZIP tool, you'll find some numbered files and one of them is a file at OBJ format containing the text g sweethome3d_light_source (to find it more easily, move the light sources at the beginning or the end of furniture list, and study the first or last numbered files).
Remove the prefix sweethome3d_ in that text, remove the entry named ContentDigests in the SH3D file and save the SH3D file (you may change temporarily the .sh3d extension to .zip if needed). Then if you open your file in Sweet Home 3D, light sources will always be displayed and exported to OBJ format (but they will also appear in renderings).
The file attached to this message shows what result you'll get (the OBJ file of the light source is stored in the ZIP entry named 7).
----------------------------------------
Attachment AlwaysVisibleLightSources.sh3d (55770 bytes) (Download count: 31) (Always visible light sources)

----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator