|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Is Sunflow limited in Sweet Home 3D? |
||
| Print at Dec 15, 2025, 7:33:25 PM |
|
|
| Posted by enkonyito at May 4, 2018, 6:38:06 AM |
|
Re: Is Sunflow limited in Sweet Home 3D? When I apply the RGB color #91895E (9537886 in decimal) to the furniture, the HomePieceOfFurniture.getColor() or HomeMaterial.getColor() method returns -7239330 (in decimal). How can I convert this signed integer to an unsigned integer? The value -7239330, processed by this.sunflow.parameter("radiance", null,---------------------------------------- EnkoNyito |
| Posted by ndorigatti at May 4, 2018, 4:04:43 PM |
|
Re: Is Sunflow limited in Sweet Home 3D? Hi, looking online: #91895E is rgb(145, 137, 94) if I take the negative value: int negative = -7239330;the output is: 145 137 94 |
| Posted by Puybaret at May 4, 2018, 5:34:23 PM |
|
Re: Is Sunflow limited in Sweet Home 3D? Hum, I think you should learn how to handle colors with hexadecimal or binary notation, rather than like integers... enkonyito, your code should be: this.sunflow.parameter("radiance", null,You need to apply a 0xFF filter on the color bits after they are shifted from 16 bits, because the 8 higher bits may contain the transparency value, 0xFF being a full opaque value. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by enkonyito at May 5, 2018, 2:23:37 AM |
|
Re: Is Sunflow limited in Sweet Home 3D? Thank you both, I get the right color now! I think that the TriangleMeshLight class does not allow to have a visible object in the 3D view and that is not visible in the rendering. ![]() ---------------------------------------- EnkoNyito |
| Posted by enkonyito at May 10, 2018, 1:35:02 AM |
|
Re: Is Sunflow limited in Sweet Home 3D? I think that the TriangleMeshLight class does not allow to have a visible object in the 3D view and that is not visible in the rendering. I solved this problem by adding the sweethome3d_light prefix. ![]() Light type libraries will be provided with the next version of the plug-in. ---------------------------------------- EnkoNyito |
| Posted by Puybaret at May 11, 2018, 1:22:57 PM |
|
Re: Is Sunflow limited in Sweet Home 3D? Just to be sure that you used it correctly, the sweethome3d_light prefix is used to name shapes like light sources that should be visible in the 3D view only when selected. ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by enkonyito at May 11, 2018, 9:05:48 PM |
|
Re: Is Sunflow limited in Sweet Home 3D? Yes exactly and not viewable when rendering. That's what I was trying to get from the start. Now I can have several models that can be used as needed. Differentiation is done at the object's properties and processed by the PhotoRenderer class. ---------------------------------------- EnkoNyito |
|
|
|
Current timezone is GMT Dec 15, 2025, 7:33:25 PM |