Print at Dec 17, 2025, 1:46:39 PM

Posted by Finnithnel at Mar 20, 2016, 5:13:28 PM
Problems creating a light
Hi,

I'm trying to create a model for the Ikea Knappa lamp : http://www.ikea.com/fr/fr/catalog/products/50070651/

I created a Knappa.sh3f archive containing the file :
- PluginFurnitureCatalog.properties (code below)
id#1=Knappa
name#1=Knappa
tags#1=Hanging
creationDate#1=2016-03-18
category#1=Lights
icon#1=/models/knappa.png
model#1=/models/knappa.obj
width#1=46.0
depth#1=46.0
height#1=35.9
dropOnTopElevation#1=-1
movable#1=true
doorOrWindow#1=false
multiPartModel#1=true
lightSourceX#1=23.0 23.0
lightSourceY#1=23.0 23.0
lightSourceZ#1=19.0 19.0
lightSourceColor#1=#b2b279 #b2b279
lightSourceDiameter#1=3.0 46
elevation#1=214.1
creator#1=Finnithnel


and the folder "models" containing 3 files :
- knappa.obj (from blender)
- knappa.png (rendered with blender)
- knappa.mtl (containing code below)
newmtl Ampoule
Ka 1.0000 1.0000 1.0000
Kd 1.0000 1.0000 1.0000
Ks 1.0000 1.0000 1.0000
Tf 1.0000 1.0000 1.0000
Ns 40
Ni 1.0000
illum 2
d 0.85

newmtl Fleur
Ka 1.0000 1.0000 1.0000
Kd 1.0000 1.0000 1.0000
Ks 1.0000 1.0000 1.0000
Tf 1.0000 1.0000 1.0000
Ns 800
Ni 0.1000
illum 7

newmtl Support
Ns 128.0
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
illum 2


My main problem is that I'm unable to get a good render inside sweethome3d
=> When I use only 1 light source with 3.0 diameter, the lamp is rendered correctly (with shadows and so on) but the room get nearly no light (light is filtered by the lamp part)
=> When I "cheat" by adding another light source of 46 diameter (same as lamp size), then the room is correctly lighted, but the render of the lamp is awfull as it receive light from outside

I tried using Tf 1.0 to not filter anything, then a low Ni to let the light get through the lamp, but no matter how I change the settings, the only visible result is when the "illum" parameter is changed; and the result differ but is still not good

Any expert could help me to solve this ?