Genome
RSS< Twitter< etc

<< Genome Index

Genome Iteration Modes

Overview

The Genome modifier operates on data channels, one item at a time. To do this, it performs internal loops over the sub-object items.

The currently available Iteration modes are:

Vertex

The Genome Modifier loops through all mesh vertices of the incoming TriMesh.

Available Input channels are:

Position

Contains the object space position of the vertex as float32[3]

Selection

Contains the Soft-Selection value of the vertex as float32[1].

Note that the Soft-Selection value is not clamped between 0.0 and 1.0 and can be negative or higher than 1.0. It is used as a multiplier in most deformation modifiers and can exaggerate or invert their effect if set to values outside the 0.0 to 1.0 range.

Normal

Contains the object space Vertex Normal as calculated by 3ds Max using the Face Normals and Smoothing Groups as float32[3].

Index  

Contains the internal loop's iteration counter as int32[1].

In Vertex iteration mode, it corresponds to the zero-based Vertex Index.

Available Output channels are

Position

Sets the object space position of the vertex as float32[3].

Selection

Sets the Soft-selection value of the vertex as float32[1].

Note that 3ds Max modifiers support arbitrary values in the Soft-Selection (Weigth) channel, including negative ones. The effect of modifiers that support the vertex selection channel will be aplified or reversed if the values are outside the 0 to 1 range.

 

Face 

Loops through all faces of the incoming TriMesh.

Available Input channels are:

FaceNormal

The normal vector of the face, equivalent to the unit vector parallel to the vector cross product of two edges of the face taken in counter-clockwise order.

FaceCenter

The center of the face, equivalent to the average of its three vertex positions.

Corresponds to the barycentric coordinates [0.3333,0.3333,0.3333], or the average of the three vertex positions of the face. A float32[3] value.

This is not a native face channel, but is calculated and provided by Genome for convenience.

For meshes external to the Genome modifier, it can be calculated using the FaceQuery operator with default barycentric coordinates.

FaceArea

The area of the face in units squared, equivalent to half the magnitide of the vector cross product of two edges of the face.

This is not a native face channel, but is calculated and provided by Genome for convenience.

FaceElement

The element index of the face.

Each face belongs to exactly one element which is a group of interconnected faces.

This value (an int32[1] value) represents the index of the element the face belongs to. It can be used to test against a specific element's index or query element data.

This is not a native face channel, but is calculated and provided by Genome for convenience.

The order of elements is not explicitly defined, and it depends on the state of the "Remove Degenerate Faces" option in the Genome modifier's UI.

FaceSelection

The selected state of the face, an int8[1] value. Either 1 (selected) or 0 (not selected).

MtlIndex

The Face's Material ID used to resolve the sub-material assignment.

The channel name was selected for consistency to match the name used by Particle Flow and the Krakatoa Magma modifier.

Note that when using the FaceQuery operator, the name MaterialID is used for compatibility reasons.

SmoothingGroup

The Face's Smoothing Group value, an int32[1] value where each of the 32 bits represents a smoothing group's state.

Index

Provides access to the loop's iteration counter.

This is not a native face channel, but is provided by Genome for convenience.

FaceIndex

The face index. Same as the Index channel's value.

This is not a native face channel, but is provided by Genome for convenience.

 

Output Channels are

FaceSelection

Sets the selected state of the face, an int8[1] value.

Expects 0 (not selected), or any non-zero value (selected) representing FALSE and TRUE Booleans.

MtlIndex

Sets the Face's Material ID used to resolve the sub-material assignment. An int32 value.

Unlike the MAXScript MaterialID value, this value is 0-based, just like its PRT/Particle Flow equivalent.

SmoothingGroup

Sets the Face's Smoothing Group value. An int32 value.

Each bit of the value corresponds to a smoothing group's state.

 

Face Corner

This is a special iteration mode which loops through all faces of the incoming TriMesh and performs a second internal loop over the three vertices of the face and the corresponding map faces' vertices.

Available Input channels are

Position

The Mesh Vertex position in object space. A float32[3] value.

A single mesh vertex can correspond to multiple mapping vertices. It is thus possible that the same mesh vertex can be revisited multiple times within the loop.

Normal

The average of all Face Normal values, float32[3].

Selection

The Vertex Soft-Selection value. A float32[1] value.

SelectionFromFaceAvg

Vertex Selection Weight, from the average of the FaceSelection values. A float32[1] value.

This is not a native face channel, but is calculated and provided by Genome for convenience.

SelectionFromFaceUnion

Vertex Selection Weight, from the union of the FaceSelection values. An int32[1] value.

This is not a native face channel, but is calculated and provided by Genome for convenience.

SelectionFromFaceIntersect

Vertex Selection Weight, from the intersection of FaceSelection values. A float32[1] value.

This is not a native value of the face, but is calculated and provided by Genome for convenience.

Color

The Vertex Color channel value. Corresponds to Mapping Channel 0. A float32[3] value.

TextureMap

The TextureMap channel value. Corresponds to Mapping Channel 1. A float32[3] value.

MappingN

Where N is a number between 2 and 99. The Mapping channel value between Mapping2 and Mapping99. A float32[3] value.

SmoothNormal

The vertex normal vector as calculated by 3ds Max according to the Smoothing Groups. An int32[1] value.

FaceNormal

The face normal of the mesh face. A float32[3] value.

FaceCenter

The center of the mesh face, equivalent to the average of the three vertex positions. A float32[3] value.

FaceArea

The area of the mesh face in generic units squared, equivalent to half the length of the vector cross product of two edges of the face.

This is not a native face channel, but is calculated and provided by Genome for convenience.

FaceElement

The element index of the mesh face.

Each face belongs to exactly one element which is a group of interconnected faces.

This value (an int32[1] value) represents the index of the element the face belongs to. It can be used to test against a specific element's index or query element data.

This is not a native face channel, but is calculated and provided by Genome for convenience.

The order of elements is not explicitly defined, and it depends on the state of the "Remove Degenerate Faces" option in the Genome modifier's UI.

FaceSelection

The selected state of the face, an int8[1] value. Either 1 (selected) or 0 (not selected).

MtlIndex

The Face's Material ID used to resolve the sub-material assignment. The channel name was selected for consistency to match the name used by Particle Flow and the Krakatoa Magma modifier.

SmoothingGroup

The Face's Smoothing Group value, an int32[1] value where each of the 32 bits represents a smoothing group's state.

Index

Provides access to the loop's iteration counter. This value is not a native value of the face, but provided by Genome for convenience.

FaceIndex

The face index. Same as the Index channel's value. This value is not a native value of the face, but provided by Genome for convenience.

VertexIndex

The vertex index, between 0 and 2. An int8[1] value.

 

Available Output Channels are

Color

The Vertex Color channel. Corresponds to Mapping Channel 0. A float32[3] value.

TextureMap

The TextureMap channel. Corresponds to Mapping Channel 1. A float32[3] value.

MappingN

Where N is a number between 2 and 99. Mapping channel between Mapping2 and Mapping99. A float32[3] value.

 

Sub-Object Selection

The 3ds Max Modifier Stack provides several sub-object modes when dealing with Editable Mesh Geometry - Vertex, Face, Edge and Element (where the latter is a special case of face selection).

The Genome modifier currently supports vertex and face sub-object selection modes according to the Iteration mode and Output channel.