<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Basic Light Code in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252593#M2876</link>
    <description>&lt;BLOCKQUOTE&gt;vfrontiers wrote:&lt;BR /&gt;
When zz=255 no light showed in the scene..
&lt;/BLOCKQUOTE&gt;

So long as gs_color_red, gs_color_green, gs_color_blue are all in the range 0 to 255, then it should work fine I would have thought.&lt;BR /&gt;
If all three colours are 0 (zero) the light would be black and all 3 colours at 255 would be white.&lt;BR /&gt;
Any colour values below zero or above 255 would result in an incorrect light colour (RGB).&lt;BR /&gt;
&lt;BR /&gt;
I just tested with this and it worked fine.&lt;BR /&gt;
&lt;BR /&gt;
zz = 255&lt;BR /&gt;
lint = gs_light_intensity/100&lt;BR /&gt;
&lt;BR /&gt;
LIGHT (255/zz)*lint, (255/zz)*lint, (255/zz)*lint,&lt;BR /&gt;
1, ! shadow on&lt;BR /&gt;
1.0, ! radius&lt;BR /&gt;
45.0, 60.0, ! angle1, angle2&lt;BR /&gt;
0.3, ! angle_falloff&lt;BR /&gt;
1.0, 10.0, ! distance1, distance2&lt;BR /&gt;
0.2 ! distance_falloff&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Of course the object has to have a subtype of 'Light' and you can only see it in a render with the light option turned on.&lt;BR /&gt;



&lt;BR /&gt;
Barry.</description>
    <pubDate>Fri, 19 Mar 2021 01:48:27 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2021-03-19T01:48:27Z</dc:date>
    <item>
      <title>Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252590#M2873</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;STRONG&gt;I cannot seem to get what I want out of the basic light code as presented in the GDL Manual...&lt;BR /&gt;All is fine... until I want intensity to be greater than 100... The light simply does not shine at all..&lt;BR /&gt;&lt;BR /&gt;In backward engineering from a recessed can by graphisoft, they divide each color by 255... But that produces nothing for me either (no light)&lt;BR /&gt;&lt;BR /&gt;All GS lights support intensity values to 200...&lt;BR /&gt;&lt;BR /&gt;(the reason this is important is the way ENSCAPE handles lighting)&lt;BR /&gt;&lt;BR /&gt;here's my code...(some transformations are irrelevant)&lt;/STRONG&gt;&lt;BR /&gt;
&lt;PRE&gt;!!!--------- Duane's Basic Light 1 ----------
lint = gs_light_intensity/100
zz = 1
if gs_light_intensity &amp;gt; .00000000001 THEN
	ADDX A/2
	ADDY .29*B
	roty 90
	addx 1"
	rotx Lt1X
	roty Lt1Y

	if SR then	lin_ 0,0,0,1',0,0



	LIGHT (gs_color_red/zz)*lint, (gs_color_green/zz)*lint, (gs_color_blue/zz)*lint, 1,
	a/4, alpha, beta, angle_falloff,
	distance_1, distance_2,
	distance_falloff &lt;/PRE&gt;
&lt;BR /&gt;Any advice is welcome....&lt;BR /&gt;For now, I can live with 100max... but am curious why/how gs lights achieve more.&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:44:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252590#M2873</guid>
      <dc:creator>vfrontiers</dc:creator>
      <dc:date>2021-09-14T07:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252591#M2874</link>
      <description>The RGB colours need to be values between 0.0 &amp;amp; 1.0&lt;BR /&gt;
The pen colour can be up to 255, so you divide the pen colour by 255 to get the 0.00 - 1.0 value.&lt;BR /&gt;
I think your code needs to be this...&lt;BR /&gt;
&lt;BR /&gt;
color_red = Red_pen_value/255&lt;BR /&gt;
color_green = Green_pen_value/255&lt;BR /&gt;
color_blue = Blue_pen_value/255&lt;BR /&gt;
&lt;BR /&gt;
 LIGHT lint*color_red,   lint*color_green,  lint*color_blue, 1,&lt;BR /&gt;
a/4, alpha, beta, angle_falloff,&lt;BR /&gt;
distance_1, distance_2,&lt;BR /&gt;
distance_falloff  &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 18 Mar 2021 15:13:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252591#M2874</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2021-03-18T15:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252592#M2875</link>
      <description>Thanks Barry...&lt;BR /&gt;
&lt;BR /&gt;
That is the logic I followed...&lt;BR /&gt;
&lt;BR /&gt;
I used my zz as a mulitiplier (or DIVIDER, in this case)... When zz=255 no light showed in the scene..&lt;BR /&gt;
&lt;BR /&gt;
I'll keep testing...</description>
      <pubDate>Thu, 18 Mar 2021 17:39:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252592#M2875</guid>
      <dc:creator>vfrontiers</dc:creator>
      <dc:date>2021-03-18T17:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252593#M2876</link>
      <description>&lt;BLOCKQUOTE&gt;vfrontiers wrote:&lt;BR /&gt;
When zz=255 no light showed in the scene..
&lt;/BLOCKQUOTE&gt;

So long as gs_color_red, gs_color_green, gs_color_blue are all in the range 0 to 255, then it should work fine I would have thought.&lt;BR /&gt;
If all three colours are 0 (zero) the light would be black and all 3 colours at 255 would be white.&lt;BR /&gt;
Any colour values below zero or above 255 would result in an incorrect light colour (RGB).&lt;BR /&gt;
&lt;BR /&gt;
I just tested with this and it worked fine.&lt;BR /&gt;
&lt;BR /&gt;
zz = 255&lt;BR /&gt;
lint = gs_light_intensity/100&lt;BR /&gt;
&lt;BR /&gt;
LIGHT (255/zz)*lint, (255/zz)*lint, (255/zz)*lint,&lt;BR /&gt;
1, ! shadow on&lt;BR /&gt;
1.0, ! radius&lt;BR /&gt;
45.0, 60.0, ! angle1, angle2&lt;BR /&gt;
0.3, ! angle_falloff&lt;BR /&gt;
1.0, 10.0, ! distance1, distance2&lt;BR /&gt;
0.2 ! distance_falloff&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Of course the object has to have a subtype of 'Light' and you can only see it in a render with the light option turned on.&lt;BR /&gt;



&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 19 Mar 2021 01:48:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252593#M2876</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2021-03-19T01:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252594#M2877</link>
      <description>I guess my light was technically working... now the issue (which I'm not really going to pursue) is why Graphisoft lights work up to a 200% brightness... and I can only achieve up to 100%.&lt;BR /&gt;
&lt;BR /&gt;
Again, this is only an issue because of ENSCAPE... It's lighting model seems to require lights above 100% to be effective.  &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks for listening!</description>
      <pubDate>Wed, 31 Mar 2021 14:45:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252594#M2877</guid>
      <dc:creator>vfrontiers</dc:creator>
      <dc:date>2021-03-31T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252595#M2878</link>
      <description>Hi vfrontiers,&lt;BR /&gt;
&lt;BR /&gt;
The LIGHT command can only use RGB values between 0-1. The GS light objects calculate rgb using an intensity parameter. For the rgb values any intensity above 100 is used as 100 in the calculation.&lt;BR /&gt;
100-200 is used only in ADDITIONAL_DATA for the c4d engine, independently from the rgb color.&lt;BR /&gt;
Here is some information about the c4d parameters: &lt;A href="http://gdl.graphisoft.com/gdl_other_docs/channel-details" target="_blank"&gt;&lt;LINK_TEXT text="http://gdl.graphisoft.com/gdl_other_doc ... el-details"&gt;http://gdl.graphisoft.com/gdl_other_docs/channel-details&lt;/LINK_TEXT&gt;&lt;/A&gt;</description>
      <pubDate>Tue, 06 Apr 2021 07:25:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252595#M2878</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2021-04-06T07:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Light Code</title>
      <link>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252596#M2879</link>
      <description>Thank you Peter... I figured there was some SECRET somewhere...&lt;BR /&gt;
&lt;BR /&gt;
I guess the "good news" is that ENSCAPE sees and allows that parameter to be over 100 and creates more light accordingly...&lt;BR /&gt;
&lt;BR /&gt;
I'll have to look at that code and see if I can use it in my lights</description>
      <pubDate>Mon, 12 Apr 2021 16:54:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Basic-Light-Code/m-p/252596#M2879</guid>
      <dc:creator>vfrontiers</dc:creator>
      <dc:date>2021-04-12T16:54:47Z</dc:date>
    </item>
  </channel>
</rss>

