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

3D Shapes

ELEMENTS FOR VISUALIZATION

LIGHT

LIGHT red, green, blue, shadow,

radius, alpha, beta, angle_falloff, distance1, distance2,

distance_falloff [[,] ADDITIONAL_DATA name1 = value1, name2 = value2, ...]

A light source radiates [red, green, blue] colored light from the local origin along the local x axis. The light is projected parallel to the x axis from a point or circle source. It has its maximum intensity within the alpha-angle frustum of a cone and falls to zero at the beta-angle frustum of a cone. This falloff is controlled by the angle_falloff parameter. (Zero gives the light a sharp edge, higher values mean that the transition is smoother.) The effect of the light is limited along the axis by the distance1 and distance2 clipping values. The distance_falloff parameter controls the decrease in intensity depending on the distance. (Zero value means a constant intensity; bigger values are used for stronger falloff.)

GDL transformations affect only the starting point and the direction of the light. The shadow parameter controls the light’s shadow casting.

0:light casts no shadows

1:light casts shadows

Parameter restriction:

alpha <= beta <= 80°

The following parameter combinations have special meanings: radius = 0, alpha = 0, beta = 0

A point light, it radiates light in every direction and does not cast any shadows. The shadow and angle_falloff parameters are ignored, the values shadow = 0, angle_falloff = 0 are supposed.

radius > 0, alpha = 0, beta = 0

A directional light.

Light definition can contain optional additional data definitions after the

ADDITIONAL_DATA keyword. Additional data has a name (namei) and a value (valuei), which can be an expression of any type, even an array. If a string parameter name ends with the substring "_file", its value is considered to be a file name and will be included in the archive project.

Different meanings of additional data can be defined and used by ArchiCAD or Add-Ons to ArchiCAD.

radius

beta

alpha

 

 

intensity

 

dist1

 

dist2

See meanings of LightWorks Add-On parameters at http://www.graphisoft.com/support/developer/documentation/LibraryDevDoc/11.

ArchiCAD 11 GDL Reference Guide

89

3D Shapes

Example:

! RGB

LIGHT 1.0,0.2,0.3,

1,

! shadow on

1.0,

! radius

45.0,60.0,

! angle1, angle2

0.3,

! angle_falloff

1.0,10.0,

! distance1, distance2

0.2

! distance_falloff

The library part dialog box for lights in ArchiCAD and ArchiFM:

Part of the corresponding GDL script:

IF C = 0 GOTO 10

LIGHT G/100*D, G/100*E, G/100*F, ! RGB

...

10:

r = 0, alpha > 0, beta > 0

90

ArchiCAD 11 GDL Reference Guide

3D Shapes

r > 0, alpha = 0, beta > 0

r > 0, alpha = 0, beta = 0

Light types using different alpha, beta parameters

PICTURE

PICTURE expression, a, b, mask

A picture element for photorendering.

A string type expression means a file name, a numeric expression or the index of a picture stored in the library part. A 0 index is a special value that refers to the preview picture of the library part. Other pictures can only be stored in library parts when saving the project or selected elements containing pictures as GDL Objects.

Indexed picture reference cannot be used in the MASTER_GDL script when attributes are merged into the current attribute set. The image is fitted on a rectangle treated as a RECT in any other 3D projection method.

mask = alpha + distortion alpha: alpha channel control

0:do not use alpha channel; picture is a rectangle.

1:use alpha channel; parts of the picture may be transparent.

distortion: distortion control

0: fit the picture into the given rectangle.

2: fit the picture in the middle of the rectangle using the natural aspect ratio of the picture.

4: fill the rectangle with the picture in a central position using natural aspect ratio of the picture.

ArchiCAD 11 GDL Reference Guide

91