Mesh Editing Examples (intermediate and advanced) - ousnius/BodySlide-and-Outfit-Studio GitHub Wiki

Written by sts1skj for Outfit Studio 5.0.7.


Example 1 (Intermediate): Collapsing a vertex with more than three connections

  1. Suppose a surface has a vertex that we want to get rid of, and that vertex has four or more connections to other vertices. Consider this vertex from "CBBE Body" from the Skyrim SE mod "Caliente's Beautiful Bodies Enhancer" v1.5.5:

1

  1. We can't use Outfit Studio's collapse-vertex tool on this vertex directly, because that tool only works on vertices with at most three connections. However, we can reduce the number of connections using the flip-edge tool:

2

  1. Once there are only three connections left, we can use collapse-vertex to remove it:

3


Example 2 (Intermediate): Closing a one-triangle hole

  1. Suppose a surface we're editing is missing a triangle, leaving a hole:

1

  1. To close the hole, we need to collapse one of the three vertices at the corners of the hole. To collapse a vertex, it needs to have no more than three connections. Let's suppose we pick the bottom vertex from the image above to collapse. It has six connections. We have to use flip-edge three times to reduce the number of connections to three:

2 3 4

(In the last flip, we flip the edge to the right so that it runs vertically from the top middle vertex in the image to the bottom middle vertex.)

  1. Then we can collapse the vertex, which closes the hole.

5

  1. Of course, we've lost a vertex that we didn't want to lose, leaving a messy mesh. A single use of split-edge and then flip-edge cleans it up:

6 7


Example 3 (Intermediate): Creating a one-triangle hole

  1. Suppose we want to punch a one-triangle hole in a surface:

1

  1. Outfit Studio's "Delete Vertices" command can punch holes in surfaces, but only by deleting a vertex. So we need to add a vertex in the middle of the triangle. Using split-edge twice will do that:

2 3

  1. This leaves us with an extra vertex (in the middle of the rectangle) that we didn't want. We can collapse it after doing one edge flip:

4 5

  1. Now we just need to delete the new vertex in the middle of the triangle we want to punch out. First mask it using the mask tool (with a very small brush size):

6

  1. Invert the mask:

7

  1. And finally do "Delete Vertices":

8


Example 4 (Advanced): Regularizing a mesh to remove texture distortion

  1. Consider the following textured surface (this is the outfit "Keo - Farm Clothes 3" from the Skyrim SE mod "Keo's Skimpy Outfits - SSE CBBE BodySlide" version 1.4).

1

  1. The cloth on the right of the gap looks okay, but the cloth on the left has some ugly texture distortion. Turning on "Show Wireframe" reveals part of the problem:

2

  1. On the right, the mesh is regular. On the left, it's not. One way to clean up this texture distortion is to regularize the mesh on the left; then any remaining UV errors should be obvious in the UV editor. First, use collapse-vertex to remove some of the obviously unwanted vertices:

3

  1. Next, pick some more vertices to eliminate, and eliminate them. The goal is to end up with just enough vertices for a regular mesh. In the interest of brevity, I'll do as many as I can at once. First, identify the vertices to eliminate:

4

  1. Then flip some edges so that some of the vertices to be deleted have only three connections:

5

  1. Collapse them:

6

  1. Flip more edges so that the two remaining vertices to be deleted have only three connections:

7

  1. And collapse them:

8

  1. Now we need to regularize the mesh. First, regularize the triangulation by flipping a few edges:

9

  1. Then use the move tool (with a very small brush size) to move the vertices into a nice grid:

10

  1. Now, in the UV editor, the vertices with bad UV coordinates are obvious:

11

  1. Just three vertices need their UV coordinates adjusted:

12

  1. Resulting in a smooth texture on the outfit, at least in this spot:

13


Example 5 (Advanced): Cutting out a lattice

  1. Suppose we want to cut some pieces out of a surface that already has a lattice texture in order to show a little more skin. The example I'll use is "Farm Clothes 1" from the Skyrim SE mod "Caliente's Beautiful Bodies Enhancer" version 1.5.5:

1

  1. The area does not have enough vertices:

2

  1. We need to add enough vertices so we have one for each corner of each hole we want to cut. For now, we'll just add vertices, and worry about positioning them later. Use the split-edge tool to add the desired vertices:

3

  1. Then flip some edges so that we have edges along the boundary of each hole we'll cut:

4

  1. The next two steps can be done in either order: adjusting the space position and UV position of each vertex. I find it easier to adjust the UV coordinates of our new vertices first. In the UV editor, before adjusting:

5

  1. After adjusting the UV coordinates:

6

  1. Then we need to adjust the space coordinates of the vertices. Before:

7

  1. And after:

8

  1. Next, we need to cut out our holes. One of them already has a vertex to delete. We add a vertex to the middle of each of the other three holes, by splitting two edges, flipping an edge, and collapsing a vertex for each:

9

  1. Then we can mask the four vertices, invert the mask, and delete the vertices:

10

Of course, more holes would need to be cut to complete the lattice.


Example 6 (Advanced): Refining a coarse, low-polygon region

  1. Consider this region of the "Merchant" outfit from the Skyrim SE mod "Caliente's Beautiful Bodies Enhancer" version 1.5.5:

1

  1. It looks okay with all of the sliders set to zero:

2

  1. But it starts to look a bit rough if we set the "AppleCheeks" and "Butt" sliders to 1:

3

  1. The problem is that the surface doesn't have enough vertices. We can add more vertices with the split-edge tool. If we use the tool on each diagonal edge, we can double the number of vertices:

4

  1. This may be good enough. To be certain, though, let's split all the horizontal and vertical edges, doubling the number of vertices again:

5

  1. I also flipped a few edges along the top and bottom of the area in order to shorten them.

6

  1. Now, the split-edge tool does an okay job of generating coordinates and slider diffs for new vertices, but it's far from perfect. Normally, after adding a bunch of vertices like this, you should check to make sure the result is smooth, both with all the sliders set to zero and with each individual slider set to 1. The split-edge tool appears to have done a reasonable job in this case, however, so we'll skip the smoothing step. The result:

7

That's much better.


Example 7 (Advanced): Restoring a small accidentally-deleted portion of a surface

  1. Suppose we've accidentally deleted a small piece of a surface and we didn't notice right away, so it's too late to undo the change:

1

  1. It's messy, but we can roughly restore the missing piece. First, move all of the vertices along the edge of the missing piece to where we'd like the new boundary to be, approximately:

2

  1. This gives us more boundary vertices than we want. Flip some edges to reduce the number of connections for each unwanted vertex to three:

3

  1. Then collapse the two unwanted vertices:

4

  1. Now, our surface is missing three internal vertices. Use the split-edge tool to add them:

5

  1. Then flip some edges to give a regular triangulation again:

6

  1. Now, the UV coordinates are a little messed up:

7

  1. And need to be fixed:

8

  1. The surface looks okay now, but it could use some smoothing, and the slider diffs may need adjusting. But we'll skip that. The result:

9


Example 8 (Advanced): Smoothing a surface by shortening edges with edge-flipping

  1. It's possible for a surface to be too rough even though it has plenty of vertices. One possible cause of this is long, narrow triangles. Consider this portion of "CBBE Body" from the Skyrim SE mod "Caliente's Beautiful Bodies Enhancer" version 1.5.5:

1

  1. It has some long, thin triangles, but it looks okay with all the sliders set to zero:

2

  1. With "AppleCheeks" set to 1, though, it starts to look a bit rough:

3

  1. We can smooth this area out significantly by just flipping some edges. The goal is for the triangle edges to be as short as possible; the longer they are, the more they can indent the curved surface.

  2. Before flipping:

4

  1. After flipping:

5

  1. The resulting surface is a little bit smoother:

6