<?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: rgb for PLANE? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244562#M4101</link>
    <description>DEFINE MATERIAL "material_matte" 2, red, green, blue&lt;BR /&gt;
Did you mean this?</description>
    <pubDate>Sun, 14 Feb 2021 22:32:07 GMT</pubDate>
    <dc:creator>Jochen Suehlo</dc:creator>
    <dc:date>2021-02-14T22:32:07Z</dc:date>
    <item>
      <title>rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244561#M4100</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi,&lt;BR /&gt;Playing with planes. How do I assign the planes an rgb colour? /M&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 11:23:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244561#M4100</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2021-09-14T11:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244562#M4101</link>
      <description>DEFINE MATERIAL "material_matte" 2, red, green, blue&lt;BR /&gt;
Did you mean this?</description>
      <pubDate>Sun, 14 Feb 2021 22:32:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244562#M4101</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2021-02-14T22:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244563#M4102</link>
      <description>wow Mats! your playing is pretty crazy, would scare most of the kids out of the park.&lt;BR /&gt;
&lt;BR /&gt;
To assign an rgb colour to the planes you have to define the "material" in the master script. Simple RGB material definitions are quite simple, below is the logic and an example:&lt;BR /&gt;
&lt;BR /&gt;
define material &amp;lt;name&amp;gt; &amp;lt;type&amp;gt;,&lt;BR /&gt;
	r, g, b&lt;BR /&gt;
&lt;BR /&gt;
The definition can get more complex with more values if you want to control "shininess", "transparency" and alike. This is determined by the &amp;lt;type&amp;gt; value. if you just want the rgb values then choose a &amp;lt;type&amp;gt; value between 2 and 7:&lt;BR /&gt;
2: matte&lt;BR /&gt;
3: metal&lt;BR /&gt;
4: plastic&lt;BR /&gt;
5: glass&lt;BR /&gt;
6: glowing&lt;BR /&gt;
7: constant&lt;BR /&gt;
&lt;BR /&gt;
The rgb values are in the range of 0 - 1, so typically I write them as a fraction of 255 (eg 194/255, 72/255, 44/255). Though for the example below I have just used the 1 and 0 because its a straight red colour.&lt;BR /&gt;
This is my red clearance space using the glass &amp;lt;type&amp;gt; to make it transparent.
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;define material "Clearance Surface" 5,
	1, 0, 0
&lt;/PRE&gt;

You do this in the master script and then you set the material in the 3D script using &lt;PRE&gt;material "Clearance Surface"&lt;/PRE&gt;

Is the image you sent a single object? if so you may want to set the rgb value to an array parameter with 3 columns (r, g and b) and a separate row for each plane. Then you will have to definite the material in the 3D script so the one material can have varying results using loop function and referencing the array. actually this might not work as it might say that the material has already been defined. If thats the case then you could perhaps make the name of the material also a variable based on the loop number (eg "Plane Surface " +str(n, 1, 0). I haven't tested this logic yet but it works for GROUP statements.</description>
      <pubDate>Sun, 14 Feb 2021 22:39:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244563#M4102</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2021-02-14T22:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244564#M4103</link>
      <description>Be aware that you can't define too many materials. Enough for a few hundred colors from a palette, but not for smooth multi-color gradients.</description>
      <pubDate>Mon, 15 Feb 2021 18:33:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244564#M4103</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2021-02-15T18:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244565#M4104</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;
Be aware that you can't define too many materials. Enough for a few hundred colors from a palette, but not for smooth multi-color gradients.
&lt;/BLOCKQUOTE&gt;
Does that apply to materials contain within a GDL object (not MASTER_GDL) that doesn't populate the attribute list, or is it just for attribute list materials?</description>
      <pubDate>Mon, 15 Feb 2021 21:04:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244565#M4104</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2021-02-15T21:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244566#M4105</link>
      <description>Yes, inline materials too, combined for all objects.</description>
      <pubDate>Thu, 18 Feb 2021 11:06:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244566#M4105</guid>
      <dc:creator>Peter Baksa</dc:creator>
      <dc:date>2021-02-18T11:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244567#M4106</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;
Yes, inline materials too, combined for all objects.
&lt;/BLOCKQUOTE&gt;
Thanks</description>
      <pubDate>Thu, 18 Feb 2021 22:14:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244567#M4106</guid>
      <dc:creator>Kristian Bursell</dc:creator>
      <dc:date>2021-02-18T22:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: rgb for PLANE?</title>
      <link>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244568#M4107</link>
      <description>&lt;BLOCKQUOTE&gt;Kristian wrote:&lt;BR /&gt;
wow Mats! your playing is pretty crazy, would scare most of the kids out of the park.&lt;BR /&gt;
&lt;BR /&gt;
To assign an rgb colour to the planes you have to define the "material" in the master script. Simple RGB material definitions are quite simple, below is the logic and an example:&lt;BR /&gt;
&lt;BR /&gt;
define material &amp;lt;name&amp;gt; &amp;lt;type&amp;gt;,&lt;BR /&gt;
	r, g, b&lt;BR /&gt;
&lt;BR /&gt;
The definition can get more complex with more values if you want to control "shininess", "transparency" and alike. This is determined by the &amp;lt;type&amp;gt; value. if you just want the rgb values then choose a &amp;lt;type&amp;gt; value between 2 and 7:&lt;BR /&gt;
2: matte&lt;BR /&gt;
3: metal&lt;BR /&gt;
4: plastic&lt;BR /&gt;
5: glass&lt;BR /&gt;
6: glowing&lt;BR /&gt;
7: constant&lt;BR /&gt;
&lt;BR /&gt;
The rgb values are in the range of 0 - 1, so typically I write them as a fraction of 255 (eg 194/255, 72/255, 44/255). Though for the example below I have just used the 1 and 0 because its a straight red colour.&lt;BR /&gt;
This is my red clearance space using the glass &amp;lt;type&amp;gt; to make it transparent.
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;define material "Clearance Surface" 5,
	1, 0, 0
&lt;/PRE&gt;

You do this in the master script and then you set the material in the 3D script using &lt;PRE&gt;material "Clearance Surface"&lt;/PRE&gt;

Is the image you sent a single object? if so you may want to set the rgb value to an array parameter with 3 columns (r, g and b) and a separate row for each plane. Then you will have to definite the material in the 3D script so the one material can have varying results using loop function and referencing the array. actually this might not work as it might say that the material has already been defined. If thats the case then you could perhaps make the name of the material also a variable based on the loop number (eg "Plane Surface " +str(n, 1, 0). I haven't tested this logic yet but it works for GROUP statements.
&lt;/BLOCKQUOTE&gt;

Thanks Kristian!&lt;BR /&gt;
I'll try this when I'm back from skiing holidays.  I now understand I need a material...was hoping I could just use a colour without having to create a material. My not so genius plan was to add colour definitions in a stack with PUT.</description>
      <pubDate>Sat, 20 Feb 2021 10:50:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/rgb-for-PLANE/m-p/244568#M4107</guid>
      <dc:creator>Mats_Knutsson</dc:creator>
      <dc:date>2021-02-20T10:50:51Z</dc:date>
    </item>
  </channel>
</rss>

