<?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 Inline defined materials don't appear properly in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Inline-defined-materials-don-t-appear-properly/m-p/341342#M1915</link>
    <description>&lt;P&gt;I am confused...&lt;/P&gt;
&lt;P&gt;1. same color for a single shape is shown differently.&lt;/P&gt;
&lt;P&gt;2. inner 3D view in gdl (during scripting, testing) and general 3D view in project doesn't match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Originally I wanted to define some materials, so despite AC language version or template, objects would look the same. Maybe there's another approach?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pen 1
_si=15

define material 'purpleUniqName' 2, 1, 0, 1


define material 'whiteUniqName' 1,
1, 1, 1,! surface RGB [0.0..1.0]
1, ! ambient coefficient [0.0..1.0]
1, ! diffuse coefficient [0.0..1.0]
1, ! specular coeff. [0.0..1.0]
0, ! transparent coeff. [0.0..1.0]
0, ! shining [0.0..100.0]
0 ! transparency atten. [0.0..4.0]

matWhite = IND (MATERIAL, 'whiteUniqName')
matPurple = IND (MATERIAL, 'purpleUniqName')


! material 'purpleUniqName'
! block 1,1,1 ! purple cube OK

add 2,2, 0
REVOLVE{2} 2, 0, 360, 4 + 8 + 256, matWhite, ! NOT OK -&amp;gt; receive purple colour from ABOVE !? if comment those 2 rows
0, 0.5, 0, matWhite, ! if matWhite=18 (instead of inline definition)
2, 0.5, 0, matWhite

add 2, 2, 0
cprism_{3} matPurple, matPurple, matPurple, 0, ! SHOULD be purple prism, though it has white sides
5, 2,
0, 0, 0, _si, matPurple,
0, 1, 0, _si, matPurple,
1, 1, 0, _si, matPurple,
1, 0, 0, _si, matPurple,
0, 0, 0, -1, matPurple

add 2, 2, 0
cprism_{3} matWhite, matWhite, matWhite, 0, ! SHOULD be white cube with yellow top&amp;amp;bottom
5, 2,
0, 0, 0, _si, matWhite,
0, 1, 0, _si, matWhite,
1, 1, 0, _si, matWhite,
1, 0, 0, _si, matWhite,
0, 0, 0, -1, matWhite

! add 2,2, 0
! material 'whiteUniqName'
! block 1,1,1 ! white cube OK

&lt;/LI-CODE&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/54969iB6455B5D4CD44169/image-size/large?v=v2&amp;amp;px=999" border="0" alt="defMat1.png" title="defMat1.png" /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/54970iAC1DBAA63C74D5D9/image-size/large?v=v2&amp;amp;px=999" border="0" alt="defMat2.png" title="defMat2.png" /&gt;</description>
    <pubDate>Fri, 17 Jun 2022 13:44:42 GMT</pubDate>
    <dc:creator>A_ Smith</dc:creator>
    <dc:date>2022-06-17T13:44:42Z</dc:date>
    <item>
      <title>Inline defined materials don't appear properly</title>
      <link>https://community.graphisoft.com/t5/GDL/Inline-defined-materials-don-t-appear-properly/m-p/341342#M1915</link>
      <description>&lt;P&gt;I am confused...&lt;/P&gt;
&lt;P&gt;1. same color for a single shape is shown differently.&lt;/P&gt;
&lt;P&gt;2. inner 3D view in gdl (during scripting, testing) and general 3D view in project doesn't match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Originally I wanted to define some materials, so despite AC language version or template, objects would look the same. Maybe there's another approach?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pen 1
_si=15

define material 'purpleUniqName' 2, 1, 0, 1


define material 'whiteUniqName' 1,
1, 1, 1,! surface RGB [0.0..1.0]
1, ! ambient coefficient [0.0..1.0]
1, ! diffuse coefficient [0.0..1.0]
1, ! specular coeff. [0.0..1.0]
0, ! transparent coeff. [0.0..1.0]
0, ! shining [0.0..100.0]
0 ! transparency atten. [0.0..4.0]

matWhite = IND (MATERIAL, 'whiteUniqName')
matPurple = IND (MATERIAL, 'purpleUniqName')


! material 'purpleUniqName'
! block 1,1,1 ! purple cube OK

add 2,2, 0
REVOLVE{2} 2, 0, 360, 4 + 8 + 256, matWhite, ! NOT OK -&amp;gt; receive purple colour from ABOVE !? if comment those 2 rows
0, 0.5, 0, matWhite, ! if matWhite=18 (instead of inline definition)
2, 0.5, 0, matWhite

add 2, 2, 0
cprism_{3} matPurple, matPurple, matPurple, 0, ! SHOULD be purple prism, though it has white sides
5, 2,
0, 0, 0, _si, matPurple,
0, 1, 0, _si, matPurple,
1, 1, 0, _si, matPurple,
1, 0, 0, _si, matPurple,
0, 0, 0, -1, matPurple

add 2, 2, 0
cprism_{3} matWhite, matWhite, matWhite, 0, ! SHOULD be white cube with yellow top&amp;amp;bottom
5, 2,
0, 0, 0, _si, matWhite,
0, 1, 0, _si, matWhite,
1, 1, 0, _si, matWhite,
1, 0, 0, _si, matWhite,
0, 0, 0, -1, matWhite

! add 2,2, 0
! material 'whiteUniqName'
! block 1,1,1 ! white cube OK

&lt;/LI-CODE&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/54969iB6455B5D4CD44169/image-size/large?v=v2&amp;amp;px=999" border="0" alt="defMat1.png" title="defMat1.png" /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/54970iAC1DBAA63C74D5D9/image-size/large?v=v2&amp;amp;px=999" border="0" alt="defMat2.png" title="defMat2.png" /&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:44:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inline-defined-materials-don-t-appear-properly/m-p/341342#M1915</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2022-06-17T13:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Inline defined materials don't appear properly</title>
      <link>https://community.graphisoft.com/t5/GDL/Inline-defined-materials-don-t-appear-properly/m-p/341507#M1916</link>
      <description>&lt;P&gt;Should have used Cprism{4} and revolve{5} instead&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:43:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Inline-defined-materials-don-t-appear-properly/m-p/341507#M1916</guid>
      <dc:creator>A_ Smith</dc:creator>
      <dc:date>2022-06-17T13:43:43Z</dc:date>
    </item>
  </channel>
</rss>

