Genome
RSS< Twitter< etc

<< Genome Index

Genome Magma Operators

The Magma implementation of the Genome modifier shares most features and operators with the Krakatoa Magma modifier, in particular the Arithmetic, Trigonometry, Vector, Convert and Logic operators.

The lists of Input nodes and Object-related operators are slighly different though, due to the mesh-oriented nature of Genome.

The following is the list of new operators found in Genome that are not currently part of Krakatoa Magma.

Convert Category

The Convert Category can be accessed by pressing the [C] key while the Editor has focus. Alternatively, it can be accessed via the Depot.

AngleAxisToQuat

Keyboard Shortcut: [C]>[A] (in Genome v1.1 and higher)

Inputs: This operator has two optional input sockets - the Angle in Radians (defaults to 0.0) and an arbitrary Axis (defaults to [0,0,1]).

Outputs: The output is the Quaternion representation of the rotation about the given axis at the given angle.

EulerAnglesToQuat

Keyboard Shortcut: [C]>[E] (in Genome v1.1 and higher)

Inputs: This operator has three optional input sockets, each one defining a rotation about the X, Y or Z axis in Radians. All inputs default to 0.0.

Outputs: The output is the Quaternion representation of the Euler Angles Rotation. The axis order is X, Y and then Z.

Input Category

The Input Category can be accessed by pressing the [I] key while the Editor has focus. Alternatively, it can be accessed via the Depot.

CurrentMesh 

Keyboard Shortcut: [I]>[M]

Inputs: None

Outputs: This input node exposes one output socket. 

Functionality: It provides the geometry of the current modifier and can be connected anywhere an InputGeometry node can be plugged in (e.g IntersectRay, NearestPoint, FaceQuery, MeshQuery) to perform queries on the current object's mesh data.

InputBoundBox

Keyboard Shortcut: [I]>[B]

Inputs: None

Outputs: This input node provides three output sockets.

The first contains the Min. value of the Modifier's Bounding Box (visualized as a box gizmo around the object space extents of the incoming geometry).

The second contains the Max. value of the Modifier's Bounding Box.

The third contains the Center of the Bounding Box.

Functionality: Currently, these values are calculated automatically based on the incoming mesh and cannot be transformed yet. Also, the Bounding Box repsects the incoming sub-object selection mode and can be smaller than the whole object if a fraction of the vertices or faces are selected.

InputField

Keyboard Shortcut: [I]>[F]>[ENTER]

Inputs: The operator has one mandatory input socket which defines the sampling position in the field in World Space coordinates.

Outputs: The operator can have an arbitrary number of output sockets representing the various fields available in the Field Source object. While there is no Field provided yet, one default output socket called Invalid will exist to allow the insertion of the operator in existing flows.

Functionality: This operator samples field data at a specified point in world space from a selected Field Source object or Field Data Sequence. Supported scene Field source objects are all Stoke Field objects, FumeFX and PhoenixFD simulation objects, and 3ds Max Force SpaceWarps. Supported override file sequences are .FXD, .F3D and .VDB.

Note that the InputTexmap node found in Krakatoa MX does not exist in Genome. See Object > TexmapEval below.

Object Category

The Object Category can be accessed by pressing the [O] key while the Editor has focus. Alternatively, it can be accessed via the Depot.

ElementQuery

Keyboard Shortcut: [O]>[E]

Inputs: It has three input sockets:

Geometry - this input is mandatory and should be connected to an InputGeometry or CurrentMesh node.

ObjIndex - this input has a default value of 0 and defines the geometry object from the InputGeometry list. 

ElementIndex - this input has a default of 0 and defines the index of the element within the geometry object to query.

Outputs: This operator provides three outputs to access to the Area, Volume and Centroid of mesh elements (interconnected faces).

TexmapEval

Keyboard Shortcut: [O]>[T]

Functionality: This operator is the replacement of the InputTexmap node found in Krakatoa MX 2 Magma. Other than the Krakatoa counterpart, it does not support implicit data channels but requires the necessary channels to be provides as explicit inputs.

Inputs: It has 6 default input sockets, with the ability to add any of the 98 3ds Max Mapping channels as additional inputs:

Lookup Point (OS) - the object space vertex Position to sample at when evaluating 3D procedural texture maps. Default is [0,0,0].

VertexColor - the Mapping Channel 0 value to use when a map is using the Vertex Color channel as Explicit UV coordinates. Default is [0,0,0].

TextureCoord - the Mapping Channel 1 value to use when a map is using the Mapping 1 channel as Explicit UV coordinates. Default is [0,0,0].

Normal (OS) - the object space Normal to use when a normal vector is required by a map (e.g. Falloff map). Default is [0,0,0].

MtlID - the Material ID (for maps that might depend on the Material ID to perform calculations). Default is 0.

IOR - the material's Index Of Refraction (for maps that might require that value to process refractions). Default is 1.0.

Outputs: There is one output socket. It can be set to provide either the Color (Vector) value of the texture map (default), the Mono (Float) value of the texture map, or the NormalPerturb (Vector) value used for Bump mapping.

 VertexQuery

Keyboard Shortcut: [O]>[X]

Functionality: This operator is similar to the existing FaceQuery operator, but provides access to an indexed vertex in a mesh specified either via an InputGeometry or CurrentMesh input node.

Inputs: It has three input sockets and an arbitrary number of output sockets. The three input soclets are:

Geometry - the geometry object(s) to query, provided by InputGeometry or CurrentMesh.

ObjInde - the zero-based index of the object to query. If using CustomMesh, use the default of 0. 

VertIndex - the zero-based vertex index to query. Usually set to the VertexIndex channel.

Outputs: By default, the Position channel will be exposed as output. This can be controlled using the >Expose Property option in the operator's Properties and Actions rollout.

Other available Mesh vertex channels can be specified, for example Normal and Selection.

Loop Category

Available in Genome v1.1 and higher (part of Stoke MX 2)

The Loop Category can be access by pressing the [P] key while the Editor has focus. Alternatively, it can be accessed via the Depot.

All loops have a user-specified number of constant-valued inputs and a user-specified number of outputs. For each output there is an associated input socket that provides an initial value. During each loop iteration the output sockets is assigned a new value and on the next iteration the associated input socket will reflect this. The output sockets of the Loop node produce the last value that was assigned inside the loop.

All Loop operators expose a Max. Iterations property which can be used to limit the total number of iterations the loop can peform. The default value is 1000, but in the case of the Loop operator it should be set to a value that allows the custom exit condition to finish the loop instead of finishing prematurely due to the Max. Iterations.

Loop

 Keyboard Shortcut: [P]>[L]

Functionality: The Loop node is a general-purpose looping construct most similar to a while loop in C/VB/C#/etc. 
The loop operates until the "Condition" socket inside the loop is assigned a value of False. Typical uses of this node is to loop over all faces of a mesh, or loop until a bouncing RayIntersect does not hit geometry. There is an adjustable property that limits the number of times the loop can execute in order to avoid an infinite loop when a bad configuration is done.

Inputs: It has no default inputs. An arbitrary number of custom inputs can be defined via the operator's UI. An arbitrary number of outputs can also be defined which automatically provide matching custom Inputs to define their initial values.

Outputs: It has no default outputs, but one custom output will be pre-defined at node creation and will be exposed as both an [Input] and an Output socket.

VertexLoopByEdge

Keyboard Shortcut: [P]>[B]

Functionality: This loop visits each vertex that neighbors the "current vertex" via a single edge. 
Inside the VertexLoopByEdge node you can use a LoopChannel node to access the vertex properties of the vertex the loop is currently visiting. This is exactly like using an InputChannel node, except it reads from the vertices we are looping over inside the VertexLoopByEdge node.
You can recreate the Relax modifier using VertexLoopByEdge to collect the average position of the neighbor vertices and blending between that average position and the original vertex position.

Inputs: The node has 3 predefined input sockets that take the Geometry list, an index into the Geometry list (ie. which mesh), and a vertex index. This uniquely specifies a single vertex in the geometry which is called the "current vertex" while looping.
An arbitrary number of custom inputs can be defined via the operator's UI. An arbitrary number of outputs can also be defined which automatically provide matching custom Inputs to define their initial values.

Outputs: It has no default outputs, but one custom output will be pre-defined at node creation and will be exposed as both an [Input] and an Output socket. 

FaceLoopByEdge

Keyboard Shortcut: [P]>[E]

Functionality: This loop visits each face that neighbors the "current" face via an edge. The node has 3 predefined input sockets that take the Geometry list, an index into the Geometry list (ie. which mesh), and a face index. This uniquely specifies a single face in the geometry which is called the "current face" while looping.
Inside the FaceLoopByEdge node you can use a LoopChannel node to access the face properties of the face the loop is currently visiting. This is exactly like using an InputChannel node, except it reads from the faces we are looping over inside the FaceLoopByEdge node.
You can diffuse a face selection using FaceLoopByEdge to determine if any neighbor faces are selected. If they are select the "current face" too by writing True to the FaceSelection channel outside of the loop.

FaceLoopByVertex

Keyboard Shortcut: [P]>[V]

Functionality: This loop visits each face that contains the "current vertex". 
Inside the FaceLoopByVertex node you can use a LoopChannel node to access the face properties of the face the loop is currently visiting. This is exactly like using an InputChannel node, except it reads from the faces we are looping over inside the FaceLoopByVertex node.
You can convert a face selection to a vertex selection by counting how many faces using a vertex are selected and how many are not selected. You could consider the vertex selected if at least 1 face is selected, or if all faces are selected. You could generate a soft selection by dividing the number of selected faces by the total number of faces visited.

Inputs: The node has 3 predefined input sockets that take the Geometry list, an index into the Geometry list (ie. which mesh), and a vertex index. This uniquely specifies a single vertex in the geometry which is called the "current vertex" while looping.
An arbitrary number of custom inputs can be defined via the operator's UI. An arbitrary number of outputs can also be defined which automatically provide matching custom Inputs to define their initial values.

Outputs: It has no default outputs, but one custom output will be pre-defined at node creation and will be exposed as both an [Input] and an Output socket. 

VertexLoopByFace

Keyboard Shortcut: [P]>[F]

Functionality: This loop visits each vertex contained in the "current face". 
Inside the VertexLoopByFace you can use a LoopChannel node to access the vertex and face-vertex properties of the face-vertex the loop is currently visiting. This is exactly like using an InputChannel node, except it reads from the face-vertex we are looping over inside the VertexLoopByFace node.
This node could be used for calculating the centroid of the face (ie. a weighted sum if the face's vertex positions). This is primarily intended for working with polygon meshes once we add support for them.

Inputs: The node has 3 predefined input sockets that take the Geometry list, an index into the Geometry list (ie. which mesh), and a face index. This uniquely specifies a single face in the geometry which is called the "current face" while looping.

ParticleSearch

Keyboard Shortcut: [P]>[S]

Functionality: This loop has two modes, controlled by the searchMode property. In 'Radius' mode it visits all particles within a sphere specified by a position and radius passed in input sockets 2 and 3 respectively. In 'Count' mode it visits the closest N particles to the specified position.
Inside the ParticleSearch you can use a LoopChannel node to access the properties of the particle the loop is currently visiting. This is exactly like using an InputChannel node, except it reads from the particle we are looping over inside the ParticleSearch node.
This node could be used to find the average density of nearby particles by accumulating the Density of each particle visited, then dividing by the volume of the sphere searched.