Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Taking control over lamp in Bed Layout.gsm

Anonymous
Not applicable
How can I take control over night table lamp light settings in standard Bed Layout.gsm ?

I'm rendering 156 interior scenes (marketing purpose) with Maxwell Render using Maxwell's Plugin and I cannot force thoes night table lamps to be switched off.
It would be great if I could equip dozens night tables I have with lamps just by "one click" rather than placing all of them manually as separate gdl object (which can be swithed off, and its working in maxwell) on every night table.

I've tried editing part of the script responsible for lamp settings(in Bed Layout.gsm), but even when I've turned everything "off" and set up all light values to "0" (attached image) it still glowing as in the beginning.
I must admit, I don't know much about gdl language, but with some sense of observation and comparision - I did my best 😉

{I also had some other problem/observation using Maxwell Plugin - imo maxwell does not fully support Light Intensity settings (this one with slider): setting its value to "1" gives same result as "50" or even "100" (if it's true - perhaps my post should go to "Presentation - Rendering and Multimedia"..) or maybe I'm basically doing something wrong?..}

Any ideas?

mod.JPG
10 REPLIES 10
David Maudlin
Rockstar
Bartek:

The problem is that the object is CALLing the desk_lamp_04_m object when the lamps are shown, these are LAMP objects that have their lights on by default, but the parameter for turning the light on & off (as well as the other Light parameters) was not added to the CALLing statement (which is why these parameters are hidden for the bed object, as shown in your screen shot by the "X"s next to these parameters).

You have a couple options:
1. Do not show the lamps as part of this object, add them as their own objects so you have control over the light options (easiest).
2. Add the relevant Light parameters to the object call (the lamps are called twice, at lines 36 and 61 of the 3D Script), then show these parameters in the object by clicking on the "X" next to the parameters (involves GDL scripting).

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
David,
thanks for quick reply. Unfortunetly I didn't had time last couple of days but, I'm sure I'll try method involving GDL scripting, since I know where to start looking for my solution (I'd rather avoid placing manually more than 800 lamps 😉)
Another option would be to just save or publish a 'bed layout module' with the bed, side tables, and whatever lamps you like, and place that into the floor plan (which you can then multiply, copy paste, rotate and mirror, as needed).

That would have the advantage of not needing any GDL and tampering with standard libraries, and also lets you to put the lamp in a separate layer.
Gergely Feher
Graphisoft
Graphisoft
As David said, the problem is about the macro calls. Change the call of desk lamp macros: you need to paste c = c and g = g lines to them, like this:
	call "desk_lamp_04_m" parameters all stType	= stType,
								bCalledAsMacro	= 1,
								a				= lampDiameter,
								b				= lampDiameter,
								c				= c,
								g				= g,
								a2				= a2,
								zzyzx			= lampHeight,
								unIDStart		= 1000,
								stDetLevel3d	= stDetLevel3d

After fixed the macro calls you just release the hidden light parameters in bed layout object and it will work fine.

I hope this fix will be shipped with the next library hotfix.
_________________
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE
Anonymous
Not applicable
Ignacio wrote:
Another option would be to just save or publish a 'bed layout module' with the bed, side tables, and whatever lamps you like, and place that into the floor plan (which you can then multiply, copy paste, rotate and mirror, as needed).

That would have the advantage of not needing any GDL and tampering with standard libraries, and also lets you to put the lamp in a separate layer.
yes, that sounds like the easiest way:)
Anonymous
Not applicable
luckly for my, we had trainee in our office for couple of days when I was on my holidays... so when I came back almost everything was done

but despite that I will try method mentioned by Gergely Feher (the easiest way is not always the best way ;P)

thank you all for your help!
Anonymous
Not applicable
Gergely wrote:
As David said, the problem is about the macro calls. Change the call of desk lamp macros: you need to paste c = c and g = g lines to them, like this:
	call "desk_lamp_04_m" parameters all stType	= stType,
								bCalledAsMacro	= 1,
								a				= lampDiameter,
								b				= lampDiameter,
								c				= c,
								g				= g,
								a2				= a2,
								zzyzx			= lampHeight,
								unIDStart		= 1000,
								stDetLevel3d	= stDetLevel3d

After fixed the macro calls you just release the hidden light parameters in bed layout object and it will work fine.

I hope this fix will be shipped with the next library hotfix.
maybe it's a stupid question, but can you tell me in which "part" of the script should I paste it? 3D Script or Parameter Script?
sorry, but I think I don't fully understand some relations inside gdl scripts..
David Maudlin
Rockstar
Bartek:

In the 3D Script, at lines 36 and 61, you will see a call statement similar to the code posted by Gergely Feher. His code has added parameters for control of the lamp (c & g). You will need to replace the calls in you script with the calls in his code. You will then need to unlock the C parameter in the main library part window by going to the Parameter Script, at line 129 and placing an "!" in front of the C parameter (similar to what you see at "gs_symbolType" a few lines above) then unhide the C & G parameters in the main library part window by clicking on the "X" symbol in the Display column. This will show and give control to the Light and Intensity parameters for the lamps for the object.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Anonymous
Not applicable
David,

Thank you, for this "step by step"! 😉 I've changed all thoes things you said and yes - it unlocked two addtional parameters.

As you can see on attached image (sorry for layout and yellowness;)) lights are still on after all changes.

I think problem can be somewhere between Archicad / Maxwell Plugin / Maxwell Render or I did something wrong 😉

I'll try to figure it out ad hoc next time when needed and post it here.