generateNormals()
Usage
member(whichCastmember).modelResource(whichModelResource).
generateNormals(style)
Description
3D
model resource command; calculates the
#mesh
If the
parameter is set to
style
belongs. Furthermore, all three of the vertices of a face will have the same normal. For example, if
the vertices of
face[1]
and the two faces share
in
normal[2]
face[2]
faces of the mesh.
If the
parameter is set to
style
number of faces to which it belongs, and the three vertices of a face can have different normals.
Each vertex normal is the average of the face normals of all of the faces that share the vertex. Use
of the
parameter results in a more rounded appearance of the faces of the mesh, except at
#smooth
the outer edges of the faces at the silhouette of the mesh, which are still sharp.
A vertex normal is a direction vector which indicates the "forward" direction of a vertex. If the
vertex normal points toward the camera, the colors displayed in the area of the mesh controlled by
that normal are determined by the shader. If the vertex normal points away from the camera, the
area of the mesh controlled by that normal will be non-visible.
After using the
generateNormals()
the mesh.
Parameters
Required. A symbol that specifies the style of the vertex.
style
Example
The following statement calculates vertex normals for the model resource named FloorMesh. The
parameter is set to
style
member("Room").modelResource("FloorMesh").generateNormals(#smooth)
See also
build(),
face[
324
Chapter 12: Methods
, each vertex receives a normal for each face to which it
#flat
all receive
normal[1]
, then the normal of
vertex[8]
. Use of the
#flat
#smooth
command, you must use the
, so each vertex in the mesh will receive only one normal.
#smooth
], normalList, normals,
vectors for each vertex of the mesh.
normal
and the vertices of
vertex[8]
parameter results in very clear delineation of the
, each vertex receives only one normal, regardless of the
flat
all receive
face[2]
normal[2]
is
in
normal[1]
face[1]
command to rebuild
build()
,
and
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers