Nodes Home Page  
Node Directory  
Node Hierarchy
Shout3D Nodes Reference
|
The MultiMesh node provides polygonal mesh geometry that can specify different
appearances (materials and textures) for specific groups of polygons.
It supports smoothing groups, in lieu of the simple creaseAngle
found in the IndexedFaceSet. Edges can
be designated as visible or invisible for viewing in wireframe.
The MultiMesh thus supports Multi/Sub-Object materials and smoothing groups for export from 3D Studio MAX. The Shout3D MAX exporter always exports geometry as MultiMesh nodes. Exported geometry is all triangles, regardelss of any organization into quads or n-gons in MAX.
Link to Javadocs.
appearanceIndex
IntArrayField appearanceIndex
USAGE = INDEX_ARRAY DEFAULT = {}
Assigns MultiAppearance nodes to specific polygons. For example, if an appearanceIndex
array begins [ 1, 0, 2, ...], the second MultiAppearance node in theappearance
field of the encompassing Shape (indexed as 1) is applied to the first polygon specified in thecoordIndex
. The first MultiAppearance node (indexed as 0) is applied to the second polygon, and the third MultiAppearance node (indexed as 2) is applied to the third polygon.
If the field is empty, the first MultiAppearance node is applied to all polygons.
defaultFlatShaded
BooleanField defaultFlatShaded
USAGE = ANY DEFAULT = true
This field is applicable only if no smoothing groups are specified for any polygons. If true, all polygons will be flat shaded, just as if each polygon were assigned to a separate smoothing group. If false, all polygons will be smooth shaded, just as if all polygons were assigned to a single smoothing group. This avoids the necessity of including a smoothingIndex
array in either of these cases.
edgeVisibleIndex
IntArrayField edgeVisibleIndex
USAGE = INDEX_ARRAY DEFAULT = {}
Specifies the edges that will render in wireframe (i.e., if the wire
field in the associated MultiAppearance node is set to true. The edges are specified in the order in which they specified in thecoordIndex
field. For example, assume an edgeVisibleIndex array beginning [ 1 1 0 -1 ...] The first two edges of the first polygon in thecoordIndex
field are designated as visible (1), and the third edge is invisible (0). The -1 is a delimiter signifying the end of the polygon. If the field is empty, all edges are treated as visible.
This field allows for the export of visible edge information in 3D Studio MAX. To reduce file size, it will only be exported if a "wire" material is applied to the object in MAX, and then only if there is at least one invisible edge. However, you can choose to export this information in any event by checking the "Export Visible Edge Info" box in the 3D Studio MAX exporter dialog. Note that the export of visible edge information does not preserve quads or n-gons created in MAX (the exported mesh is always fully triangular).
textureMappings
NodeArrayField textureMappings
USAGE = TEXTURE_MAPPING_ARRAY DEFAULT = {}
An array of TextureMapping nodes providing texture coordinate information for mapping images to the vertices of the MultiMesh. Shout3D currently supports only a single set of texture coordinates, and therefore there can only be a single TextureMapping node in this array. The use of an array will support the future implementation of multiple texture mappings to apply to the different kinds of maps in a MultiAppearance node.
The use of TextureMapping nodes here can be contrasted with the direct inclusion of the texCoord
andtexCoordIndex
fields in the IndexedFaceSet.
smoothingIndex
IntArrayField smoothingIndex
USAGE = INDEX_ARRAY DEFAULT = {}
Organizes the polygon into smoothing groups. Polygons that belong to a single smoothing group will render smoothly across any shared edges. Polygons that do not belong to the same smoothing group will evidence a lighting discontinuity across shared edges (hard edges). Contrast with the less precise smoothing parameter provided by the creaseAngle
field of the IndexedFaceSet node.
Polygons are assigned to smoothing groups in the order in which they are specified in the coordIndex
field. For example, assume asmoothingIndex
array beginning [ 2 -1 2 -1 3 -1 ...]. The first and second polygons in thecoordIndex
array are assigned to smoothing group 2, and the third polygon is assigned to smoothing group 3. The use of -1 as a delimiter is required because a polygon can belong to more than one smoothing group. For example, assume assume a smoothingIndex array beginning [ 2 4 -1 2 -1 ...]. In this case, the first polygon specified in thecoordIndex
array is assigned to smoothing groups 2 and 4, while the second polygon is assigned only to smoothing group 2.
The primary purpose of the smoothingIndex
is to support the export of smoothing group information from 3D Studio MAX.
ccw
BooleanField ccw
Inherited from Mesh
USAGE = ANY DEFAULT = true
Determines the direction of the renderable side of the mesh. Changing the value from true to false, or vice versa, "flips the normals" and causes the opposite site of the mesh to render.
colorIndex
IntArrayField colorIndex
Inherited from Mesh
USAGE = INDEX_ARRAY DEFAULT = {}
Used, optionally, to apply the list of colors in the Color node of the color
field to specific vertices or faces.If this field is empty, only the coordIndex
field is used for this purpose. In the case of color per polygon (colorPerVertex=false
), the colors in Color node are applied to each polygon in the order in which polygons are specified in thecoordIndex
field. Thus there must be at least as many colors in the Color node as there are polygons in thecoordIndex
field. In the case of vertex color (colorPerVertex=true
), the colors in the Color node are applied to each vertex in each polygon in the order in which vertices are listed in thecoordIndex
field. Thus there must be at least as many colors in the Color node as there are indices (vertices) in thecoordIndex
field.If this field is not empty, the order of polygons or vertices in the coordIndex
field is still used, but the specific color to be assigned is determined by the values in thecolorIndex
. In the case of color per polygon (colorPerVertex=false
), each polygon in thecoordIndex
field is assigned a color using the corresponding index value in thecolorIndex
array. For example, acolorIndex
array beginning [2,0,...] indicates that the third color in the Color node (indexed as 2) is to be applied to the first polygon specified in thecoordIndex
field, and that the first color in the Color node (indexed as 0) is to be applied to the second polygon specified in thecoordIndex
field. In the case of vextex color (colorPerVertex=true
), each vertex in each polygon thecoordIndex
field is assigned a color using the corresponding index value in thecolorIndex
array. For example, acolorIndex
array beginning [2 0 3 -1, ...] indicates that the third color in the Color node is to be applied to the first vertex of first polygon specified in thecoordIndex
field, the first color in the Color node is to be applied to the second vertex of the first polygon, and the fourth color in the Color node is to be applied to the third vertex of the first polygon.
colorPerVertex
BooleanField colorPerVertex
Inherited from Mesh
USAGE = ANY DEFAULT = true
If true, the values in the color
field are applied to vertices ("color per vertex" or "vertex colors"). If false, the values in thecolor
field are applied to polygons ("color per polygon").Applies only if the value in thecolor
field is not null
When using vertex or face colors on a MultiMesh object the following restrictions apply to the accompanying MultiAppearance node:
- The value in the
selfIlluminate
field must be true.- There can be no maps. (All map fields must be null. Thus you cannot export materials that blend vertex colors with texture maps from 3D Studio MAX.
- There must be a Material node in the
material
field. Thetransparency
field of that node must be set to 0 (the default - no transparency).Thus, you'll generally use the following appearance
field:appearance MultiAppearance { material Material {} selfIlluminate true }
coordIndex
IntArrayField coordIndex
Inherited from Mesh
USAGE = INDEX_ARRAY DEFAULT = {}
Specifies each polygon in the mesh by reference to the vertices in the Coordinate node in the coord
field. -1 and -2 are delimiters indicating the end of a polygon. For example, the array {0, 1, 3, -1, 3, 0, 2, -1} specifies two triangular polygons (or polylines). The first one is created by connecting the first, second and fourth vertices listed in the Coordinate array. The second is created by connecting the fourth, first and third vertices listed in the Coordinate array.
color
NodeField color
Inherited from Geometry
USAGE = COLOR_NODE DEFAULT = null
A Color node containing a list of RBG color values.
If this field is null, the geometry is rendered normally, using the material and texture values in the applicable MultiAppearance node.
coord
NodeField coord
Inherited from Geometry
USAGE = COORDINATE_NODE DEFAULT = null
Contains a Coordinate node specifying the vertices of the mesh.
onFieldChange
void onFieldChange(Field theField, java.lang.Object userData)
Copyright© 1999-2001,
Shout3D LLC.