MeshCreateDirectTrimmingRelationship

This command links two mesh nodes and creates a trimming relationship between the nodes. Trimming relies on the concept of a cloth mesh and scissor mesh. In the case of terrain and road, terrain is the cloth mesh and road is the scissor mesh.

Using This Command To Trim With Two Meshes

These instructions assume you wish to create a trim relationship between two mesh nodes. This command returns an error message if you have any incorrect elements in the selection.

  1. Left click the cloth mesh ( which might be a terrain mesh ).
  2. Hold down CTRL.
  3. Left click the scissor mesh ( which might be a road mesh ).
  4. Right click and select Extended » Create Trimming Relationship.
  5. The software adds a DelaunayTrimModifier to the mesh construction history of the cloth mesh.
  6. The DelaunayTrimModifier is linked to the scissor mesh.
  7. Any materials in the scissor mesh palette group are "copied" to the cloth mesh palette group via link nodes.
  8. Move the DelaunayTrimModifier before any projection modifiers in the mesh construction history.
  9. Double click the DelaunayTrimModifier and set the Vertical T-Junction Tolerance to the appropriate value.

    1 is a good value for small meshes. 1000 is a good value for large meshes.

Using This Command To Trim With A Mesh And A Link Node

These instructions assume you wish to create a trim relationship between a mesh node and a link node that points at a mesh node. This command returns an error message if you have any incorrect elements in the selection.

  1. Left click the cloth mesh ( which might be a terrain mesh ).
  2. Hold down CTRL.
  3. Left click the scissor ( which might be a link node that points at a road mesh ).
  4. Right click and select Create Trimming Relationship.
  5. The software adds a DelaunayTrimModifier to the mesh construction history of the cloth mesh.
  6. The DelaunayTrimModifier is linked to the scissor mesh.
  7. Any materials in the scissor mesh palette group are "copied" to the cloth mesh palette group via link nodes.
  8. Move the DelaunayTrimModifier before any projection modifiers in the mesh construction history.
  9. Double click the DelaunayTrimModifier and set the Vertical T-Junction Tolerance to the appropriate value.

    1 is a good value for small meshes. 1000 is a good value for large meshes.

Using This Command To Trim With A Mesh And A Group Node

These instructions assume you wish to create a trim relationship between a mesh node and a group node that contains multiple mesh nodes or multiple link nodes that point at mesh nodes. This command returns an error message if you have any incorrect elements in the selection.

  1. Left click the cloth mesh ( which might be a terrain mesh ).
  2. Hold down CTRL.
  3. Left click the scissor ( which might be a group node containing meshes or link nodes that point at meshes ).
  4. Right click and select Create Trimming Relationship.
  5. The software adds a DelaunayTrimModifier to the mesh construction history of the cloth mesh.
  6. The DelaunayTrimModifier is linked to the scissor mesh.
  7. Any materials in the scissor mesh palette group are "copied" to the cloth mesh palette group via link nodes.
  8. Move the DelaunayTrimModifier before any projection modifiers in the mesh construction history.
  9. Double click the DelaunayTrimModifier and set the Vertical T-Junction Tolerance to the appropriate value.

    1 is a good value for small meshes. 1000 is a good value for large meshes.

Figures

Figure 1.1. The two meshes before trimming. These meshes overlap in worldspace, but currently share no relationship. Therefore changes to either mesh do not affect the other. Notice that while the meshes overlap, the road actually extends out across the boundaries of the terrain. This is perfectly acceptable; the DelaunayTrimModifier trims the scissor mesh to fit the cloth mesh. Before Creating A Trimming Relationship Figure 1.2. The hierarchy before. There is no TrimModifier, nor any shared materials. Notice the three modifiers that handle texture coordinate projection: ProjectTextureChannel1, ProjectTextureChannel2, and ProjectTextureChannel3. Before Creating A Trimming Relationship Figure 1.3. The two meshes after. The meshes are combined geometrically. After Creating A Trimming Relationship Figure 1.4. The hierarchy after. Notice the terrain mesh palette group has a reference ( via a link node ) to the road mesh material. You can update the road mesh material, and the instance of the road material in the trimmed terrain mesh hierarchy automatically updates. The terrain mesh also has a DelaunayTrimModifier, which has been placed before the texture coordinate projection modifiers ( moving the DelaunayTrimModifier is done by-hand ). These two new nodes, the link node that references the material, and the DelaunayTrimModifier that is linked to the road mesh itself, implement the trimming relationship between these two meshes. After Creating A Trimming Relationship Figure 1.5. This is also a valid trimming configuration. The DelaunayTrimModifier is linked to a group node contains several link nodes. The link nodes point at scissor meshes in different files. The individual scissor meshes cannot overlap each other. After Creating A Trimming Relationship

Registration

Command registration information is as follows:

Category TypeInformation
ImplementationSCRIPT
ModuleDIRECT_RELATIONSHIP_SCRIPTS.SSL
CategoryRelationship Commands
GUID{FCF57D14-BF40-4448-931F-E99EC61FA188}
Source NameMeshCreateDirectTrimmingRelationship
Interface NameCreate Trimming Relationship