User Guide (MeshEdit) - cmu462/Scotty3D GitHub Wiki

When in MeshEdit mode, Scotty3D provides a polygon-based 3D modeler with basic subdivision capabilities. The central modeling paradigm is "box modeling", i.e., starting with a simple cube, you can add progressively more detail to produce interesting 3D shapes. You can also use subdivision to get smooth approximations of these shapes.

MeshEdit supports three actions (NAVIGATE, EDIT, and BEVEL), plus a collection of mesh editing commands that are available from any mode.

Note that MeshEdit (and more broadly, Scotty3D) will only operate on meshes that are manifold (i.e., the union of faces containing any given vertex v is a topological disk). Likewise, all mesh operations in Scotty3D will preserve the manifold property, i.e., manifold input will always get mapped to manifold output. This property is key for ensuring that many algorithms in Scotty3D are "well-behaved", and that it always produces nice output for other programs to use.

NAVIGATE

In this mode you can move the camera around, and inspect mesh elements by left-clicking on vertices, edges, faces, and halfedges. Information about these elements (including debugging information) will be shown in the info panel in the upper-right region of the screen. The camera can be manipulated in three ways:

  • Rotate - left-clicking on the background (i.e., not on any scene object) and dragging will rotate the scene.
  • Zoom - using the scroll wheel, or scrolling on your trackpad, will zoom the scene in and out.
  • Translate - right-clicking on the background (or using multi-touch on a trackpad, e.g., two-finger click-and-drag) will translate the camera around the scene.

media/Scotty3DNavigate.jpg

EDIT

In this mode you can change the geometry (i.e., the shape) of a mesh by clicking and dragging on mesh elements (vertices, edges, faces, and halfedges). Clicking and dragging will translate an element in directions parallel to the view plane. Clicking on an element will also invoke a transformation widget, which allows elements to be manipulated with a respect to a particular coordinate axis. Note that the transformation widget has three modes of operation, which you can toggle through either by (i) repeatedly pressing the e key, or (ii) holding down a modifier key:

  • Translate (control) - move the selected element along X, Y, and Z axes. Clicking the handle in the center will perform a free-translate (parallel to the screen).
  • Rotate (alt/option) - rotate the selected element around X, Y, and Z axes.
  • Scale (shift) - perform a nonuniform scale along X, Y, and Z axes. Clicking the handle in the center will scale the element uniformly.

Note that on some platforms, the modifier keys may not be interpreted properly---in this case, you can still access the three tranformation modes by repeatedly pressing the e key.

media/Scotty3DTransform.jpg

BEVEL

The bevel action creates a new copy of the selected element that is inset and offset from the original element. Clicking and dragging on an element will perform a bevel; the horizontal motion of the cursor controls the amount by which the new element shrinks or expands relative to the original element, and the vertical motion of the cursor controls the amount by which the new element is offset (in the normal direction) from the original element. It is important to note that a new element will be created upon click even if no inset or offset is applied. Therefore, if you're not careful you may end up with duplicate elements that are not immediately visible. (To check, you can drag one of the vertices in Edit mode.)

media/Scotty3DBevel.jpg

media/Scotty3DBevel_demo.gif

There are three possible types of bevels:

  • VertexBevel - The selected vertex v is replaced by a face f whose vertices are connected to the edges originally incident on v. The new face is inset (i.e., shunken or expanded) by a user-controllable amount, and also offset by a user-controllable amount in the normal direction (not shown here).

    media/Scotty3DVertexBevel.png

  • EdgeBevel - The selected edge e is replaced by a face f whose vertices are connected to the edges originally incident on the endpoints of e. The new face is inset and offset by some user-controllable amount, as with the vertex bevel.

    media/Scotty3DEdgeBevel.png

  • FaceBevel - The selected face f is replaced by a new face g, as well as a ring of faces around g, such that the vertices of g connect to the original vertices of f. The new face is inset and offset by some user-controllable amount.

    media/Scotty3DFaceBevel.png

CONNECTIVITY EDITING

In addition to beveling, a variety of commands can be used to alter the connectivity of the mesh (for instance, splitting or collapsing edges). These commands are applied by selecting a mesh element (in any mode) and pressing the appropriate key, as listed below. Local mesh editing operations include:

  • EraseVertex - The selected vertex v together with all incident edges and faces will be replaced with a single face f, that is the union of all faces originally incident on v.

    media/Scotty3DEraseVertex.png

  • EraseEdge - The selected edge e will be replaced with the union of the faces containing it, producing a new face e (if e is a boundary edge, nothing happens).

    media/Scotty3DEraseEdge.png

  • EdgeCollapse - The selected edge e is replaced by a single vertex v. This vertex is connected by edges to all vertices previously connected to either endpoint of e. Moreover, if either of the polygons containing e was a triangle, it will be replaced by an edge (rather than a degenerate polygon with only two edges).

    media/Scotty3DEdgeCollapse.png

  • FaceCollapse - The selected face f is replaced by a single vertex v. All edges previously connected to vertices of f are now connected directly to v.

    media/Scotty3DFaceCollapse.png

  • EdgeFlip - The selected edge e is "rotated" around the face, in the sense that each endpoint moves to the next vertex (in counter-clockwise order) along the boundary of the two polygons containing e.

    media/Scotty3DEdgeFlip.png

  • EdgeSplit - [Note: this method is for triangle meshes only!] The selected edge e is split at its midpoint, and the new vertex v is connected to the two opposite vertices (or one in the case of a surface with boundary).

    media/Scotty3DEdgeSplit.png

GLOBAL MESH PROCESSING

A number of commands can be used to create a more global change in the mesh (e.g., subdivision or simplification). These commands can be applied by selecting any element in the target mesh (in any mode) and pressing the appropriate key. Note that in scenes with multiple meshes (e.g., those used by the PathTracer), this command will be applied only to the selected mesh.

  • Triangulate - Each polygon is split into triangles.

media/Scotty3DTriangulate.jpg

  • Linear subdivision - Each polygon in the selected mesh is split into quadrilaterals by inserting a vertex at the midpoint and connecting it to the midpoint of all edges. New vertices are placed at the average of old vertices so that, e.g., flat faces stay flat, and old vertices remain where they were.

media/Scotty3DLinearSubdivision.jpg

  • Catmull-Clark subdivision - [Note: this method is for meshes without boundary only!] Just as with linear subdivision, each polygon is split into quadrilaterals, but this time the vertex positions are updated according to the Catmull-Clark subdivision rules, ultimately generating a nice rounded surface.

media/Scotty3DCatmullClark.jpg

  • Loop subdivision - [Note: this method is for triangle meshes without boundary only!] Each triangle is split into four by connecting the edge midpoints. Vertex positions are updated according to the Loop subdivision rules.

media/Scotty3DLoopSubdivision.jpg

  • Isotropic Remeshing - [Note: this method is for triangle meshes only!] The mesh is resampled so that triangles all have roughly the same size and shape, and vertex valence is close to regular (i.e., about six edges incident on every vertex).

media/Scotty3DIsotropicRemesh.jpg

  • Simplification - [Note: this method is for triangle meshes only!] The number of triangles in the mesh is reduced by a factor of about four, aiming to preserve the appearance of the original mesh as closely as possible.

media/Scotty3DSimplification.jpg

Key Command
space switch to navigate mode
tab show/hide info panel
hold control temporarily switch to translation in edit mode
hold shift temporarily switch to scaling in edit mode
hold alt/option temporarily switch to rotation in edit mode
e cycle through edit modes
b toggle bevel mode
n select next halfedge
t select twin halfedge
h select halfedge of current element
T Triangulate mesh
s subdivide Catmull-Clark
S Subdivide linear
backspace/delete erase selected edge
f flip selected edge
c collapse selected edge
p split selected edge triangle meshes only!
u upsample triangle meshes only!
i isotropic remesh triangle meshes only!
d downsample triangle meshes only!
w then 0--9 write scene to numbered buffer
l then 0--9 load scene from numbered buffer