GDL texture mapping coordination
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-05-05 02:19 PM
2009-05-05
02:19 PM
Including for instance:
TEVE 0, 0, 0, 0, 0 !#1
TEVE 0, 0, 0, 0, 0 !#2
TEVE 0, 0, 0, 0, 0 !#3
TEVE 0, 0, 0, 0, 0 !#4
COOR 256, 1, 2, 3, 4
has absolutely no effect on the texture's mapping.
6 REPLIES 6
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-05-05 09:53 PM
2009-05-05
09:53 PM
Try this:
base
vert 0, 0, 0
vert 1, 0, 0
vert 0, 1, 0
vert 0, 0, 1
coor 2 + 256, -1, -2, -3, -4
body -1
base
vert 0, 0, 0
vert 1, 0, 0
vert 0, 1, 0
vert 0, 0, 1
coor 2 + 256, -1, -2, -3, -4
body -1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-05-06 09:30 AM
2009-05-06
09:30 AM
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:
MATERIAL brick
BODY -1
PRISM_ 5, 0.10,
0,0,15,
0,1,15,
1,1,15,
1,0,15,
0,0,-1
ROTy 90
ADD 0.30, 1.20, 0.00
base
vert 0, 0, 0
vert 1, 0, 0
vert 0, 1, 0
vert 0, 0, 1
coor 2 + 256, -1, -2, -3, -4
DEL 2
BODY -1
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:
MATERIAL brick
BODY -1
PRISM_ 5, 0.10,
0,0,15,
0,1,15,
1,1,15,
1,0,15,
0,0,-1
ROTy 90
ADD 0.30, 1.20, 0.00
base
vert 0, 0, 0
vert 1, 0, 0
vert 0, 1, 0
vert 0, 0, 1
coor 2 + 256, -1, -2, -3, -4
DEL 2
BODY -1
David Collins
Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)
Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-05-06 10:49 AM
2009-05-06
10:49 AM
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.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-06-23 11:33 PM
2009-06-23
11:33 PM
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.
This is the custom TUBE object on which I want to try to solve the problem.
This is the custom TUBE object on which I want to try to solve the problem.
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 -1thanx
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-06-24 03:54 AM
2009-06-24
03:54 AM
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.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-06-24 04:06 AM
2009-06-24
04:06 AM
Interesting idea Andrew, I will have to try it.
Erich
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K