The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Producing imagery with Archicad or 3rd party products; Surfaces; Lighting; Cameras; Artlantis/Cinema 4D/Maxwell etc.

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy

By derekjackson
I've made a GDL object which essentially performs as a wall tile, each one 500mm square.

I've placed them in a grid covering my wall 4 objects wide by 4 high (so a 2m square piece of wall).

I want to apply a tiling texture that I've made that is 1m square to the group of objects, so the texture will be display twice horizontally and twice vertically.

The problem is, each object seems to have its own texture origin so the texture placement just goes crazy, and using the Set Origin command has no effect when I try to use it to unify the objects' texture placement.

Is there a way round this? Is it not possible to set a Texture Origin for an object?
I believe what you are looking for is the COOR function. You can look it up in the GDL reference. As I recall it's a bit tricky but give it a try and then come back if you have questions.
David Nicholson-Cole's GDL Cookbook 4, which never made it to press, give a good example of setting the texture origin for elements within an object.

The book is copyrighted by DNC, but is apparently available for download from various sites... I just found this one which has working links: ... ook-4-pdf/

I've compressed the images on the pages of interest so that they are small enough to upload here for you. Note the VERT and COOR commands in the second column of the second page, which align the wood grain on the chair pieces properly.

Pages 39-41 of the GDL Cookbook 4, Copyright (c) 2004 Marmalade Graphics / David Nicholson-Cole
(140.99 KiB) Downloaded 894 times
User avatar
By vfrontiers
Ok... I know I'm not stupid, but this is FRYING MY BRAIN... I have such a simple goal...
1. Put an IMAGE on a PLANE
a. The image will stretch to the extents of the plane
b. The image will START at the lower left corner

2. I NEED to use a MATERIALs TEXTURE to do this because the PICTURE command does NOT translate to ENSCAPE...

3. I need to ROTATE the object (automatically) to point AT THE CAMERA
a. I can already do this part, but the texture wants to start at 0,0... so it is shifted on the plane by half.

I've gone thru COOR / VERT / TEVE... but cannot get it to shift over -a/2...

Any help appreciated..

Here's a tutorial I posted back in 2009. Maybe this helps?

One thing that's counter-intuitive here is that the VERT/COOR statements must be placed after the object code.

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.

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.

Here's what works for me:



PRISM_ 5, 0.10,

ROTy 90
ADD 0.30, 1.20, 0.00
vert 0, 0, 0
vert 1, 0, 0
vert 0, 1, 0
vert 0, 0, 1
coor 2 + 256, -1, -2, -3, -4

User avatar
By vfrontiers
Thanks a bunch... I was trying to do the modifications in the VERT commands unsuccessfully. This is a much simpler way..

Note that I also put a switch in the parameters to MIRROR the texture (to make the variety of the plants look better)… I was unable to use an EQUATION in the "x" vector, but was able to set up a simple IF THEN and have the x direction turn from positive to negative.

Anyway, your suggestion was very much appreciated.