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

TEVE - command

Frank Beister
Moderator
Can anyone help me with the TEVE-command. How do I have to set the "u" and "v" - parameter. Is the origin of the texture related to the x/y/z of this vertex or to the local system?
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
7 REPLIES 7
Anonymous
Not applicable
F. wrote:
Can anyone help me with the TEVE-command. How do I have to set the "u" and "v" - parameter. Is the origin of the texture related to the x/y/z of this vertex or to the local system?
Hi Frank,

There was a discussion about this thread in the old GDL-Talk forum.
Lubos Cipra, pointed to me the good way. TEVE command must not be mixed with VERT.

Attached a short test object, but i did not go further. Results are visible in rendering only.

I remember an elephant object on a russian site using TEVE. Very realistic rendering.
The skin texture looked the same as dinosaurs in Jurassic Park moovie, incredible!
This object was converted from 3ds into AC primitives, if i remember.
The size too, was incredible, not talking from the slowness. Unfortunately i trashed it.

If you have the time to explore more this command, i would be interested to learn.
Frank Beister
Moderator
There was a discussion about this thread in the old GDL-Talk forum.
Lubos Cipra, pointed to me the good way.
OK I will have a look on it tonight, when I#m in the near of my archive. 😉
Attached a short test object, but i did not go further.
Thanks. I will give it a try.

To see why I'm asking: I try to texture a flag by the following commands:
BASE

! [... comands to shape the flag]

VERT 0,0,0  ! origin
VERT 1,0,0  ! X
VERT 0,1,0  ! Y
VERT 0,0,1  ! Z

crI = 1  !  1st Index
crU = 2+256 ! wrapping mode

COOR crU, crI,(crI+1),(crI+2),(crI+3) 

BODY -1 ! ... or 1 or 2 or 4
From left to right you see trying it with VERT+EDGE+PGON, MESH and MASS:



If the triangles are not so talll the sliping of the texture is not visible:

.

My last hope is TEVE.
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
My old test
Today would charted UV to the extent of 0-1
!TEVE Test krychle

width=A
height=B
C=zzyzx
rk=a
rk2=rk*2
rk3=rk*3
rk4=rk*4

DEFINE TEXTURE TX_Kit "krychle", rk*4,rk*3, 2, 0
DEFINE MATERIAL "KitTest" 20, 1, 1, 1,
 0.8,  0.74, 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, -1,
 IND(TEXTURE, TX_Kit)


!if GLOB_FRAME_NR =0 then
!else
!   rotx (GLOB_FRAME_NR mod 12 ) *30
!endif
rotx uhel
SET MATERIAL "KitTest"
BASE
    TEVE 0, 0, rk, 0, rk2        !#1
    TEVE 0, 0, 0, rk, rk2        !#2
    TEVE 0, rk, 0, rk, rk      !#3
    TEVE 0, rk, rk, 0, rk      !#4
    TEVE rk, 0, 0, rk2, rk2      !#5
    TEVE rk, rk, 0,rk2,rk      !#6
    TEVE rk, rk, rk, rk3, rk     !#7
    TEVE rk, 0, rk, rk3,rk2     !#8
    TEVE 0, 0, rk, rk4, rk2     !#9
    TEVE 0, rk,rk, rk4, rk     !#10
    TEVE 0, 0, rk, rk, rk3     !#11
    TEVE rk, 0, rk, rk2, rk3     !#12
    TEVE 0, rk, rk, rk, 0     !#13
    TEVE rk, rk, rk,rk2, 0     !#14
 
!souradnice mapovani musi byt taky teve
!************************************
!coordinate mapped must be too teve
!************************************

    TEVE a, 0, 0 ,0,0        !#15 vektor x
    TEVE 0, a, 0 ,0,0         !#16 vektor y
    TEVE 0, 0, a ,0,0         !#17 vektor z
    TEVE 0,0,0 ,0,0         !#18 bod
    COOR 1+1024, 18, 15, 16,17


 EDGE 1,2,-1,-1,0       !#1
 EDGE 2,3,-1,-1,0       !#2
 EDGE 3,4,-1,-1,0       !#3
 EDGE 4,1,-1,-1,0       !#4
EDGE 2,5,-1,-1,0        !#5
EDGE 5,6,-1,-1,0        !#6
EDGE 6,3,-1,-1,0        !#7
EDGE 5,8,-1,-1,0        !#8
EDGE 8,7,-1,-1,0        !#9
EDGE 7,6,-1,-1,0        !#10
EDGE 8,9,-1,-1,0        !#11
EDGE 9,10,-1,-1,0       !#12
EDGE 10,7,-1,-1,0       !#13
EDGE 2,11,-1,-1,0       !#14
EDGE 11,12,-1,-1,0      !#15
EDGE 12,5,-1,-1,0       !#16
EDGE 6,14,-1,-1,0       !#17
EDGE 14,13,-1,-1,0      !#18
EDGE 13,3,-1,-1,0       !#19


 PGON 4,0,-1,5,6,7 ,-2      !strana 1
 PGON 4,0,-1,1,2,3,4       !strana 4
 PGON 4,0,-1,8,9,10,-6      !strana 2
 PGON 4,0,-1,11,12,13,-9    !strana 3
 PGON 4,0,-1,14,15,16,-5    !strana 5
 PGON 4,0,-1,-7,17,18,19    !strana 6

 BODY -1
Frank Beister
Moderator
Thanks Lubos. I found your posting and object in the gdl-talk yesterday. I played a bit with the parameters and I am full of hope that this lead to success.

The elephant, Oliver was talking about, I found in my archive too, but it is atransformed 3DS-model. There is not a lot to understand than that it works.

Now I have an idea, how TEVE has to work.

I will report the results of my efforts. Thanks so far.
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
Frank Beister
Moderator
Sometimes it needs (or I need) time. Now I understand it. The texture will be wrapped around the surface. The streching and rotating to the plane of the PGON will be done automatically by the 3D engine. I only have to set to each point (TEVE) of the model where it is found on the texture (u/v). On the planar texture. And it has nothing to do with the position in the space.

So finally I get only a correct wrapped model by using TEVE/EDGE/PGON/BODY:

My examples from above (from left to right using TEVE+EDGE+PGON, MESH, MASS and COONS:

in isometric view:


Now I can do my flag:
.
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
Most of this discussion from 2005 is way above my pay grade, but am I correct in concluding that the only way to get a texture to correctly map over a very irregular MASS object is to de-construct the object into 3d primitives and use TEVE to define how the texture should be stretched over the surface?
David Collins

Win10 64bit Intel i7 6700 3.40 Ghz, 32 Gb RAM, GeForce RTX 3070
AC 27.0 (4001 INT FULL)
Anonymous
Not applicable
David wrote:
Most of this discussion from 2005 is way above my pay grade, but am I correct in concluding that the only way to get a texture to correctly map over a very irregular MASS object is to de-construct the object into 3d primitives and use TEVE to define how the texture should be stretched over the surface?
David, that's exactly the point.
You can use TEVE only with other primitives. Take a look at Flag objects in the library below.
No thickness, of course, in this example, but you can add one if necessary, to recreate a mesh.