Commit 642e8c22 authored by Hui Wang's avatar Hui Wang
Browse files

Update model.md

parent 7b746b4a
[[Home]](/docs/index.md) [[User Guide]](/docs/guide/guide.md) [[Mesh Edit]](/docs/meshedit/overview.md) [[Path Tracer]](/docs/pathtracer/overview.md) [[Animation]](/docs/animation/overview.md) [[Home]](/docs/index.md) [[User Guide]](/docs/guide/guide.md) [[Mesh Edit]](/docs/meshedit/overview.md) [[Path Tracer]](/docs/pathtracer/overview.md) [[Animation]](/docs/animation/overview.md)
--- ---
# Model # Model
When in `Model` mode, Scotty3D provides a polygon-based 3D modeler with basic When in `Model` mode, Scotty3D provides a polygon-based 3D modeler with basic
subdivision capabilities. The central modeling paradigm is "box modeling", i.e., subdivision capabilities. The central modeling paradigm is "box modeling", i.e.,
starting with a simple cube, you can add progressively more detail to produce starting with a simple cube, you can add progressively more detail to produce
interesting 3D shapes. You can also use _subdivision_ to get smooth interesting 3D shapes. You can also use _subdivision_ to get smooth
approximations of these shapes. approximations of these shapes.
MeshEdit supports four basic actions on mesh elements (move, rotate, scale, and bevel), MeshEdit supports four basic actions on mesh elements (move, rotate, scale, and bevel),
plus a collection of local and global mesh editing commands. plus a collection of local and global mesh editing commands.
Note that MeshEdit (and more broadly, Scotty3D) will only operate on meshes that 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 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 topological disk). Likewise, all mesh operations in Scotty3D will preserve the
manifold property, i.e., manifold input will always get mapped to manifold 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 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 "well-behaved", and that it always produces nice output for other programs to
use. If you load a mesh that is non-manifold, you can still use it in your scene use. If you load a mesh that is non-manifold, you can still use it in your scene
and render with it, but editing will not be supported. and render with it, but editing will not be supported.
### Editing Mesh Elements ### Editing Mesh Elements
Before you start, you should import the model from `./media` in `Layout Mode`. (See [Layout Mode](/docs/guide/layout.md) page for more details) Before you start, you should import the model from `./media` in `Layout Mode`. (See [Layout Mode](/docs/guide/layout.md) page for more details)
In `Model` mode you can inspect mesh elements by In `Model` mode you can inspect mesh elements by
left-clicking on vertices, edges, faces, and halfedges. Information about these left-clicking on vertices, edges, faces, and halfedges. Information about these
elements will be shown in the left sidebar. elements will be shown in the left sidebar.
In this mode you can change the geometry (i.e., the shape) of the mesh by transforming mesh elements in the same way you can transform scene objects. Note In this mode you can change the geometry (i.e., the shape) of the mesh by transforming mesh elements in the same way you can transform scene objects. Note
that the transformation widget again has three modes of operation, which you can that the transformation widget again has three modes of operation, which you can
toggle through by pressing the `r` key. toggle through by pressing the `r` key.
- `Move`: click and drag on the red (X), green (Y), or blue (Z) arrow to move the object along the X/Y/Z axis. Click and drag on the red (YZ), green (XZ), or blue (XY) squares to move the object in the YZ/XZ/XY plane. - `Move`: click and drag on the red (X), green (Y), or blue (Z) arrow to move the object along the X/Y/Z axis. Click and drag on the red (YZ), green (XZ), or blue (XY) squares to move the object in the YZ/XZ/XY plane.
- `Rotate`: click and drag on the red (X), green (Y), or blue (Z) loop to rotate the object about the X/Y/Z axis. Note that these rotations are applied relative to the current pose, so they do not necessarily correspond to smooth transformations of the X/Y/Z Euler angles. - `Rotate`: click and drag on the red (X), green (Y), or blue (Z) loop to rotate the object about the X/Y/Z axis. Note that these rotations are applied relative to the current pose, so they do not necessarily correspond to smooth transformations of the X/Y/Z Euler angles.
- `Scale`: click and drag on the red (X), green (Y), or blue(Z) block to scale the object about the X/Y/Z axis. Again note that this scale is applied relative to the current pose. - `Scale`: click and drag on the red (X), green (Y), or blue(Z) block to scale the object about the X/Y/Z axis. Again note that this scale is applied relative to the current pose.
![selecting an edge](./model_mode/model_select.png) ![selecting an edge](./model_mode/model_select.png)
### Beveling ### Beveling
The bevel action creates a new copy of the selected element that is inset and 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 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 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 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 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 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 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 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 duplicate elements that are not immediately visible. (To check, you can drag one
of the vertices mode.) of the vertices mode.)
There are three possible types of bevels: There are three possible types of bevels:
- Vertex Bevel: The selected vertex _v_ is replaced by a face _f_ whose - Vertex Bevel: 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 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. inset (i.e., shunken or expanded) by a user-controllable amount.
- Vertex Extrude: The selected vertex _v_ is beveled by a flat amount (we use 1/3 the length of the edge from the original vertex _v_ to an adjacent vertex endpoint as the tangential offset), a new vertex _v'_ is inserted into the resulting face, and _v'_ is offset in its normal direction by a user-controllable amount. - Vertex Extrude: The selected vertex _v_ is beveled by a flat amount (we use 1/3 the length of the edge from the original vertex _v_ to an adjacent vertex endpoint as the tangential offset), a new vertex _v'_ is inserted into the resulting face, and _v'_ is offset in its normal direction by a user-controllable amount.
<video src="./model_mode/vertex_bevel.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> <video src="./model_mode/vertex_bevel.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/vertex_bevel.mp4) ![](./model_mode/vertex_bevel.mp4)
- Edge Bevel: The selected edge _e_ is replaced by a face _f_ whose - Edge Bevel: The selected edge _e_ is replaced by a face _f_ whose
vertices are connected to the edges originally incident on the endpoints of _e_. 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 The new face is inset and offset by some user-controllable amount, as with the
vertex bevel. vertex bevel.
<video src="./model_mode/edge_bevel.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> <video src="./model_mode/edge_bevel.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/edge_bevel.mp4) ![](./model_mode/edge_bevel.mp4)
- Face Bevel: The selected face _f_ is replaced by a new face _g_, as well - Face Bevel:<a name="face-bevel"></a>
as a ring of faces around _g_, such that the vertices of _g_ connect to the The selected face _f_ is replaced by a new face _g_, as well
original vertices of _f_. The new face is inset and offset by some as a ring of faces around _g_, such that the vertices of _g_ connect to the
user-controllable amount. original vertices of _f_. The new face is inset and offset by some
user-controllable amount.
- Face Extrude: The selected face _f_ is replaced by a new face _g_ as in Face Bevel, and _g_ is offset only in the normal direction by some user-controllable amount.
- Face Extrude: The selected face _f_ is replaced by a new face _g_ as in Face Bevel, and _g_ is offset only in the normal direction by some user-controllable amount.
- Face Inset: The selected face _f_ is replaced by a new face _g_ as in Face Bevel, but its vertices are only offset in the tangent direction by a constant factor (we use 1/3 in the example).
- Face Inset: The selected face _f_ is replaced by a new face _g_ as in Face Bevel, but its vertices are only offset in the tangent direction by a constant factor (we use 1/3 in the example).
<video src="./model_mode/face_bevel.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/face_bevel.mp4) <video src="./model_mode/face_bevel.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/face_bevel.mp4)
### Local Connectivity Editing
### Local 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 In addition to beveling, a variety of commands can be used to alter the
commands are applied by selecting a mesh element (in any mode) and pressing the connectivity of the mesh (for instance, splitting or collapsing edges). These
appropriate key, as listed below. Local mesh editing operations include: commands are applied by selecting a mesh element (in any mode) and pressing the
appropriate key, as listed below. Local mesh editing operations include:
- Erase Vertex: 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 - Erase Vertex: The selected vertex _v_ together with all incident edges
faces originally incident on _v_. and faces will be replaced with a single face _f_, that is the union of all
faces originally incident on _v_.
<video src="./model_mode/erase_vertex.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/erase_vertex.mp4) <video src="./model_mode/erase_vertex.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/erase_vertex.mp4)
- Erase Edge: 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, - Erase Edge: The selected edge _e_ will be replaced with the union of the
nothing happens). faces containing it, producing a new face _e_ (if _e_ is a boundary edge,
nothing happens).
<video src="./model_mode/erase_edge.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/erase_edge.mp4) <video src="./model_mode/erase_edge.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/erase_edge.mp4)
- Edge Collapse: The selected edge _e_ is replaced by a single vertex _v_.
This vertex is connected by edges to all vertices previously connected to either - Edge Collapse:<a name="edge-collapse"></a>
endpoint of _e_. Moreover, if either of the polygons containing _e_ was a The selected edge _e_ is replaced by a single vertex _v_.
triangle, it will be replaced by an edge (rather than a degenerate polygon with This vertex is connected by edges to all vertices previously connected to either
only two edges). 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
<video src="./model_mode/collapse_edge.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> only two edges).
![](./model_mode/collapse_edge.mp4)
<video src="./model_mode/collapse_edge.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
- Face Collapse: The selected face _f_ is replaced by a single vertex _v_. ![](./model_mode/collapse_edge.mp4)
All edges previously connected to vertices of _f_ are now connected directly to
_v_. - Face Collapse: The selected face _f_ is replaced by a single vertex _v_.
All edges previously connected to vertices of _f_ are now connected directly to
<video src="./model_mode/collapse_face.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> _v_.
![](./model_mode/collapse_face.mp4)
<video src="./model_mode/collapse_face.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
- Vertex Inset: A new vertex _v_ is inset at the center of the selected face _f_, dividing _f_ into _n_ triangles (where _n_ is the degree of _f_). ![](./model_mode/collapse_face.mp4)
- Edge Flip: The selected edge _e_ is "rotated" around the face, in the - Vertex Inset: A new vertex _v_ is inset at the center of the selected face _f_, dividing _f_ into _n_ triangles (where _n_ is the degree of _f_).
sense that each endpoint moves to the next vertex (in counter-clockwise order)
along the boundary of the two polygons containing _e_. - Edge Flip: <a name="edge-flip"></a>
The selected edge _e_ is "rotated" around the face, in the
<video src="./model_mode/edge_flip.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> sense that each endpoint moves to the next vertex (in counter-clockwise order)
![](./model_mode/edge_flip.mp4) along the boundary of the two polygons containing _e_.
- Edge Split: [Note: this method is for triangle meshes only!] The <video src="./model_mode/edge_flip.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
selected edge _e_ is split at its midpoint, and the new vertex _v_ is connected ![](./model_mode/edge_flip.mp4)
to the two opposite vertices (or one in the case of a surface with boundary).
- Edge Split: <a name="edge-split"></a>
<video src="./model_mode/edge_split.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> [Note: this method is for triangle meshes only!] The
![](./model_mode/edge_split.mp4) 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).
- Edge Bisect: The selected edge _e_ is split at its midpoint, and the new vertex _v_ at the split is returned. Note that the new vertex _v_ is not connected to the two opposite vertices as in Edge Split.
<video src="./model_mode/edge_split.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
### Global Mesh Processing ![](./model_mode/edge_split.mp4)
A number of commands can be used to create a more global change in the mesh - Edge Bisect: The selected edge _e_ is split at its midpoint, and the new vertex _v_ at the split is returned. Note that the new vertex _v_ is not connected to the two opposite vertices as in Edge Split.
(e.g., subdivision or simplification). These commands can be applied by
pressing the appropriate sidebar button with a mesh selected. Note that in scenes with multiple meshes (e.g., those used by ### Global Mesh Processing
the path tracer), this command will be applied only to the selected mesh.
A number of commands can be used to create a more global change in the mesh
- Triangulate: Each polygon is split into triangles. (e.g., subdivision or simplification). These commands can be applied by
pressing the appropriate sidebar button with a mesh selected. Note that in scenes with multiple meshes (e.g., those used by
<video src="./model_mode/triangulate.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> the path tracer), this command will be applied only to the selected mesh.
![](./model_mode/triangulate.mp4)
- Triangulate:<a name="triangulate"></a>
- Linear Subdivision: Each polygon in the selected mesh is split into Each polygon is split into triangles.
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 <video src="./model_mode/triangulate.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
that, e.g., flat faces stay flat, and old vertices remain where they were. ![](./model_mode/triangulate.mp4)
<video src="./model_mode/linear_subd.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> - Linear Subdivision:<a name="linear-subdivision"></a>
![](./model_mode/linear_subd.mp4) Each polygon in the selected mesh is split into
quadrilaterals by inserting a vertex at the midpoint and connecting it to the
- Catmull-Clark Subdivision: _[Note: this method is for meshes without boundary only!]_ midpoint of all edges. New vertices are placed at the average of old vertices so
Just as with linear subdivision, each that, e.g., flat faces stay flat, and old vertices remain where they were.
polygon is split into quadrilaterals, but this time the vertex positions are
updated according to the [Catmull-Clark subdivision <video src="./model_mode/linear_subd.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
rules](https://en.wikipedia.org/wiki/Catmull-Clark_subdivision_surface), ![](./model_mode/linear_subd.mp4)
ultimately generating a nice rounded surface.
- Catmull-Clark Subdivision:<a name="catmull-clark-subdivision"></a>
<video src="./model_mode/catmull_subd.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> _[Note: this method is for meshes without boundary only!]_
![](./model_mode/catmull_subd.mp4) Just as with linear subdivision, each
polygon is split into quadrilaterals, but this time the vertex positions are
- Loop Subdivision: _[Note: this method is for triangle meshes without boundary only!]_ updated according to the [Catmull-Clark subdivision
Each triangle is split into four by connecting the edge midpoints. Vertex rules](https://en.wikipedia.org/wiki/Catmull-Clark_subdivision_surface),
positions are updated according to the [Loop subdivision ultimately generating a nice rounded surface.
rules](https://en.wikipedia.org/wiki/Loop_subdivision_surface).
<video src="./model_mode/catmull_subd.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
<video src="./model_mode/loop_subd.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> ![](./model_mode/catmull_subd.mp4)
![](./model_mode/loop_subd.mp4)
- Loop Subdivision:<a name="loop-subdivision"></a>
- Isotropic Remeshing: _[Note: this method is for triangle meshes only!]_ _[Note: this method is for triangle meshes without boundary only!]_
The mesh is resampled so that triangles all have roughly the same size and Each triangle is split into four by connecting the edge midpoints. Vertex
shape, and vertex valence is close to regular (i.e., about six edges incident on positions are updated according to the [Loop subdivision
every vertex). rules](https://en.wikipedia.org/wiki/Loop_subdivision_surface).
<video src="./model_mode/remesh.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> <video src="./model_mode/loop_subd.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
![](./model_mode/remesh.mp4) ![](./model_mode/loop_subd.mp4)
- Simplification _[Note: this method is for triangle meshes only!]_ The - Isotropic Remeshing:<a name="isotropic-remeshing"></a>
number of triangles in the mesh is reduced by a factor of about four, aiming to _[Note: this method is for triangle meshes only!]_
preserve the appearance of the original mesh as closely as possible. 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
<video src="./model_mode/simplify.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video> every vertex).
![](./model_mode/simplify.mp4)
<video src="./model_mode/remesh.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
### Key Bindings ![](./model_mode/remesh.mp4)
| Key | Command | - Simplification:<a name="simplification"></a>
| :-------------------: | :--------------------------------------------: | _[Note: this method is for triangle meshes only!]_ The
| `c` | Center the camera on the current element. | number of triangles in the mesh is reduced by a factor of about four, aiming to
| `m` | Use the `Move` tool. | preserve the appearance of the original mesh as closely as possible.
| `r` | Use the `Rotate` tool. |
| `s` | Use the `Scale` tool. | <video src="./model_mode/simplify.mp4" controls preload muted loop style="max-width: 100%; margin: 0 auto;"></video>
| `b` | Use the `Bevel` tool. | ![](./model_mode/simplify.mp4)
| `v` | Select the current halfedge's vertex |
| `e` | Select the current halfedge's edge | ### Key Bindings
| `f` | Select the current halfedge's face |
| `t` | Select the current halfedge's twin | | Key | Command |
| `n` | Select the current halfedge's next | | :-------------------: | :--------------------------------------------: |
| `h` | Select the current element's halfedge | | `c` | Center the camera on the current element. |
| `delete` | Erase the currently selected vertex or edge. | | `m` | Use the `Move` tool. |
| `r` | Use the `Rotate` tool. |
| `s` | Use the `Scale` tool. |
| `b` | Use the `Bevel` tool. |
| `v` | Select the current halfedge's vertex |
| `e` | Select the current halfedge's edge |
| `f` | Select the current halfedge's face |
| `t` | Select the current halfedge's twin |
| `n` | Select the current halfedge's next |
| `h` | Select the current element's halfedge |
| `delete` | Erase the currently selected vertex or edge. |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment