<?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 GDL texture mapping coordination in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128206#M24717</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;If I define a texture in GDL and create a 3D object, i.e a polygon with this material, how can I start the texture from the object's local origin? Whatever I do, the texture starts mapping from the plan's origin, and not the object's.&lt;BR /&gt;
&lt;BR /&gt;
Including for instance:&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#1&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#2&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#3&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#4&lt;BR /&gt;
COOR 256, 1, 2, 3, 4&lt;BR /&gt;
has absolutely no effect on the texture's mapping.&lt;/T&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 05 May 2009 12:19:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-05-05T12:19:16Z</dc:date>
    <item>
      <title>GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128206#M24717</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;If I define a texture in GDL and create a 3D object, i.e a polygon with this material, how can I start the texture from the object's local origin? Whatever I do, the texture starts mapping from the plan's origin, and not the object's.&lt;BR /&gt;
&lt;BR /&gt;
Including for instance:&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#1&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#2&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#3&lt;BR /&gt;
TEVE 0, 0, 0, 0, 0	 !#4&lt;BR /&gt;
COOR 256, 1, 2, 3, 4&lt;BR /&gt;
has absolutely no effect on the texture's mapping.&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 May 2009 12:19:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128206#M24717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-05T12:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128207#M24718</link>
      <description>Try this:&lt;BR /&gt;
base&lt;BR /&gt;
vert 0, 0, 0&lt;BR /&gt;
vert 1, 0, 0&lt;BR /&gt;
vert 0, 1, 0&lt;BR /&gt;
vert 0, 0, 1&lt;BR /&gt;
coor 2 + 256, -1, -2, -3, -4&lt;BR /&gt;
body -1</description>
      <pubDate>Tue, 05 May 2009 19:53:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128207#M24718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-05T19:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128208#M24719</link>
      <description>One thing that's counter-intuitive here is that the VERT/COOR statements must be  placed &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;after  &lt;E&gt;&lt;/E&gt;the object code. &lt;BR /&gt;
&lt;BR /&gt;
Also remember to place a BODY -1 statement before the object code as a companion to the one at the end of the VERT/COOR statements. This makes sure that the new texture origin applies apply only to the specific object. Of course, several objects can be included between the the BODY -1 statements. A stray BODY -1 anywhere in between the object code and the VERT/COOR statements will cancel the texture change. &lt;BR /&gt;
&lt;BR /&gt;
Another thing: Apply the origin changes to the VERT/COOR statements, along with the required DEL statements, instead of trying to work out the vert vectors.&lt;BR /&gt;
&lt;BR /&gt;
Here's what works for me:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
MATERIAL brick&lt;BR /&gt;
&lt;BR /&gt;
	BODY -1&lt;BR /&gt;
&lt;BR /&gt;
PRISM_ 5, 0.10,&lt;BR /&gt;
0,0,15,&lt;BR /&gt;
0,1,15,&lt;BR /&gt;
1,1,15,&lt;BR /&gt;
1,0,15,&lt;BR /&gt;
0,0,-1&lt;BR /&gt;
&lt;BR /&gt;
	ROTy 90&lt;BR /&gt;
	ADD 0.30, 1.20, 0.00&lt;BR /&gt;
base &lt;BR /&gt;
vert 0, 0, 0 &lt;BR /&gt;
vert 1, 0, 0 &lt;BR /&gt;
vert 0, 1, 0 &lt;BR /&gt;
vert 0, 0, 1 &lt;BR /&gt;
coor 2 + 256, -1, -2, -3, -4 &lt;BR /&gt;
	DEL 2&lt;BR /&gt;
&lt;BR /&gt;
	BODY -1</description>
      <pubDate>Wed, 06 May 2009 07:30:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128208#M24719</guid>
      <dc:creator>David Collins</dc:creator>
      <dc:date>2009-05-06T07:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128209#M24720</link>
      <description>Thank you both for the answer. My script was faulty, and also in the wrong order, before the object. Yes, that's quite counter-intuitive.</description>
      <pubDate>Wed, 06 May 2009 08:49:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128209#M24720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-06T08:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128210#M24721</link>
      <description>Is it possible in GDL (with TEVE and COOR statements) to force texture to follow the direction of the TUBE's object space curve path? Picture shows actually what I want to achive (red arrow) on TUBE object, the right woodgrain direction on my door wood elements.&lt;BR /&gt;
&lt;BR /&gt;
This is the custom TUBE object on which I want to try to solve the problem.&lt;BR /&gt;

&lt;PRE&gt;set material mat

body -1

tube 4, 7, 16+32,
0, 0, 0,
0.1, 0, 0,
0.1, 0.05, 0,
0, 0.05, 0,
0, B, 0, 0,
0, 0, 0, 0,
A, 0, 0, 0,
A, B, 0, 0,
0, B, 0, 0,
0, 0, 0, 0,
A, 0, 0, 0

body -1&lt;/PRE&gt;

thanx</description>
      <pubDate>Tue, 23 Jun 2009 21:33:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128210#M24721</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-23T21:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128211#M24722</link>
      <description>Oddly the tube element doesn't map textures well at all. I ended up using GDL primitives to create my own version of a tube with inbuilt texture mapping.</description>
      <pubDate>Wed, 24 Jun 2009 01:54:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128211#M24722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-24T01:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: GDL texture mapping coordination</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128212#M24723</link>
      <description>Interesting idea Andrew, I will have to try it.</description>
      <pubDate>Wed, 24 Jun 2009 02:06:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/GDL-texture-mapping-coordination/m-p/128212#M24723</guid>
      <dc:creator>Erich</dc:creator>
      <dc:date>2009-06-24T02:06:15Z</dc:date>
    </item>
  </channel>
</rss>

