A patch is a NURBS surface. It may be instanced as an object in the MODEL Section. A curved or flat surface with smooth or hard edges can be created with a NURBS. A patch 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. Of the above components, cvs, uknots and vknots are required. Not all components are optional. The components may be specified in any order. Components which are not specified take on their default value. There may be any number of trim_regions. If any component other than trim_region is specified more than once, the last such specification will be used, and all previous ones ignored.
patch square_patch ( divisions = (8, 8),
shader = pink,
cvs = ( ( cv( ( 1.5, 0.0, -1.5 ), 1.0 ),
cv( ( 0.5, 0.0, -1.5 ), 1.0 ),
cv( ( -0.5, 0.0, -1.5 ), 1.0 ),
cv( ( -1.5, 0.0, -1.5 ), 1.0 ) ),
( cv( ( 1.5, 0.0, -0.5 ), 1.0 ),
cv( ( 0.5, 0.0, -0.5 ), 1.0 ),
cv( ( -0.5, 0.0, -0.5 ), 1.0 ),
cv( ( -1.5, 0.0, -0.5 ), 1.0 ) ),
( cv( ( 1.5, 0.0, 0.5 ), 1.0 ),
cv( ( 0.5, 0.0, 0.5 ), 1.0 ),
cv( ( -0.5, 0.0, 0.5 ), 1.0 ),
cv( ( -1.5, 0.0, 0.5 ), 1.0 ) ),
( cv( ( 1.5, 0.0, 1.5 ), 1.0 ),
cv( ( 0.5, 0.0, 1.5 ), 1.0 ),
cv( ( -0.5, 0.0, 1.5 ), 1.0 ),
cv( ( -1.5, 0.0, 1.5 ), 1.0 ) ) )
);
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 ) ),
It may be animated. The CVs will be interpreted in the sequence
(( cv[u=0,v=0], cv[u=0,v=1], cv[u=0,v=2], cv[u=0,v=3] ),
( cv[u=1,v=0], cv[u=1,v=1], cv[u=1,v=2], cv[u=1,v=3] ),
( cv[u=2,v=0], cv[u=2,v=1], cv[u=2,v=2], cv[u=2,v=3] ),
( cv[u=3,v=0], cv[u=3,v=1], cv[u=3,v=2], cv[u=3,v=3] ))
Note that this is the same sequence as previous versions.
See subdivide. If adaptive, then divisions takes powers of 2 in the range 1 to 128. If uniform, it uses integers greater than zero.
This component may be animated. If uniform subdivision is being used, then the first scalar specifies the number of arc subdivisions in the u direction, and the second scalar specifies the number in the v direction. If adaptive subdivision is being used, then this component specifies the minimum and maximum subdivision, respectively, to be used. Note that the minimum and maximum actually used by adaptive subdivision will be the closest power of 2 greater than or equal to that given.
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 Light Data Type for more information). 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 are 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.
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.
None. If the mate_type is parametric, a name is not required. Names are required if the mate_type is a trim, due to ambiguities.
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 patch. This may be done in order to correct potential visibility problems.
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.
shared_edge = (
(
type <name>,
start = ( <scalar>, <scalar>),
end = ( <scalar>, <scalar>),
name = <name>,
mate_patch = <name>,
mate_type = <curve type>
),
(
type <name>,
start = ( <scalar>, <scalar>),
end = ( <scalar>, <scalar>),
name = <name>,
mate_patch = <name>,
mate_type = <curve type>
),
trim_region = ( cvs = ( <trim_vertex>, <trim_vertex>, … <trim_vertex> ) )
or
trim_region = ( cvs = ( <trim_vertex>, <trim_vertex>, … <trim_vertex> ),
trim_hole = ( <trim_vertex>,
<trim_vertex>, …
<trim_vertex> ),
trim_hole = ( <trim_vertex>,
<trim_vertex>, …
<trim_vertex> ),
or trim_region = <trim_vertex_variable>
trim_hole = ( <trim_vertex>,
<trim_vertex>, …
<trim_vertex> ) )
or trim_hole = <trim_vertex_variable>
This component may be animated. There may be an arbitrary number of trim_region components for a patch. The trim_region component uses several sub-components. The CVs sub-component must be specified, but the trim_hole sub-component is optional. The specification of the CVs is identical to previous such specifications, but it must use trim_vertex data items. The trim_hole sub-component is treated separately below.
This component may be animated. There may be an arbitrary number of trim_hole sub-components for a trim_region. The specification of the trim_hole is identical to previous specifications of CVs (except for the fact that its called trim_hole instead). The actual entries must be Trim_vertex Data Type items.
Each entry must evaluate to a real number, which must be greater than or equal to the value of its predecessor.
Each entry must evaluate to a real number, which must be greater than or equal to the value of its predecessor.
To describe the degree of the nurbs curve in the u direction for patches. To define a syntactically correct curve, there must be at least degree + 1 control vertices.
To describe the degree of the nurbs curve in the v direction for patches. To define a syntactically correct curve, there must be at least degree + 1 control vertices.