Understanding Sketch Meshes

Sketch Meshes can render complex pipes, tubes, ducts, or other such objects by describing the cross-section of the object. This cross-section is then “extruded” in one direction, or “swept” along a path, to create the final 3D shape.

 

This Cross-Section Extruded or Swept Creates this Mesh End Result

Most meshes are created as a collection of vertices in space, connected to make many flat faces that look like an object. Sketch meshes are different.

A Sketch is a mesh composed of two collections of paths:

  • A first path collection defines the cross-section of the object. It is usually a two-dimensional shape, such as a circle or square. (See the orange sketches above)

  • A second path collection defines the route this cross-section should follow (either extruded along a straight line, or swept along a path) to make the object. (see the green sketches above)

Paths are lines in 3D space which can be straight or curved. They are defined by a series of points in space. Paths are usually found in a collection, where each path can start where the previous path ended.

Based on the cross-section paths and the route paths, the scene automatically creates all the necessary vertices and faces required.

Uses

Consider these examples:

  • A gutter carrying rain runoff could be a U-shaped piece of aluminum that follows a path along one edge of a roof.

  • An HVAC duct carrying air could be described as a square-shaped piece of metal that follows a path from a furnace to a vent.

  • A cable carrying electricity could be a O-shaped tube of plastic that follows a path from a plug to a socket.

Benefits

While a duct, cable, or gutter could be created with standard meshes, they would be difficult to create and maintain. Sketch meshes solve these problems:

Sketch meshes can render a complex shape easily.

As a scene designer, you only need to describe the cross-section, and the vector or path it follows. The scene handles the complex calculations to create the final mesh.

  • Learn how to create a sketch mesh.

Sketch meshes can dynamically connect other meshes with minimal code.

If you place a connector on a sketch mesh, and connect it to another mesh, then the sketch will stretch and bend to maintain that connection even if the other mesh moves. In this way, you can have a water pipe connect a wall valve to a kitchen faucet, even if your user drags the kitchen sink around the scene.

  • Learn how to connect a sketch to other meshes.

You can place other meshes along a sketch, and they will move as the sketch changes.

Define the edge of a deck with a path, and the posts of the deck railing can be spaced regularly along that path even if it changes.

  • Learn how to distribute meshes along the length of a sketch.

Sketch meshes can change with Snap rules.

Sketch meshes can be redefined as the scene runs. To continue the previous examples, the curving path of the electrical cable can be repositioned mathematically instead of through the user's dragging interactions. Or the path of the deck railing can have posts every 5 inches instead of every 10 inches.

  • Learn how to program changes to a sketch mesh with Snap.

Sketch Paths

To create either the cross-section of your sketch mesh, or the route it will be extruded along, you use one or more sketch paths.

  • A simple cross-section could be created with just one path.

  • A complex route through a configured product may require many paths.

You can use as many paths together as your shape needs. In the screenshot below, we see...

Sketch Path Properties

  • A sketch mesh consisting of 3 sketch paths (white).
  • A helper plane (yellow frame with diagonal) appears around the sketch mesh when it is selected. This helps you visualize how the 2D sketch rests in the 3D space of the scene.
  • Four connectors (blue and yellow balls) have been placed at the end of each path to make dynamic changes easier with Snap rules.
  • The scene origin (intersection of red, blue, and green lines) shows this sketch mesh is positioned near the center of the scene.

Sketch Path Types

Features Unique to Sketch Meshes

Connectors and Sketch Meshes

Along with many of the standard mesh properties, Sketch meshes have an additional set of properties applied to the path collection that makes up the sketch.

Sketch Path Property Description
Primary Sketch Normal Since a sketch exists in two dimensions, select which dimension in the scene will be normal to the drawing. This dimension will not be used: it will be pointing up through the sketch.

Flip Path Direction

If the mesh that results from your path appears strangely, such as the material is applied to the inside instead of the outside, flip the path direction.

Close Path

Turn on for any path that loops on itself, such as the cross-section of a pipe or duct. This automatically join the beginning and ending control points. Ensuring that your path is closed helps ensure materials are applied correctly to the overall surface. Even if the starting and ending points are at the same location, this should still be selected.

Turn off for paths that are not loops.

Add Face

Turn on to close the end of the sweep or extrude made by this shape, giving the appearance of solid material.

Turn off to leave the end of the sketch mesh open, allowing the user to look into the end of the mesh, like looking down a pipe.

Override Bounds

X

Y

Z

Usually, the geometry of the mesh that results from your path is bound by certain rules that help ensure it behaves in a more realistic way. If you would like to escape these bounds, specify in scene units how far they can be exceeded in each dimension.

Replace Existing Sketch With Image

Import a path based on a 2D image, rather than trying to recreate it manually. This helps the sketch in the scene align closely with other corporate assets without recreating them. Examples include

  • Uploading the complex curves of decorative mouldings can be uploaded, rather than manually recreated.
  • Importing a corporate logo, then extruding the sketch into 3D, and then embossing that into another mesh using the geometry join feature.

Ensure your source image has edges that are easy to trace. Graduated fills, half-tones, and other image manipulations can complicate the resulting path. When in doubt, ask your art department for the "line art" version of any logo or icon.

 

Replacing a sketch path with an image.

 

Type Description Direction Parameter Direction 2 Parameter Useful For

Points

The simplest of the path types, this simply connects each of the connection points with a straight line.

unused

unused

linear duct work with sharp angles

Arc Through 3 Points

This path uses only the first 3 points in the path, ignoring the rest. These 3 points are used to define the radius of a circular arc .

unused

unused

Curved or bent sections of conduit or pipe

Center Radius Circle

This type uses the first two points in the path to create a circle, ignoring any remaining points. The first control point defines the center and normal of the circle. The second control point defines a point on the radius of the circle.

unused

unused

Objects with cylindrical cross-sections, like pipes, screws, tubes. Objects with cylindrical paths, like gaskets, rings.

Catmull Rom

This path passes through all the points, and the curve is very smooth, with no discontinuities.

unused

unused

Flexible tubing. Accordion-style flexible ducts, like the hose venting a clothes dryer.

Cubic Bezier

Bezier curves use the direction parameters to specify the angle each line has when it connects to the point. The scene then calculates the best curve that honors these angles, but still connects the points. Notice that the curve may not pass directly through each point.

used

used

complex arcs

Quadratic Bezier

used

used

complex arcs

 

Hermite

Like Catmull Rom, this curve passes through all points. However, the direction vectors on each point are taken into account, giving you more precise control on entry and exit angles.

used

used

complex arcs

Along with many of the standard features, Sketch meshes also have two unique features found on no other mesh: Extrude and Sweep. Both of these features will take the sketch path as a cross-section, and build an object from it.

Connectors are points in space that can be used for various purposes. When used with Sketch meshes, connectors help change the shape of the sketch path, and distribute items along the sketch path.

  • Learn more about using connectors to change the shape of a sketch path.

  • Learn more about using connectors to distribute items along a sketch path.

 

 

Was this article helpful?