Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Aligning a repeating texture to repeating elements

TomWaltz
Participant
I'm trying to write a tile surround object that would physically model the tiles complete with grout lines.

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).

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....

Aside from buying ArchiTile, any suggestions?
Tom Waltz
16 REPLIES 16
Djordje
Virtuoso
TomWaltz wrote:
Aside from buying ArchiTile, any suggestions?
No.

You might want to build a hotrod yourself, but not a daily driver, right?
Djordje



ArchiCAD since 4.55 ... 1995
HP Omen
TomWaltz
Participant
Djordje wrote:
You might want to build a hotrod yourself, but not a daily driver, right?
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.
Tom Waltz
Frank Beister
Moderator
I do not know if understand you right, but have you tried to allign each tiles origin by VERT, COOR and BODY?
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
TomWaltz
Participant
F. wrote:
I do not know if understand you right, but have you tried to allign each tiles origin by VERT, COOR and BODY?
Tried, yes. Succeded.... no.

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.
Tom Waltz
Anonymous
Not applicable
Hello Tom,
Do you have the GDL Cookbook 3 ?
DNC has a couple of pages explaining these commands.
Peter Devlin
Frank Beister
Moderator
Yes, they are described quiet well in the cookbook. Jochen is (hopefully in the moment ) 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.

The four vertices are

X1/Y1/Z1 of the origin of the texture in space
X2/Y2/Z2 of the X-axis direction
X3/Y3/Z3 of the Y-axis direction
X4/Y4/Z4 of the Z-axis direction

The direction of the axis a viewed by the actual origin 0/0/0.

So the actual origin is
0/0/0
1/0/0
0/1/0
0/0/1
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
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
TomWaltz
Participant
OK, so those 4 allow you to set the origin and direction... how do you control scale/size?
Tom Waltz
Frank Beister
Moderator
I haven't proofed, but I think with TEXTURE an a new MATERIAL for each scale.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
David Collins
Advocate
TomWaltz wrote:
OK, so those 4 allow you to set the origin and direction... how do you control scale/size?
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.
David Collins

Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)