Rasagar/Library/PackageCache/com.unity.probuilder/Documentation~/workflow-edit-tasks.md
2024-08-26 23:07:20 +03:00

6.7 KiB

Common editing tasks

This page describes some of the most common ways you can use the ProBuilder tools and actions to create and modify geometry. There any many more possibilities, but these should give you a good place to start developing your own workflow.

General modeling tasks

  • Selecting: Selecting elements is the first step you take when you want to change your Mesh. ProBuilder provides a whole range of selection actions that make it easier to target the elements you need to access. As a shortcut, when working in the Face editing mode, you can double-click any face to select all faces on the Mesh.

  • Transforming: You can translate, rotate, and scale geometry elements to change the shape of a basic Mesh. For example, if you use the basic Stairs shape but you want to give it a crooked look, you could move some edges or vertices.

  • Extruding: "Extruding" refers to dragging a face out from the Mesh. To do this, click the Face edit mode Face editing mode button on the Edit modes toolbar, select a face, hold Shift, and use the Transform controls.

    Alternatively, you can extrude edges (for example, if you want to build a ski slope, you could extrude an edge and then smooth it).

  • Insetting: "Insetting" refers to dragging the edges of the face inside the Mesh. To do this, select a face, hold Shift, and use the Scale controls. Then drag in the opposite direction without the Shift modifier to complete the inset.

  • Subdividing edges: If you have an irregular shape (for example, a wall with a peaked top) and you need to split it into four faces (for example, to insert windows), you can insert an edge loop to split the whole wall into two mirrored pieces, and then select only those edges along the front and back of the wall.

    Subdividing the two selected edges then creates a third vertex, which you can connect up with the vertices at the base of the peaked section to create four perfectly even sections on the front and the back. This approach is much easier than trying to subdivide a five-sided polygon.

  • Cutting: This is similar to subdividing faces except that you control the shape of the new face, instead of letting ProBuilder split the face evenly. You click on the face to define the location of the edges and vertices using the modal Cut tool.

  • Boolean operations: Some geometry is hard to create by moving faces, edges, and vertices. The experimental Boolean feature allows you to quickly combine two Meshes together to create a new Mesh. The final Mesh is either the addition of the two, the difference between the two, or only the common geometry between them, depending on the mode.

Object-specific tasks

  • Create a coffee mug: start with a cylinder, select all faces on the top and merge them. Next, create a slight inset on the merged top, and extrude it all the way down. Finally, create a half-torus, rotate it, move it next to the cylinder for the handle and merge the torus and cylinder together.
  • Build a bed: start with a rectangular cube for the mattress. Create smaller rectangles for the legs of the bed, and then merge everything together to make one single Mesh.
  • Make a bottle: start with a a cylinder. Merge the faces on the top end, then extrude the face up, scale it to the size of a neck, and extrude it up again.

Building-specific tasks

  • Make a hole (for a window or door): There are many methods you can use to do this, but some work better depending on what you are working on. For example, in an even and rectangular wall, such as on the first floor of a house, you could use this strategy:

    • Select the two faces of the wall (back and front), then Shift+Scale to create an inset horizontally, and Scale vertically to make it an even border.
    • Press Backspace to delete the insets.

    On the other hand, if you are working on an uneven or multi-sided wall, such as a castle or church wall, this strategy is preferable:

    • Use the Insert Edge Loop action to create two vertical edges. Do the same on the horizontal plane (two for a window, one for a door).
    • Adjust the loops so that the resulting hole is the right size and location for a window or a door.
    • Select the face of the hole and press Backspace. If necessary, from the other side of the wall, delete the face on the other side.

    Whichever strategy you start with, you need to weld the newly exposed edges and vertices together:

    • Select all the edges on one side only of the hole and use Shift+Translate until they connect up with the edge on the other side.
    • Then weld the vertices together where the edges meet.
  • Add a door: follow the "Make a hole" procedure, but to start, create a Door shape. Fit the hole to match, merge the two objects, and then weld the door to the frame you created.

  • Make a tunnel with normals on both the inside and outside: duplicate the tunnel object and scale it slightly so that you bridge the edges. Next, flip the normals on the smaller one.

  • Make a building with towers: start with a cube and inset on the top face, then extrude upward. Repeat this as many times as you like. You could also subdivide the top face to create multiple extrusions.

Finding more inspiration

Use the Unity ProBuilder channel to find videos that demonstrate how to use the tools effectively: