License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Lamp Color

Dwight
Newcomer
How does the GDL lamp obtain its color from the color sampler wheel? I don't see anything in the script that makes the reference......
Dwight Atkinson
8 REPLIES 8
Aussie John
Newcomer
double click the colour button to bring up the colour wheel.
The lamp uses RBG as defined by
LIGHT_RED
LIGHT_GREEN
LIGHT_BLUE

Dwight, Im not sure if that has answered your query
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Dwight
Newcomer
This is a scripting query - probably built in to the system somehow....

How is it done by the script?
What makes the object reference work?
Dwight Atkinson
Aussie John
Newcomer
by the 3 global variables I guess
dont you ever sleep btw?
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Dwight
Newcomer
I am awake through caffeine and desperation. AAAAARGH.

Took on this animation project because I was greedy and I am eating the black bird raw with feathers because I am such an idiot and am making stupid mistakes that eat time. Trying to pay for the 30" cinema display with one "simple" job. AAAAAAAARGH.

Never mind obsequious approach to difficult client who changes mind on a whim, not that I am alone on this forum with such people. I imagine the suave method our AA uses with his clients. AAAAARGH.

For instance - just blew twelve hours worth of animation [not that it was "work" thanks to the dual G5] by trying to save on render time by turning anti-aliasing and method down to just over basic. Granite counter tops and persian carpets all sparkly and dancing. AAAAAARGH.

I am a napper. Anytime.

PS: You are playing the steel guitar - Is it "Sweet Lailani" or "Yer Cheatin' Heart?" Just to see if you are Hawaiian or Country [have to be careful with the spelling of that word - Could get censored like I was talking about Emmy Lou Harris or something.]
Dwight Atkinson
Aussie John
Newcomer
More of a banjo dobro kinda gut these days and in the country camp
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Aussie John
Newcomer
yes doesnt seem to matter how many times one renders a scene there is something not quite right
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
David Maudlin
Rockstar
dwight wrote:
How does the GDL lamp obtain its color from the color sampler wheel? I don't see anything in the script that makes the reference......
Dwight:

I had created some lights years ago, to get an understanding of how lights worked in ArchiCAD. For typical lights, it is the first 3 parameters of the LIGHT command that control the color. I took a brief look at the SunObject and the GDL Reference Guide, and see that additional parameters can be added to the LIGHT command for the LightWorks rendering engine. From the GDL Reference Guide:

LIGHT red, green, blue, shadow,
radius, alpha, beta, angle_falloff,
distance1, distance2,
distance_falloff [ ADDITIONAL_DATA name1 = value1,
name2 = value2, ...]


The Sun Object is using the Additional_Data to get the light color values. From the SunObject:

light 0, 0, 0, ! RGB
0, ! shadow on/off
100, ! light cone radius
0,0, ! cone angle inner - outer
0, ! angle falloff
0,100, ! light start - stop
0 ADDITIONAL_DATA lwa_light = "LWA_LIdistant",
LWA_LIdistant_color = sunRGB,
LWA_LIdistant_colortemp = 6500,
LWA_LIdistant_intensity = Intensity,
LWA_LIdistant_intensityunits = "LWA_empirical",
LWA_LIdistant_location = lightLocation,
LWA_LIdistant_to = lightTo,
LWA_LIdistant_shadowtype = "LWA_hard",
LWA_LIdistant_shadows = gs_lwa_cast_shadows,
LWA_LIdistant_shadowtrans = 1,
LWA_LIdistant_scattering = 0


So it looks like the "LWA_LIdistant_color" is the parameter for light color. HTH.
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
Karl Ottenstein
Moderator
Dwight wrote:
How does the GDL lamp obtain its color from the color sampler wheel? I don't see anything in the script that makes the reference......
The RGB values of the color picker in a lamp object settings dialog are put into the D, E, G parameters. For these, and the LW parameters, see:

http://www.graphisoft.com/support/developer/documentation/wide/LibraryDevKit/Lamp/Lamp.html

Given the LW params in the above doc, find their meanings/types (via search/find) in:
http://www.graphisoft.com/support/developer/documentation/wide/LibraryDevKit/LightWorksIntegration/L...

An overview of defining LW lamps etc is in:
http://www.graphisoft.com/support/developer/documentation/wide/LibraryDevKit/LightWorksIntegration/L...

In particular, if passing an RGB value as a LW parameter note the following (an array is needed to hold the RGB values):
Passing color and point parameters
When adding a color or a point parameter to a lightsource, you have to create an array as you see it in the following contracted example:

DIM colorRGB[3]
colorRGB[1] = D
colorRGB[2] = E
colorRGB[3] = F

light D * G/80, E * G/80, F * G/80,
...
distFalloff ADDITIONAL_DATA lwa_light = "LWA_LIgsspot",
...
LWA_LIgsspot_color = colorRGB,
...
Good luck, buddy!

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB