Aligning a repeating texture to repeating elements

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-24 06:21 PM
2006-10-24
06:21 PM
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
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-25 02:16 PM
2006-10-25
02:16 PM
With normal body creation you cannot have texture scaling as you like.
You can have a global change by defining the texture and stretching it, but it will be applied to all texture instances.
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.
You can create a for loop to create complex objects. A sample code
just to create a vertical face
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
MATERIAL mat
BASE
TEVE 0,0,0, 0,0 ! origin
TEVE A,0,0, Xscale,0 ! P+u,v
TEVE A,0,ZZYZX, Xscale,Zscale ! P +u,v
TEVE 0,0,ZZYZX, 0,Zscale! Z+u,v
EDGE 1,2 ,-1,-1 , 0
EDGE 2,3 ,-1,-1 , 0
EDGE 3,4 ,-1,-1 , 0
EDGE 4,1 ,-1,-1 , 0
PGON 4,0,0, 1,2,3,4
BASE
TEVE 0,0,0 ,0,0
TEVE 1,0,0 ,0,0
TEVE 0,1,0 ,0,0
TEVE 0,0,1 ,0,0
COOR 2+1024, 1,2,3,4 !where code
BODY -1
You can have a global change by defining the texture and stretching it, but it will be applied to all texture instances.
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.
You can create a for loop to create complex objects. A sample code
just to create a vertical face
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
MATERIAL mat
BASE
TEVE 0,0,0, 0,0 ! origin
TEVE A,0,0, Xscale,0 ! P+u,v
TEVE A,0,ZZYZX, Xscale,Zscale ! P +u,v
TEVE 0,0,ZZYZX, 0,Zscale! Z+u,v
EDGE 1,2 ,-1,-1 , 0
EDGE 2,3 ,-1,-1 , 0
EDGE 3,4 ,-1,-1 , 0
EDGE 4,1 ,-1,-1 , 0
PGON 4,0,0, 1,2,3,4
BASE
TEVE 0,0,0 ,0,0
TEVE 1,0,0 ,0,0
TEVE 0,1,0 ,0,0
TEVE 0,0,1 ,0,0
COOR 2+1024, 1,2,3,4 !where code
BODY -1
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-25 05:54 PM
2006-10-25
05:54 PM
Here is a more sophisticated example of texture alignment.
The gdl code creates a simple face. You can rotate it using the angle parameter.
You also have 3 hospots. The first one positions the origin of the texture
and the other two scale the texture graphically.
You can in fact use it to position textures in facades.
I wonder is it so hard to have such texture alignment in Archicad?
Its SOOOOO easy
Any comments welcomed. In fact i would like to add a few tricks to that simple gdl.
The gdl code creates a simple face. You can rotate it using the angle parameter.
You also have 3 hospots. The first one positions the origin of the texture
and the other two scale the texture graphically.
You can in fact use it to position textures in facades.
I wonder is it so hard to have such texture alignment in Archicad?
Its SOOOOO easy
Any comments welcomed. In fact i would like to add a few tricks to that simple gdl.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-27 04:01 PM
2006-10-27
04:01 PM
OK, here's the code I tried:
Any other ideas? Or did I code something wrong?
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 -1The material is definitely not starting at 0,0,0 (the lower left corner) like it's supposed to be,
Any other ideas? Or did I code something wrong?
Tom Waltz
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-30 08:22 AM
2006-10-30
08:22 AM
Hello Tom.
I can not test it in the moment, but I think, your vertices are wrong.
I think your VERT-block should work with
I can not test it in the moment, but I think, your vertices are wrong.
! Set Texture Origin VERT 0, B, 0 ! OriginIf it should be at 0/0/0, why is there a B inside? The direction of he axis ...
VERT 1, B, 0 ! X Direction VERT 0, 1, 0 ! Y Direction VERT 0, B, 1 ! Z Directionis independent of the origin. They show the direction 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.
I think your VERT-block should work with
VERT 0, 0, 0 ! Origin VERT 1, 0, 0 ! X Direction VERT 0, 1, 0 ! Y Direction VERT 0, 0, 1 ! Z DirectionYou can do some transformations before the VERT commands to bring origin and orientation of your coordinate system in the position you want.
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-30 08:50 PM
2006-10-30
08:50 PM
The intention of the "B" value was to move the origin a distance (B) in the Y-direction.
I thought that if my origin was 0,B,0 and the vector was 0,0,0, the material would be tilted.
I thought that if my origin was 0,B,0 and the vector was 0,0,0, the material would be tilted.
Tom Waltz
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-10-31 01:14 AM
2006-10-31
01:14 AM
Tom, if it was not clearifying, you can send me the object and the pict. Would be much easier for me to help.
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
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-11-02 09:00 AM
2006-11-02
09:00 AM
TomWaltz wrote:
OK, here's the code I tried: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 -1The material is definitely not starting at 0,0,0 (the lower left corner) like it's supposed to be,
Any other ideas? Or did I code something wrong?
! 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
- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »