<?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: Aligning a repeating texture to repeating elements in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14010#M32448</link>
    <description>I haven't proofed, but I think with TEXTURE an a new MATERIAL for each scale.</description>
    <pubDate>Tue, 24 Oct 2006 19:46:45 GMT</pubDate>
    <dc:creator>Frank Beister</dc:creator>
    <dc:date>2006-10-24T19:46:45Z</dc:date>
    <item>
      <title>Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14002#M32440</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I'm trying to write a tile surround object that would physically model the tiles complete with grout lines.&lt;BR /&gt;
&lt;BR /&gt;
Part of the goal is to align a photo-real texture to each individual tile (not always the same one, sometimes part of a pattern).&lt;BR /&gt;
&lt;BR /&gt;
I'm banging my head against it since I am not having much luck aligning the origin inside the object, let alone finding a way to toggle between materials from tile to tile.... &lt;BR /&gt;
&lt;BR /&gt;
Aside from buying ArchiTile, any suggestions?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Oct 2006 16:21:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14002#M32440</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-24T16:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14003#M32441</link>
      <description>&lt;BLOCKQUOTE&gt;TomWaltz wrote:&lt;BR /&gt;Aside from buying ArchiTile, any suggestions?&lt;/BLOCKQUOTE&gt;

No.&lt;BR /&gt;
&lt;BR /&gt;
You might want to build a hotrod yourself, but not a daily driver, right?</description>
      <pubDate>Tue, 24 Oct 2006 16:22:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14003#M32441</guid>
      <dc:creator>Djordje</dc:creator>
      <dc:date>2006-10-24T16:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14004#M32442</link>
      <description>&lt;BLOCKQUOTE&gt;Djordje wrote:&lt;BR /&gt;You might want to build a hotrod yourself, but not a daily driver, right?&lt;/BLOCKQUOTE&gt;

It's sometimes cheaper in the long run to build one myself that does exactly what I need/want than buying and maintaining multiple licenses of a 3rd party product.</description>
      <pubDate>Tue, 24 Oct 2006 16:46:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14004#M32442</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-24T16:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14005#M32443</link>
      <description>I do not know if understand you right, but have you tried to allign each tiles origin by VERT, COOR and BODY?</description>
      <pubDate>Tue, 24 Oct 2006 17:05:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14005#M32443</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-10-24T17:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14006#M32444</link>
      <description>&lt;BLOCKQUOTE&gt;F. wrote:&lt;BR /&gt;I do not know if understand you right, but have you tried to allign each tiles origin by VERT, COOR and BODY?&lt;/BLOCKQUOTE&gt;

Tried, yes. Succeded.... no.&lt;BR /&gt;
&lt;BR /&gt;
I have not had much luck figuring out the relationship and usage of those three commands. I know there are a couple pages in the GDL manual, but I am struggling to make sense of them.</description>
      <pubDate>Tue, 24 Oct 2006 17:46:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14006#M32444</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-24T17:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14007#M32445</link>
      <description>Hello Tom,&lt;BR /&gt;
Do you have the GDL Cookbook 3 ?&lt;BR /&gt;
DNC has a couple of pages explaining these commands.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Tue, 24 Oct 2006 18:34:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14007#M32445</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-24T18:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14008#M32446</link>
      <description>Yes, they are described quiet well in the cookbook. Jochen is (hopefully in the moment &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; ) working on the English edit pages of the selfgdl database, that I could translate some of the related parts. You have first to define 4 vertices by VERT. Then you activate them by COOR and close it by BODY to start the next alligning.&lt;BR /&gt;
&lt;BR /&gt;
The four vertices are&lt;BR /&gt;
&lt;BR /&gt;
X1/Y1/Z1 of the origin of the texture in space&lt;BR /&gt;
X2/Y2/Z2 of the X-axis direction&lt;BR /&gt;
X3/Y3/Z3 of the Y-axis direction&lt;BR /&gt;
X4/Y4/Z4 of the Z-axis direction&lt;BR /&gt;
&lt;BR /&gt;
The direction of the axis a viewed by the actual origin 0/0/0.&lt;BR /&gt;
&lt;BR /&gt;
So the actual origin is&lt;BR /&gt;
0/0/0&lt;BR /&gt;
1/0/0&lt;BR /&gt;
0/1/0&lt;BR /&gt;
0/0/1&lt;BR /&gt;

&lt;PRE&gt;BASE

VERT 0,0,0  ! origin
VERT 1,0,0  ! X
VERT 0,1,0  ! Y
VERT 0,0,1  ! Z

COOR 2,   1,2,3,4

BODY -1&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Oct 2006 19:07:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14008#M32446</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-10-24T19:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14009#M32447</link>
      <description>OK, so those 4 allow you to set the origin and direction... how do you control scale/size?</description>
      <pubDate>Tue, 24 Oct 2006 19:20:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14009#M32447</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-24T19:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14010#M32448</link>
      <description>I haven't proofed, but I think with TEXTURE an a new MATERIAL for each scale.</description>
      <pubDate>Tue, 24 Oct 2006 19:46:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14010#M32448</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-10-24T19:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14011#M32449</link>
      <description>&lt;BLOCKQUOTE&gt;TomWaltz wrote:&lt;BR /&gt;OK, so those 4 allow you to set the origin and direction... how do you control scale/size?&lt;/BLOCKQUOTE&gt;

If you have the Cookbook, look at the script for the ArchiDwight object pg 2.155, which uses TEXTURE and MATERIAL to control the size of the bitmap. Also, watch the BODY -1 statements in your script. There should be one just before the script for the target object and another just after the vert/coon statements.</description>
      <pubDate>Wed, 25 Oct 2006 08:12:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14011#M32449</guid>
      <dc:creator>David Collins</dc:creator>
      <dc:date>2006-10-25T08:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14012#M32450</link>
      <description>With normal body creation you cannot have texture scaling as you like.&lt;BR /&gt;
You can have a global change by defining the texture and stretching it, but it will be applied to all texture instances.&lt;BR /&gt;
&lt;BR /&gt;
If you need to stretch the texture differently in many object you should create the body from scratch using teve commands. Its really very easy.&lt;BR /&gt;
&lt;BR /&gt;
You can create a for loop to create complex objects. A sample code&lt;BR /&gt;
just to create a vertical face &lt;BR /&gt;
&lt;BR /&gt;
You need parameters mat (material) and x,y,z scale is to tweak the texture  as you like. For tiles you will actually need just the upper surface so it is ultra simple. Just define points edges and a simple polygon&lt;BR /&gt;
&lt;BR /&gt;
MATERIAL mat&lt;BR /&gt;
BASE&lt;BR /&gt;
&lt;BR /&gt;
TEVE  0,0,0,                0,0 ! origin&lt;BR /&gt;
TEVE  A,0,0,               Xscale,0 ! P+u,v&lt;BR /&gt;
TEVE  A,0,ZZYZX,               Xscale,Zscale ! P +u,v&lt;BR /&gt;
TEVE  0,0,ZZYZX,       0,Zscale! Z+u,v&lt;BR /&gt;
&lt;BR /&gt;
EDGE 1,2 ,-1,-1  , 0&lt;BR /&gt;
EDGE 2,3 ,-1,-1  , 0&lt;BR /&gt;
EDGE 3,4 ,-1,-1  , 0&lt;BR /&gt;
EDGE 4,1 ,-1,-1  , 0&lt;BR /&gt;
&lt;BR /&gt;
PGON 4,0,0, 1,2,3,4&lt;BR /&gt;
&lt;BR /&gt;
BASE&lt;BR /&gt;
&lt;BR /&gt;
TEVE  0,0,0 ,0,0&lt;BR /&gt;
TEVE  1,0,0 ,0,0&lt;BR /&gt;
TEVE  0,1,0 ,0,0&lt;BR /&gt;
TEVE  0,0,1 ,0,0&lt;BR /&gt;
&lt;BR /&gt;
COOR  2+1024,   1,2,3,4 !where code &lt;BR /&gt;
&lt;BR /&gt;
BODY -1</description>
      <pubDate>Wed, 25 Oct 2006 12:16:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14012#M32450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-25T12:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14013#M32451</link>
      <description>Here is a more sophisticated example of texture alignment.&lt;BR /&gt;
&lt;BR /&gt;
The gdl code creates a simple face. You can rotate it using the angle parameter.&lt;BR /&gt;
&lt;BR /&gt;
You also have 3 hospots. The first one positions the origin of the texture&lt;BR /&gt;
and the other two scale the texture graphically.&lt;BR /&gt;
&lt;BR /&gt;
You can in fact use it to position textures in facades.&lt;BR /&gt;
&lt;BR /&gt;
I wonder is it so hard to have such texture alignment in Archicad?&lt;BR /&gt;
&lt;BR /&gt;
Its SOOOOO easy&lt;BR /&gt;
&lt;BR /&gt;
Any comments welcomed. In fact i would like to add a few tricks to that simple gdl.</description>
      <pubDate>Wed, 25 Oct 2006 15:54:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14013#M32451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-25T15:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14014#M32452</link>
      <description>OK, here's the code I tried:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	DEFINE TEXTURE "tilePattern" txtName, 
		txScale, tyScale,
		0, 0
	txtNum = IND(TEXTURE, "tilePattern")

	DEFINE MATERIAL "tilePattern" 24,
		1, 1, 	1, ! RBG Color
		0, 61, txtNum
	matlNum = IND(MATERIAL, "tilePattern")

! Draw Tile
	cPRISM_ 0, 0, matlNum,
				 5, ZZYZX,
			0, 0,     15,
			A, 0,     15,
			A, B,     15,
			0, B,     15,
			0, 0,     -1
	
! Set Texture Origin
	VERT 	0,		B,		0		! Origin
	VERT 	1, 		B, 		0		! X Direction
	VERT	 0, 		1,		0		! Y Direction
	VERT 	0, 		B,		1		! Z Direction
	COOR 2, 1, 2, 3, 4
	BODY -1&lt;/PRE&gt;

The material is definitely not starting at 0,0,0 (the lower left corner) like it's supposed to be, &lt;BR /&gt;
&lt;BR /&gt;
Any other ideas? Or did I code something wrong?&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/12725i25198F7522791801/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Picture 1.png" title="Picture 1.png" /&gt;</description>
      <pubDate>Fri, 27 Oct 2006 14:01:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14014#M32452</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-27T14:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14015#M32453</link>
      <description>Hello Tom.&lt;BR /&gt;
&lt;BR /&gt;
I can not test it in the moment, but I think, your vertices are wrong.&lt;BR /&gt;

&lt;PRE&gt;! Set Texture Origin
   VERT    0,      B,      0      ! Origin&lt;/PRE&gt;
If it should be at 0/0/0, why is there a B inside? The direction of he axis ...
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;   VERT    1,       B,       0      ! X Direction
   VERT    0,       1,      0      ! Y Direction
   VERT    0,       B,      1      ! Z Direction
&lt;/PRE&gt;
is independent of the origin. They show the &lt;B&gt;direction&lt;/B&gt; from local, not from texture origin, pointed by the 1st VERT. Your "direction" should be 1/0/0, 0/1/0 and 0/0/1.&lt;BR /&gt;
&lt;BR /&gt;
I think your VERT-block should work with&lt;PRE&gt;   VERT    0,      0,      0      ! Origin
   VERT    1,       0,       0      ! X Direction
   VERT    0,       1,      0      ! Y Direction
   VERT    0,       0,      1      ! Z Direction&lt;/PRE&gt;

You can do some transformations before the VERT commands to bring origin and orientation of your coordinate system in the position you want.</description>
      <pubDate>Mon, 30 Oct 2006 07:22:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14015#M32453</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-10-30T07:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14016#M32454</link>
      <description>The intention of the "B" value was to move the origin a distance (B) in the Y-direction. &lt;BR /&gt;
&lt;BR /&gt;
I thought that if my origin was 0,B,0 and the vector was 0,0,0, the material would be tilted.</description>
      <pubDate>Mon, 30 Oct 2006 19:50:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14016#M32454</guid>
      <dc:creator>TomWaltz</dc:creator>
      <dc:date>2006-10-30T19:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14017#M32455</link>
      <description>Tom, if it was not clearifying, you can send me the object and the pict. Would be much easier for me to help.</description>
      <pubDate>Tue, 31 Oct 2006 00:14:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14017#M32455</guid>
      <dc:creator>Frank Beister</dc:creator>
      <dc:date>2006-10-31T00:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Aligning a repeating texture to repeating elements</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14018#M32456</link>
      <description>&lt;BLOCKQUOTE&gt;TomWaltz wrote:&lt;BR /&gt;OK, here's the code I tried:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;	DEFINE TEXTURE "tilePattern" txtName, 
		txScale, tyScale,
		0, 0
	txtNum = IND(TEXTURE, "tilePattern")

	DEFINE MATERIAL "tilePattern" 24,
		1, 1, 	1, ! RBG Color
		0, 61, txtNum
	matlNum = IND(MATERIAL, "tilePattern")

! Draw Tile
	cPRISM_ 0, 0, matlNum,
				 5, ZZYZX,
			0, 0,     15,
			A, 0,     15,
			A, B,     15,
			0, B,     15,
			0, 0,     -1
	
! Set Texture Origin
	VERT 	0,		B,		0		! Origin
	VERT 	1, 		B, 		0		! X Direction
	VERT	 0, 		1,		0		! Y Direction
	VERT 	0, 		B,		1		! Z Direction
	COOR 2, 1, 2, 3, 4
	BODY -1&lt;/PRE&gt;

The material is definitely not starting at 0,0,0 (the lower left corner) like it's supposed to be, &lt;BR /&gt;
&lt;BR /&gt;
Any other ideas? Or did I code something wrong?&lt;/BLOCKQUOTE&gt;

&lt;PRE&gt;! Set Texture Origin New
	VERT 	0,		B,		0		! Origin
	VERT 	1, 		B, 		0		! X Direction
	VERT	 0, 		1,		0		! Y Direction
	VERT 	0, 		B,		1		! Z Direction
	COOR 2+256, 1, 2, 3, 4  ! 256 is local coordinate system 
	BODY -1&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2006 08:00:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Aligning-a-repeating-texture-to-repeating-elements/m-p/14018#M32456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-02T08:00:34Z</dc:date>
    </item>
  </channel>
</rss>

