Print at Dec 19, 2025, 10:18:52 AM

Posted by Keet at Nov 12, 2023, 10:23:46 AM
Move light power setting from object to property
Would it be possible to move the power setting for a light source to the light property (lightSourceMaterial) and not on the object itself?

Example: I created some led numbers but it is impossible to create a single object of seven led segments that can be turned on and of individually to form the desired number. This is because you only have one power setting on the object, i.e. the combined seven segments. If I could set a different lightSourceMaterial for each segment AND set a different power for each segment any number can be formed with a single object. The main goal of course is to get that single object for a number that can be added to a furniture library (ok, a clock with four numbers).

This is just one example but basically you can't have more than one light source on any object. I can think of many objects that would have multiple light sources if it was possible. (Buttons and ceiling lights for an elevator, ceiling light with multiple light points, different lights on a car, a digital clock, etc.)

Currently power and lightSourceMaterial are organized like this in the Home.xml file:
<light id='light-36553848-02d2-44f7-9765-1e438b0f752d' ....
power='0.5'>
<lightSourceMaterial name='spot'/>
</light>
If I understand it correctly 'light' before 'id' is needed to indicate a light source, 'power' is to set the intensity, and 'lightSourceMaterial' sets the material property that is the light. <light ... </light> might already limit the object to a single light but should not be needed because the 'lightSourceMaterial' already indicates that there's a light.

Depending on how Sweet Home 3D and photo renderers handle the data node it might look like this:
<light id='light-36553848-02d2-44f7-9765-1e438b0f752d' ...
<lightSourceMaterial name='spot1' power='0,5'/>
<lightSourceMaterial name='spot2' power='0,5'/>
<lightSourceMaterial name='spot3' power='0,5'/>
</light>

I understand that because of backward compatibility this is impossible but maybe it is possible to introduce a second type of lights that does implement the suggested format. It does require a different Modify Furniture dialog to allow for setting the power on a property (lightSourceMaterial) and not on the whole object.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects