Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
05 ArchiCAD 11 GDL Reference Guide.pdf
Скачиваний:
59
Добавлен:
11.03.2015
Размер:
3.22 Mб
Скачать

Attributes

Example:

n = REQUEST{2} ("Material_info", "Brick-Face", "gs_mat_emission_rgb ", em_r, em_g, em_b) em_r = em_r + (1 - em_r) / 3

em_g = em_g + (1 - em_g) / 3 em_b = em_b + (1 - em_b) / 3

DEFINE MATERIAL "Brick-Face light" [,] BASED_ON "Brick-Face" PARAMETERS gs_mat_emission_r = em_r,

gs_mat_emission_g = em_g, gs_mat_emission_b = em_b

SET MATERIAL "Brick-Face"

BRICK a, b, zzyzx

ADDX a

SET MATERIAL "Brick-Face light"

BRICK a, b, zzyzx

DEFINE TEXTURE

DEFINE TEXTURE name expression, x, y, mask, angle

Any GDL script can include texture definition prior to the first reference to that texture name. The texture can be used only in the script in which it was defined and its subsequent second generation scripts.

name: name of the texture

expression: picture associated with the texture. A string expression means a file name, a numerical expression an index of a picture stored in the library part. A 0 index is a special value which refers to the preview picture of the library part.

x:logical width of the texture

y:logical height of the texture

mask: j1 + 2*j2 + 4*j3 + 8*j4 + 16*j5 + 32*j6 + 64*j7 + 128*j8 + 256*j9 where j1, j2, j3, j4, j5, j6, j7, j8, j9 can be 0 or 1.

Alpha channel controls (j1... j6):

j1: alpha channel changes the transparency of texture j2: Bump mapping or surface normal perturbation.

Bump mapping uses the alpha channel to determine the amplitude of the surface normal. j3: alpha channel changes the diffuse color of texture

j4: alpha channel changes the specular color of texture j5: alpha channel changes the ambient color of texture j6: alpha channel changes the surface color of texture

Connection controls (j7... j9):

164

ArchiCAD 11 GDL Reference Guide

Attributes

If the value is zero, normal mode is selected:

y

x

j7: the texture will be shifted randomly.

y

x

j8: mirroring in ‘x’ direction

y

x

j9: mirroring in ‘y’ direction

ArchiCAD 11 GDL Reference Guide

165