Unwrapping and UV editing
All the commands that are related to editing and generating the texture coordinates (or UVs) of a given mesh, surface or subD. Botcha offers you a fully fledged UV editor that allow you to quickly edit the texture coordinates of the objects you create.
The panel will allow you to edit, pin, unwrap and layout the texture coordinates for the objects. All the commands listed here are accessible via the UV editor panel.
Use of the UV editor
The UV editor allow you to change and improve the UV texture layout in a seamless and integrated way. The UV editor panel looks as shown here below, the top toolbar allow you to do several things:
- Unwrap a surface, mesh or subD object
- Layout the UVs of all of the selected objects
- Show the edit menu
- Show the selection menu
- Save the currently selected UV layout
- Select a background for the UV editor
- Apply the changes to the current objects.
Warning
In order to write back the changes you did in the UV editor you need to click on the "Apply" button
Selection
The UV editor allow two selection modes, rectangle and brush selection. A third interaction mode allow you to warp and modify the UV mesh, similar to what happens with photoshop's liquify brush. For each selection mode you can also decide whether to select all the vertices or edge/non-edge only. Once you have selected some vertices are selected the manipulation gizmo will appear, where you can rotate, move and scale the selection.
Note
You can get the menu anywhere your mouse is with SHIFT + right mouse click
Changing the UVs
The other menu that is available to you allow you to change, manipulate and export the UVs. There are a number of tools at your disposal, here is the list with the explanation of each tool you have:
- Live unwrap, enable or disable the live unwrapping. This will relax the uv mesh interactively around the pinned vertices that you have fixed.
- Pin, will fix a vertex in place for the live unwrapping. That vertex will not move when the relaxation of the live unwrapping will perform.
- Unpin, remove the pinning constraint and allow a vertex to move while live unwrapping.
- Merge, merge all the selected vertices into the average point of the selection.
- Stitch, connect separate UV island by finding the closest vertex for each vertex on the first island on the other island and then place them on the average point. This is very useful when you have two separate objects that you want to connect on the UV space.
- Straighten vertices, allow you to put all the selected vertices on a line. This can be either the fit line of the selection or a X-aligned line or a Y-aligned line.
- Add to document, add the UV mesh to the Rhino document.
- Set UV canvas size, change the scale of the UV canvas into the given one.
- Set texel density, invoke the texture density selection command. (See below)
- Reset view, in the event you cannot find the UVs again. This tool will reset the view to the original one.
- Undo/Redo, undo/redo in the UV editor context are local. As to apply the changes you need to click on the button all the edit you do inside the UV editor will be stored locally and undone there.
Note
You can get quickly access the menu by right clicking on the edit gizmo
B_Unwrap
Unwraps the selected object i.e. will generate a 2D version of the object or a parametrization. This 2D version will then be stored within the object as a texture mapping channel (the default one). The generation will use the ARAP algorithm trying to minimize the stretch of the surface or mesh selected.
When you unwrap an object you should take care that it is properly cut so that the generated texture coordinates will not overlap.
Parameters
- Steps: number of iteration of the algorithm to perform, the higher the more the mesh will be relaxed. After a certain threshold the iteration will not affect the output 2D parametrization as convergence has been reached.
- UVSize: Size of the 2D canvas connected to the texture. If you are measuring materials this should match the size of your measurement. The texture coordinates will be scaled to match the size that you give.
Click here to see the tutorial.
B_LayoutUvs
Layout the texture coordinate islands of the selected objects in UV space. This command will layout in the best way possible the given objects within the UV space. This mean that it will try to nest them so that they do not overlap each other and they are properly spread with a certain amount of padding. With the parameters you can control how much the island will be spaced out.
Parameters
- ImageSize: Target image size for the layout operation. This will influence how far away the island will be placed. The size is expected in pixels.
- Padding: Distance between two adjacent islands during the layout in pixel.
Note
If the space for the layout is not enough the UV charts will expand out of the UV space until they all fit.
B_ScaleUvCanvas
Scale the canvas and the UVs to the given size. This will influence the live unwrapping operations and all the re-unwraps as the new canvas size will be used to infer the dimension of the texture coordinates. We use this important concept of canvas size to ground into reality the application of texture coordinates. If you have a texture that represents a flat area of 500x500 mm and you digitize that, then the matching canvas size should be the same as the actual size.
If you use consistently this then the application of the material will match 1:1 your model.
B_AddUvToModel
Adds to the model the 2D UV mesh of the selected objects. This can be particularly useful if you want to have a flattened version of your mesh/surface. The same metric of the UV editor will be used so to match the model proportions.
Used in combination with the grasshopper component this can allow you to map objects from the flattened version to the 3D version of your surfaces.
B_TransferUVs
Transfers the UVs coordinates from a source mesh or surface to one or more destination meshes or surfaces. This command is useful when you have many overlapping pieces of the same 3D object and you want the texture to be continuous on their surface. It is possible to choose the prefered transfer method.
Methods
- Distance based: Starting from every point of the destination mesh, it copies and applies the UVs found on the closest point of the source mesh. If it does not find any point within a maximum distance chosen from the user, it leaves the UVs unchanged.
- Ray casting: The strategy is similar to the previous, but a ray along the normal direction of the destination mesh is used to find the corresponding point on the source mesh and copy its UVs. The maximum distance criterium holds even in this case.
- Topology based: If the source and the destination meshes have the same topology, this mode allows you to simply copy the UVs from a vertex on the source to the matching one on the destination. This is useful if you have a mesh and its unwrapped one and once you change the first UVs coordinates you want the other one to change consistently. If the meshes do not share the topology, but have an equal number of vertices, the UVs are transfered anyway, but the result might be not exactly as expected. If the meshes do not share the number of vertices either, then the transfering is impossible and the user will be informed about it.
UVs transfered by ray casting.
A mesh UVs transfered on its unwrapped one, which has the same topology.
B_PortraitUVs
Chosen a square and one or more meshes or surfaces, it makes the UVs canvas view fit the view inside the square. This is possible changing the UVs of the selected meshes so that they fit the exact position on the canvas. The result is a "portrait" of the planar view.
Note
If the curve selected as frame is not a square, the smallest square containing its bounding box will be taken as frame.
Click here to see how to improve your workflow taking advantage of the above UVs manipulating commands.
B_SetTexelDensity
This command will allow you to uniformly set the same texture density (i.e. pixels/unit) across all the selected objects. In order for this command to work properly, each object need to have a material with a color texture assign to it. The dialog will allow you to choose how many pixel will cover how many units, the calculation then will be applied across the board to all the objects that are selected.