A polyset is a polygonal mesh. It may be instanced as an object in the MODEL Section. A polyset 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:
Like a patch and a face, all components are specified using a keyword = value form. Components are separated by commas, and may be in any order. Not all components are optional. With the exception of the shader component, if components are specified multiple times, the last specification is used. Multiple shader components may be present in the polyset definition and be used by individual polygons. Components not specified take on their default value.
polyset Poly_1 (
active = ON,
motion_blur = ON,
smooth = ON,
doublesided = ON,
opposite = OFF,
shader = (DefaultShader ),
shader = (ShaderNumber2 ),
casts_shadow = TRUE,
vertices = ((cv((-11.89838, 4.210732, 0.0), 1)),
(cv((-2.174469, -7.479493, 0.0), 1)),
(cv((-13.28751, -8.289707, 0.0), 1)),
(cv((-2.174469, 6.409883, 0.0), 1)) ),
texture_vertices = (
st( 0.125000, 0.850394 ),
st( 1.000000, 0.055118 ),
st( 0.000000, 0.000000 ),
st( 1.000000, 1.000000 ) ),
vertex_normals = (
norm( 0.000000, 0.000000, 1.000000 ),
norm( 0.000000, 0.000000, 1.000000 ),
norm( 0.000000, 0.000000, 1.000000 ),
norm( 0.000000, 0.000000, 1.000000 ) ),
polygons = (
polygon ((0, 1, 2),(0, 1, 2),(0, 1, 2), 0 ),
polygon ((1, 0, 3),(1, 0, 3),(1, 0, 3), 1 )
)
); /* end of polyset ‘Poly_1’ */
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.
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 ) ),
The scalar will be interpreted as a Boolean, with 0 being FALSE and any other value TRUE. If doublesided is FALSE, rendering proceeds more quickly, but only one side of the surface is rendered. For most objects other than closed surfaces, doublesided = TRUE is desirable. The reader is warned that with the raytracer, rays may strike the object from any direction.
Each item referenced must be the name of a previously declared light data item, or an array element of type light (see the Light Data Type for more information). Literals may not be used. This lists the lights to be used by this polyset. If light_list is omitted or if it is specified and is empty, all nonexclusive lights are used to illuminate the polyset. 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 polyset. This enables situations where you may want 10 lights on a particular object, for example, but only two lights on the rest of the scene.
If motion_blur_on is set for the file, this flag indicates that motion blur should be calculated for this object.
If motion_blur_on is set for the file, this flag indicates the number of samples done for shading of motion-blurred objects.
motion_blur_texture_sample_level
If motion_blur_on is set 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.
This component may be animated. If doublesided is FALSE (for example, for faster execution), opposite can be used to reverse the orientation of the backfacing and frontfacing parts of the polyset. This may be done in order to correct potential visibility problems.
This component may not be animated. As particle emission rates depend on the area of a polygon, the area list component allows the initial areas of polygons to be set and made constant. The area list is indexed by the polygon number, so that polygon 0 in the polyset would use the first element of the area list.
polygon( (<integer>, <integer>, <integer>), [(<integer>, <integer>, <integer>),] [(<integer>, <integer>, <integer>)] [, <integer>])
Part of a polyset declaration. The integers represent indexes into the vertex, texture vertices, and vertex normals arrays that must accompany a polyset declaration. Additionally, the last parameter indicates which shader of those specified in the shader declarations should be used for this polygon.
polygon ((0, 1, 2),(3, 4, 5),(6, 7, 8), 0 )
The above example indicates that the polygon should use vertices number 0, 1, and 2 for position, texture vertices number 3, 4, and 5 for texture coordinates, and vertex normals 6, 7, and 8 for normals.
The trailing 0 indicates that the first shader declared in the polyset should be used to shade the polygon.
Note that the texture vertex and vertex normal data is optional. If the texture vertex information is not specified then 0, 0 will be used as texture coordinates. If the vertex normal data is not specified (and the vertex_normals list is not specified in the polyset), then the normals will be computed prior to rendering.
The shaders given may be variables or array elements of type shader (see Shader Data Type for more information). Note that there is no such thing as a literal shader.
This component may be animated. If a list of shaders is specified, they will be visible in the order given.
Note also that multiple occurrences of the shader component may occur in a polyset definition. This allows multiple shaders to be assigned to the polyset. The shader used for any given polygon is specified as part of the polygon definition.
Defines the texture vertex array for the polyset. The first texture vertex encountered is considered texture vertex 0 for the purposes of the polygon indices later in a polyset declaration, the second texture vertex encountered is considered vertex 1, and so on..
This component must be specified before the 'polygons' component.
Example:
texture_vertices = (
st( 0.125000, 0.850394 ),
st( 1.000000, 0.055118 ),
st( 0.000000, 0.000000 ),
st( 1.000000, 1.000000 ) ),
Defines the vertex normal array for the polyset. The first vertex normal encountered is considered vertex normal 0 for the purposes of the polygon indices later in a polyset declaration, the second vertex normal encountered is considered vertex normal1, and so on..
This component must be specified before the 'polygons' component.
Example:
vertex_normals = (
norm( 0.000000, 0.000000, 1.000000 ),
norm( 0.000000, 0.000000, 1.000000 ),
norm( 0.000000, 0.000000, 1.000000 ),
norm( 0.000000, 0.000000, 1.000000 ) ),
vertices = ( (<cv> [, <st>] [, <norm>]), (<cv> [, <st>] [, <norm>]), ... (<cv> [, <st>] [, <norm>]) )
Defines the vertex array for the polyset. The first vertex encountered is considered vertex 0 for the purposes of the polygon indices later in a polyset declaration, the second vertex encountered is considered vertex 1, and so on.
In version 7, it is now also possible to write the vertex normals and texture coordinates in separate lists of items, and index them separately by polygons. Because of this, Alias no longer places texture coordinates in the vertex definitions, though compatibility is maintained for older SDL files using this format.
This component must be specified before the 'polygons' component. The <cv>s and <st>s are implicitly paired by the syntax, and this pairing is maintained.
vertices = ((cv((-11.89838, 4.210732, 0.0), 1)),
(cv((-2.174469, -7.479493, 0.0), 1)),
(cv((-13.28751, -8.289707, 0.0), 1)),
(cv((-2.174469, 6.409883, 0.0), 1)) ),
The equivalent of this example with vertex normals and texture coordinates is:
vertices = ((cv(( 0.0 , -0.5 , 0.0 ), 1.0 ), st( 0.0 , 0.0 ), norm (1.0, 0.0, 0.0)), and so on.