Configure A Trim

This exercise teaches you how to configure a trimming relationship between two meshes. The previous exercises featured models with pre-configured trim relationships. Pre-configuration is preferable because it makes it easier for scene designers to work, but there may be cases where pre-configuration is not possible.

Create The Meshes

This series of instructions teaches you how to create and format the meshes used in this exercise.

  1. Start ShaderDesigner. ( Start » Programs » Scenomics » ShaderDesigner Application ).
  2. Open \Samples\Palettes\base_palette.box.
  3. Start SceneDesigner. ( Start » Programs » Scenomics » SceneDesigner Application ).
  4. Save the new file as \Samples\Basics\UserTrimRelationship.box.
  5. Select Worksheet » Show » Edges, Curves, Handles from the main menu. ( ALT + W + S + S )
  6. Right click over the group node named Scene and select Templates » Sheet from the listed options.
  7. Right click over the group node named Sheet and select Expand Selection from the listed options.
  8. Set the name of Sheet to Terrain.
  9. Return to ShaderDesigner.
  10. Right click over the group node named Landscape and select Show Only This Group from the listed options: This is a picture of the hierarchy.
  11. Right click over the material node named Landscape and select Copy To Link from the listed options.
  12. Return to SceneDesigner.
  13. Right click over the mesh node named Mesh and select Replace Material With Pasted Link from the listed options.
  14. Again, right click over the mesh and select Synchronize Mesh With Material from the listed options.
  15. Delete the link node named Lambert. This is a picture of the hierarchy.

    The worksheet looks like this:

    This is a picture of the worksheet.
  16. Right click over the group node named Scene and select Scenery » Road from the listed options.
  17. Right click over the group node named Road and choose Expand Selection from the listed options.

    The hierarchy looks like this:

    This is a picture of the hierarchy.

Create The Trim Relationship

This series of instructions teaches you how to create a trim relationship for the meshes.

  1. Left click the first mesh node that represents the landscape. We'll refer to this mesh as the "cloth".
  2. Hold down CTRL and left click the mesh node that represents the road. We'll refer to this mesh as the "scissors". This is a picture of the hierarchy.
  3. Right click over either mesh and select Extended » Trim Relationship from the listed options.

    The DelaunayTrimModifier destroyed the UV parameters when it resurfaced the mesh. This is easy to fix.

    This is a picture of the worksheet.
  4. Left click and drag the DelaunayTrimModifier to the immediate left of the icon of the first PlanarProjectTextureModifier. Release the left mouse button to drop the modifier into its new position. This is a picture of the hierarchy.

    The DelaunayTrimModifier operations now occur before the application of UV coordinates.

    This is a picture of the worksheet.
  5. Right click over the modifier named RectangleGeometryModifier and select Displace from the listed options.

    This displays the file open dialog and allows you to choose a displacement map from the hard disk.

  6. Choose \Textures\displacement_map.bmp. This is a picture of the worksheet.

Modify The Curve

This series of instructions teaches you how modify the rail curve and cross-section curve.

  1. Left click the worksheet.
  2. Hit U to set the software to select curves.
  3. Left click the rail curve as indicated below: This is a picture of the worksheet.
  4. Hit Q and F2 to set the software to translate mode and align the manipulator with the selection.
  5. Left click the blue manipulator handle and slowly raise the curve until the worksheet looks something like this: This is a picture of the worksheet.
  6. Hold down CTRL and drag the red manipulator handle until the manipulator is centered over the curve. ( Holding down CTRL allows you to move the manipulator without translating the selection. ) This is a picture of the worksheet.
  7. Hit W to set the software to scale.
  8. Left click and slowly drag the red manipulator handle until the curve is about the same size as shown below: This is a picture of the worksheet.
  9. Hit E to set the software to rotate mode.
  10. Left click and slowly drag the blue rotate handle until the curve is rotated about the same amount as shown below: This is a picture of the worksheet.

Shape The Road

This series of instructions teaches you how shape the road.

  1. Left click the worksheet.
  2. Hit U to set the software to select curves.
  3. Left click the rail curve as indicated below:
  4. Right click on the worksheet and select Divide from the listed options.
  5. Hit I to set the software to select curve points.
  6. Hit Q to set the software to translate mode.
  7. Drag a fence around the curve point, as shown below: This is a picture of the worksheet.
  8. Left click the green manipulator handle and slowly drag it toward the bottom of the worksheet until it matches the image below: This is a picture of the worksheet.
  9. Right click and select Bevel from the listed options. This is a picture of the worksheet.
  10. Hit U to set the software to select curves.
  11. Left click the segment as indicated below: This is a picture of the worksheet.
  12. Right click and select Fit Bezier from the listed options.
  13. Hit SPACE to set the software to select mode ( which hides the manipulator ). This is a picture of the worksheet.
  14. Hit ESC to clear the selection.
  15. Hold down SHIFT and left click the linear section on either side of the Bezier section. This is a picture of the worksheet.
  16. Right click and select Tessellation » Fragments: 4 from the listed options. This is a picture of the worksheet.
  17. Examine the hierarchy and double click the DisplaceModifier.
  18. Set Translation to 24. This is a picture of the worksheet.
  19. Right click the RectangleGeometryModifier and select Double Tessellation from the listed options. This is a picture of the worksheet.
  20. Examine the hierarchy and find the group node named Road.
  21. Find the child group named Cross and left click the curve node named Cross.
  22. Select Edit » Clone Selection from the main menu.
  23. Again, select Edit » Clone Selection from the main menu.
  24. The hierarchy looks like this: This is a picture of the worksheet.
  25. Left click the second curve named Cross.
  26. Carefully navigate straight through the terrain until you can see the grid and world origin. This is a picture of the worksheet.
  27. Select Worksheet » Manipulator » Reset Position, Orientation, Scale from the main menu.
  28. Hit E to set the software to rotate mode.
  29. Left click the green manipulator handle and slowly drag until the curve is slightly rotated: This is a picture of the worksheet.
  30. Navigate until you can see the elbow bend in the road.

    You can see the road bank effect. You can assign up to one cross-section curve to every segment in the rail curve.

    This is a picture of the worksheet.

Create Water

This series of instructions teaches you how add water to the scene.

  1. Examine the hierarchy and find the group node named Terrain.
  2. Right click over its child mesh named Mesh and select Create Water Mesh from the listed options.
  3. Scroll down and right click over the group node named Water and select Expand Selection from the listed options.
  4. Return to ShaderDesigner.
  5. Right click over the group node named Bay and select Show Only This Group from the listed options.
  6. Right click over the material node named Bay and select Copy To Link from the listed options.
  7. Return to SceneDesigner.
  8. Find the group node named Water.
  9. Right click over its child mesh named Mesh and select Replace Material With Pasted Link.
  10. Delete the link nodes named Landscape and Road.
  11. Right click over the mesh node and select Synchronize With Material from the listed options.
  12. Navigate until you can see the entire mesh. This is a picture of the worksheet.

Paint The Scene

This series of instructions teaches you how to paint the scenery.

  1. Examine the hierarchy and find the group node named Terrain.
  2. Use SHIFT to select all the modifiers named PlanarProjectTextureModifier in the mesh construction history.
  3. Right click over the selected modifiers and choose Tile Every » 8 Units from the listed options.
  4. Select Tools » Activate Paint Mode from the main menu.
  5. Right click on the worksheet and choose Reveal Texture 1 from the listed options.
  6. Right click on the worksheet and choose Radius Preset: 1 from the listed options.
  7. Left click on the mesh to start painting.
  8. Right click when you are finished painting and choose another texture to reveal.
  9. Stop painting the mesh when you are happy with the results.
  10. The hierarchy looks like this: This is a picture of the worksheet.