Face Data Type
 
 
 

Declaration:

face <name> ( <component list> ) ;

Reference:

<name>

Literal:

face ( <component list> )

Purpose:

A face is an object that may be instanced in the MODEL section. It defines a planar surface whose boundary is given by a spline curve.

Comments:

A face may be specified as a literal or as a variable. If specified as a variable, it must have a name. Any of the following components may be specified between the parentheses:

All components are specified using a keyword=value form. Components are separated by commas. The components may be specified in any order. Components that are not specified take on their default value. If any component is specified more than once, the last such specification will be used, and all previous ones ignored.

Example:

face node7 (active = TRUE, divisions = 4,
 shader = (DefaultShader ),
 casts_shadow = TRUE,
 boundaries = (
 (degree = 3,
 knots = (-0.4375   , -0.21875  ,  0.0      ,  1.0      ,  2.0 ,
 2.21875  ,  2.4375   ,  2.65625  ,  3.65625  ,  4.65625
 ),
 cvs = ( cv(( -1.0839422,   0.0      ,  -1.8821912),   0.9999998),
 cv(( -1.3428757,   0.0      ,   0.220685 ),   1.0 ),
 cv(( -0.2771195,   0.0      ,   0.9785176),   0.9999996),
 cv((  1.1370566,   0.0      ,   0.725904 ),   0.9999998),
 cv((  0.7208539,   0.0      ,  -1.9337564),   1.0000001),
 cv(( -1.0839422,   0.0      ,  -1.8821912),   0.9999998),
 cv(( -1.3428757,   0.0      ,   0.220685 ),   1.0 ),
 cv(( -0.2771195,   0.0      ,   0.9785176),   0.9999996)
 )
 )
));

active

Syntax:

active = <scalar>

Range:

0 (FALSE) or not 0 (TRUE)

Default:

TRUE

Purpose:

A Boolean flag that controls whether the face is visible or not.

Comments:

This component may be animated. This is provided so the user can cause an object to suddenly appear or disappear in an animation.

Example:

active = TRUE

boundaries

Syntax:

boundaries = (degree = <scalar>, knots = (....), ( <boundary description> ),

( <boundary description> ),

.

.

.

( <boundary description> ) )

Default:

none.

Purpose:

This defines the shape of the face, including the outer face and all inner faces.

Comments:

The definition consists of a list of curves. The first curve in the list is considered the outer face—all subsequent curves are considered inner faces. Each curve specified has its own set of 3 components: cvs, to define the curve according to its polynomial basis; knots, to define the polynomial basis; and divisions, to define the quality of the rendering approximation. These components are discussed separately below. The boundaries component must be specified, and it must contain at least one curve. There may be any number of additional curves. Each curve in the list (even if there is only one) must be enclosed within parentheses, and the list itself must also be enclosed within parentheses. The boundaries component may not be animated.

Example:

boundaries = (
 (degree = 3,
 knots = (-0.4375   , -0.21875  ,  0.0      ,  1.0      ,  2.0 ,
 2.21875  ,  2.4375   ,  2.65625  ,  3.65625  , 4.65625
 ),
 cvs = ( cv(( -4.4072771,   0.0      ,  -7.6529346),   0.9999998),
 cv(( -5.4600935,   0.0      ,   0.897299 ),   1.0 ),
 cv(( -1.1267598,   0.0      ,   3.9786241),   0.9999996),
 cv((  4.623239 ,   0.0      ,   2.9515047),   0.9999998),
 cv((  2.9309711,   0.0      ,  -7.8625975),   1.0000001),
 cv(( -4.4072771,   0.0      ,  -7.6529346),   0.9999998),
 cv(( -5.4600935,   0.0      ,   0.897299 ),   1.0 ),
 cv(( -1.1267598,   0.0      ,   3.9786241),   0.9999996)
 )
 )

casts_shadow

Syntax:

casts_shadow = <scalar>

Range:

0 (FALSE) or not 0 (TRUE)

Default:

TRUE

Purpose:

A Boolean flag that controls whether or not this face will cast a shadow.

Comments:

This component may be animated. Note that a transparent or semitransparent object will not cast a shadow when RayCasting.

Example:

casts_shadow = FALSE

clusters

Syntax:

clusters = (<cluster matrix list>),

Range:

N/A

Default:

None.

Purpose:

A list of cluster matrices that affect the current surface.

Comments:

A cluster matrix describes the initial position of the matrix (4X4 scalars), the type of cluster effect (JOINT or LEAF), JOINT level (or 0 if the type is LEAF), and translate, rotate, scale as 3 scalar tuples.

Example:

 clusters = (
 clm( CL_r_peak,
 1.0      ,  0.0      ,  0.0      ,  0.0      ,
 0.0      ,  1.0      ,  0.0      ,  0.0      ,
 0.0      ,  0.0      ,  1.0      ,  0.0      ,
 0.283681 ,  0.0285822, -0.5841172,  1.0      ,
 LEAF, 0,
 0.0      ,  0.0      ,  0.0      ,
 0.0      ,  0.0      ,  0.0      ,
 1.0      ,  1.0      ,  1.0      ),
 clm( CL_knot45_section0_Rwrist,
 1.0      ,  0.0      ,  0.0      ,  0.0      ,
 0.0      ,  1.0      ,  0.0      ,  0.0      ,
 0.0      ,  0.0      ,  1.0      ,  0.0      ,
 0.283681 ,  0.0285822, -0.5841172,  1.0      ,
 LEAF, 0,
 0.0      ,  0.0      ,  0.0      ,
 0.0      ,  0.0      ,  0.0      ,
 1.0      ,  1.0      ,  1.0      ) 
 clm( CL_cluster#10,
 1.0      ,  0.0      ,  0.0      ,  0.0      ,
 0.0      ,  1.0      ,  0.0      ,  0.0      ,
 0.0      ,  0.0      ,  1.0      ,  0.0      ,
 0.283681 ,  0.0285822, -0.5841172,  1.0      ,
 JOINT, 3,
 -0.2398842, -0.0303474,  0.0      ,
 0.0      ,  0.0      ,  0.0      ,
 1.0      ,  1.0      ,  1.0      )              ),

cvs

Syntax:

cvs = ( <cv>, <cv>, … <cv> )

Default:

None. Must be specified.

Purpose:

Defines the control vertices for a face boundary curve.

Comments:

It may be animated.

Example:

cvs=	( cv(( 1,6,0),1),
	cv((12,6,0),1),
	cv((12,1,0),1),
	cv(( 1,1,0),1)   ),

degree

Syntax:

degree = <integer>

Range:

Greater than 0.

Default:

Required: no default

Purpose:

This defines the order of the NURBS curve in the u direction. 1 is a linear curve, 3 is a cubic, and so on.

Comments:

This component may not be animated.

Example:

degree = 3

divisions

Syntax:

divisions = <scalar>

Range:

The minimum value is 1.

Default:

None. Must be specified.

Purpose:

This defines the smoothness of the contour along the face boundary curve.

Comments:

This component may be animated. Note that face boundary curves are always subdivided using the uniform algorithm.

Example:

divisions = 8

knots

Syntax:

knots = ( <scalar>, <scalar>, …<scalar> )

Default:

None. Must be specified.

Purpose:

This specifies the knot vector for a face boundary curve. It must match with the cvs given.

Comments:

The individual values may be animated, but the number of items in the list must not change.

Example:

knots = ( 0, 1, 2, 3, 4, 5 )

light_list

Syntax:

light_list = ( <light>, <light>, … <light> )

Range:

Each light given must have been defined; literals may not be used.

Default:

See the following.

Purpose:

Each item referenced must be the name of a previously declared light data item (see Light Data Type), or an array element of type light. Literals may not be used. This lists the lights to be used by this patch. If light_list is omitted or if it is specified and is empty, all nonexclusive lights will be used to illuminate the patch. If light_list is specified, and the list contains defined lights, then all instances of those lights in the scene, and only those, will be used for this patch. This enables situations where the user may want 10 lights on a particular object, for example, but only two lights on the rest of the scene.

Comments:

It may not be animated.

Example:

light_list = ( spot01, spot02, flood, globallight )

motion_blur

Syntax:

motion_blur = <scalar>

Default:

ON

Range:

0 (OFF) or non-zero (ON)

Purpose:

If motion_blur is turned on for the file, this flag indicates that motion blur should be calculated for this object.

Example:

motion_blur = ON

motion_blur_shading_samples

Syntax:

motion_blur_shading_samples = <scalar>

Default:

3 - for bump or displacement mapped objects

1 - for all other objects

Range:

>= 3 for bump or displacement mapped objects

> 0 for all other objects

Purpose:

If motion_blur is turned on for the file, this flag indicates the number of samples done for shading of motion-blurred objects.

Example:

motion_blur_shading_samples = 1

motion_blur_texture_sample_level

Syntax:

motion_blur_texture_sample_level = <scalar>

Default:

3

Range:

0-5

Purpose:

If motion_blur is turned on for the file, this flag indicates the level of sampling done for texturing of motion-blurred objects. A 0 indicates no extra samples (lowest quality) and 5 means highest quality motion-blurred textures. Note, this flag does not apply to bump or displacement mapping.

Example:

motion_blur_texture_samples = 3

particle_collisions

Syntax:

particle_collisions = BOUNDING_BOX_COLLISIONS | OFF | GEOMETRY_COLLISIONS

Range:

As above

Default:

OFF

Purpose:

To define which objects collide with particles.

Example:

particle_collisions = BOUNDING_BOX_COLLISIONS

shader

Syntax:

shader =( <shader>)

or

shading = ( <shader>, <shader>, …

<shader> )

Range:

The shaders given may be variables or array elements of type shader (see Shader Data Type). Note that there is no such thing as a literal shader.

Default:

None. Must be specified.

Purpose:

This specifies which shading characteristics are assigned to the face.

Comments:

This component may be animated. If a list of shaders is specified, they will be visible in the order given.

Example:

shader = ( label_1, bottle_1 )