Your Ad Here

Manual BodyPaint 3D

UV Edit Menu

To open the default layout for UV editing, choose Window > Layout > BodyPaint UV Edit.

The default layout for UV editing.

The Texture view boasts a powerful integrated UV editor which enables you to create a high quality UV mesh for any shape of object.

Before you can edit the UVs, though, you must ensure the object actually has UVs (you can have BodyPaint 3D generate these if required). Also, the object’s texture must use UVW mapping.

Two key advantages of UVW Mapping are:

For example, suppose you want to paint a moustache on a head model. However, the UV polygons are too small (i.e. cover too few texture pixels) to allow you to paint hair without pixelation. One solution is to select the UV polygons for the moustache, move them to an unused part of the texture and scale them up. The UV polygons will then cover more texture pixels, enabling you to paint more detail than was possible in the previous position on the texture.

There are also commands which enable you to optimize the UV mesh and rid it of overlapping. In short, the UV editor offers all the tools you need to create a superb UV mesh for trouble-free painting.

What is a UV mesh?

If your object has UV coordinates, a UV polygon is assigned to each object polygon. The UV polygons have their own independent coordinates (on the texture bitmap) and together they form a UV mesh.

Figure 1. The 3D view and the Texture view for a cube with spherical mapping. Some of the object polygons are selected.
Figure 2. The 3D view and the Texture view for a cube with cubic mapping. Again, object polygons are selected.

Note how each polygon is allocated its own UV polygon in the Spherical Mapping example. As a result, you can paint each side of the cube separately.

In Figure 2 (Cubic Mapping), you can see that there are no separate UV polygons; the sides cannot be painted separately, because the texture has been applied six times, once to each side. Brushstrokes applied to one side are applied to the other sides automatically.

However, the example exposes one of the shortcomings of Spherical Mapping: the UV mesh is heavily distorted near the top and bottom. These areas are at the poles of the spherical projection.

This distortion is caused by the fundamental principle of projection: a two-dimensional surface (texture) must be placed onto a 3D object. Distortion is inevitable. Think of trying to wrap your child’s favorite Pokemon™ sticker around a baseball. Maps of the world face the same problem. For example, Greenland appears to be larger than the United States on a map. In reality, the United States is more than three times larger than Greenland. Distortion happens when a sphere’s surface (such as that of the Earth) is represented in two dimensions.

Nonetheless, you can paint your object free of distortion using projection painting.

Troubleshooting: UV mesh display

I can’t see the UV mesh in the Texture view.

I can’t edit the UV mesh.

If the UV mesh is black, it means you cannot edit it.

UV Manager...

Even the best paint tools won’t help if your model’s UVs aren’t up to scratch. In this manager, you’ll find several powerful UV editing tools which you can use to optimize your UV mesh to allow for distortion-free painting. In particular, use these tools to avoid overlapping UV polygons (a common problem with complex objects).

Mapping

These commands attempt to optimize the UV mapping while avoiding overlapping polygons. Depending on which settings you choose, the UV mesh will be separated into various groups of UV polygons with gaps between them.

You can choose one of three algorithms:

Optimal (Cubic)

Optimal (Cubic) places a cube around the object and separates the UVs based on which side of the cube they face.

In the pictures below, the torus has been observed from six sides. Ten UV polygon groups in total have been created: one group as seen from the top of the cube, another as seen from the bottom of the cube, and two groups for each of the cube’s four sides (this is because the torus has two sides when seen from the side: an inside and an outside).

Preserve Orientation

Preserve Orientation disabled (left) and enabled (right).

Enable this option to prevent BodyPaint 3D from arranging the polygon groups in the optimal horizontal direction. This saves time when the positions of the UV polygons are calculated.

Stretch To Fit

Stretch To Fit disabled (left) and enabled (right).

If this option is enabled, the UV polygon groups will be stretched in the U and V directions to cover the entire bitmap taking into account the Spacing value.

2D

If this option is enabled, a different algorithm is used (Max Area Factor no longer has an effect). The algorithm checks if the first UV polygon overlaps any of the other UV polygons. If it is overlapping, a new UV polygon group is created and the following UV polygons are added to the group. If it isn’t overlapping, no action is taken. The algorithm repeats the check for all UV polygons.

Max Area Factor

This factor only has an effect if 2D is disabled. It defines the lower limit of a range within which UV polygons are added to existing groups, even though by definition (see the cube mentioned above) they should not be added to the groups.

More precisely, Max Area Factor defines how much smaller in percent the polygons may be than the average surface area.

Spacing

Defines the size of the gaps between the separated UV polygon groups. Use low values, otherwise the UV polygons will be scaled down to fit the texture.

Optimal (Angle)

Maximum Distortion

If the angle between two connected object polygons is less than or equal to the Maximum Distortion value, their UVs are placed in the same group; otherwise, they are placed in different groups.

In general, set Maximum Distortion to a low value, otherwise the changes to the UV map will be minimal. Lower values mean more UV polygon groups will be formed. The lowest value, 0, means each UV polygon is separated from its neighbors. A value of 100% corresponds to a 90° angle between the object polygons, 50% corresponds to 45°, and so on.

Realign

This algorithm realigns existing UV mesh groups. No new UV groups are created. The UVs remain in the same groups.

Realign is applied automatically when you apply Optimal (Cubic) or Optimal (Angle).

Preserve Orientation, Stretch To Fit, Spacing

See Optimal (Cubic), above.

Relax UV

Relax UV gives you a different approach for optimizing the UV mesh. Unlike Optimal Mapping, which splits the UV mesh into groups of UV polygons, Relax UV attaches invisible springs that pull on the UV mesh to straighten it out and prevent overlaps. Click Apply repeatedly to pull harder on the UV mesh.

The command is applied to the selection or to the entire UV mesh if no UVs are selected.

In the example below you can see part of the UV mesh for a head. This UV mesh was created based on cylindrical mapping.

Before using Relax UV

The UV polygons are distorted and overlap in the areas for the nose, eyes and ears (left picture above). As it stands, this UV map is almost useless.

After using Relax UV

This is where Relax UV comes in. After clicking Apply three times, the UV mesh is now suitable for painting (right picture above). The distortions are greatly reduced.

Fix Border

The UV points at the edge of the selection are fixed in place.

Keep Neighbors

UV points connected to unselected polygons are fixed in place. This enables you to untangle part of the UV mesh, such as the ear, without it being separated from the rest of the mesh. Free points at the edge of the selection are not fixed in place.

The original UV mesh (center), both options disabled (top right), Keep Neighbors enabled (bottom left) and Fix Border enabled (bottom right).

If both options are disabled, the UV mesh will shrink each time you click Apply.

Pin Point Selection

If you want to prevent certain areas from shrinking together when relaxin UVs, select points that should be locked (pinned) to their current position and these UV points will not be moved.

Use Tag

If the point selection should be read from a Selection tag, activate this option and drag the corresponding Point Selection tag from the Objects Manager into the field at the left of the option.

Example:

Workflow example for applying a UV Relax to a hand.

Lets say you want to paint this hand. After selecting the hand’s top surface and applying a frontal Projection (Projection tab), the result will look like hand 1. Many UV polygons overlap as a result of the projection. Click once on the Apply botton in the Relax UV tab (all other options are deactivated). The hand will be distorted, as shown with hand 2.

Although no UV polygons overlap, the finger tips have been compressed far too much to be able to work effectively in these areas. Switch to the UV Point mode and select the points of each finger and move them along the direction of the finger. Scale the points slightly for each finger and the result should look like hand 3.

Next, select all points of the finger tips and a few points on the wrist that lie on opposite sides of the joint. These points will now be pinned in place. To do so, activate the Pin Point Selection option. If you now click on the Apply button, the result will be as shown with hand 4. This result looks pretty good and only needs to be fine-tuned somewhat.

Cut Selected Edges

From left to right: An edge selection was applied to the facial area; the UV mesh with a cylindrical projecton; the UV mesh after applying Relax UV (Auto Realign active).

When working with complex objects, the UV mesh must often be divided into groups (so-called UV islands). Activate this tool when selecting groups of edges (in Edge mode in the BodyPaint layout: Tools > C4D Tools) and they will be separated out.

Also activate the Auto Realign option (has the exact same function as the Realign option in the UV Manager’s Mapping tab) to separate the UV islands spatially. This only applies to UV islands whose points have not been pinned. If only a single point is pinned the island itself will be ignored.

Use Tag

If the edge selection should be read from a Selection tag, activate this option and drag the corresponding Edge Selection tag from the Objecs Manager into the field to the left of this option.

Relax UV will display an error message in the following instances:



Projection

Here you can change the projection simply by clicking on the appropriate button such as the Sphere button for spherical projection.

From top left to bottom right: Sphere, Cylinder, Frontal, Flat, Cubic, Cubic 2, Box, Shrink.

Additional projection types:

How the algorithm works

First a bounding box is placed around the selected UV polygons (or object polygons). This bounding box will represent the texture later on. If Fit To Selection is disabled, the bounding box will enclose the entire object.

You can choose how the bounding box is aligned using the drop-down list. Choose from Object System (the texture’s axes run parallel to the object’s axes), World System (the texture’s axes run parallel to the world system’s axes) or Average Normal (the texture’s Z-axis points in the average direction of the normals).

Weight Normal can only be selected if the drop-down list is set to Average Normal. It defines how the average normal is calculated. If the option is enabled, the normals are weighted according to the size of the polygons; otherwise, the arithmetic average is calculated.

As with most UV commands, the best setting depends on the nature of the object.

Transform

You can apply precise transformations to the selected UV polygons by entering values into these boxes.

Position

You can move the UVs a certain number of pixels along the X and Y axes from their current position using these values. X represents the horizontal direction, Y the vertical direction. You can also enter negative values to move the UVs in the negative direction of the axes.

Scale

Here you can enter a scaling factor for the UVs in the X and Y directions. Values less than 1 shrink the UVs, values greater than 1 expand them.

Rotate

Rotates the UVs by the specified angle.

UV Commands

Store UV

Stores the current positions of the UV coordinates. You can use the following two commands, Restore UV and Remap, to access the stored positions.

Restore UV

Restores the UV mesh to its stored state (see Store UV, above). These commands allow you to experiment with the UV mesh and return to a previous state if things go wrong.

Remap...

Remap enables you to move and scale part of the texture so that finer details can be added.

Until now, all you have edited in the UV editor are UV polygons and UV points. This command enables you to edit the bitmap itself.

First, store the UV coordinates (UV Edit > Store UV). Next, select the UV polygons that are over the part of the texture you want to move. Move the selected UV polygons to an empty part of the texture. If you call Remap now, the bitmap will be copied (or cut and pasted) from the original position of the UV polygons to their new position.

Use the list of material channels in the left part of the dialog to choose which channels should be remapped.

From left to right: State prior to remap; after remap with Cut deactivated; after remap with Cut active.

If you enable the Cut option the bitmap will be cut rather than copied from the original position of the UV polygons.

Realign
Relax UV
Optimal Mapping

See Mapping and Relax UV.

Fit Canvas to UV

When you move UV polygons in the Texture view, you are free to place them outside the texture. Exactly what is then mapped to the associated polygons depends on the object’s Texture tag. If Tile is enabled, the texture will be tiled; otherwise, a neutral gray color will be mapped to the polygons.

But if you’re like most people, chances are you’ve moved UV polygons outside the texture because you want to increase the size of the texture. In such cases, choose Functions > Fit Canvas To UV. The texture will be resized to fit the UV and the new pixels will be filled with the background color. See Tweaking the UV Mesh for an example of this technique.

UV Terrace

The algorithm attempts to connect the UV polygons of neighboring object polygons together by scaling and moving them. See the example below for clarification.

Top: UV Polygon mode; bottom: UV Point mode

Use this function to re-connect UV polygons or UV points that were not attached. This only works if the corresponding UV polygons and UV points share common edges within a given polygon object itself (i.e. you wouldn’t be able to connect the UV polygons from a character’s foot to those of its eyelid).

Follow these procedures, depending on the UV mode selected:

Copy UV Points
Paste UV Points

What’s happening in the illustration above? First we selected the top left polygon and chose Copy UV Points. This copied the polygon’s UV coordinates to the clipboard. We then selected the bottom right polygon and chose Paste UV Points. This applied the UV points stored in the clipboard to the bottom right polygon. Now the bottom right polygon displays exactly the same part of the texture as the top left polygon.

Clear UV

This command deletes the selected UV polygons. Object polygons without UVs will be assigned the color of the texture’s top left pixel.

Move Up Sequence
Move Down Sequence

Moves the sequence of the points for the selected UV polygons up or down one position. Things will still look the same in the Texture view, but on the mapped object the content of the selected polygons will be rotated (either clockwise or anticlockwise depending on which command you choose).

Flip Sequence

Reverses the sequence of the points for the selected UV polygons. On the mapped object, the content of the selected UV polygons is mirrored.

Max UV

Scales each selected UV polygon to fit the texture. On the mapped object, each selected polygon will display the entire texture.

Fit UV to Canvas

Scales the selected UV polygons as a group to fit the texture.

Mirror U
Mirror V

You can use these commands to mirror the selected UV polygons horizontally (U) or vertically (V). The mirror axis runs through the common center of the UV polygons.

Transform

See Transform.

Start Interactive Mapping

This command provides a quick way to alter the mapping for the selected UV polygons. For example, suppose you want to change the mapping for the left ear of a head mesh.


  1. Select the UV polygons for the left ear.
  2. Choose Start Interactive Mapping.
  3. A Texture dialog will appear in the Attribute manager which relates to the selected Texture tag or the Texture tag belonging to the selected UVW tag. You can change the mapping parameters as desired. By default, the projection changes from UVW Mapping to Flat. In most cases, this is the best setting. However, you can choose your own projection setting if you wish.
  4. The texture axis tool is activated automatically. Drag in the 3D view to move the texture axis until the texture is in a suitable position over the selected polygons.
  5. Choose Stop Interactive Mapping.

The texture moves over the entire object in the viewport. Ignore this temporary effect — the new mapping affects the selected polygons only.

Stop Interactive Mapping

Select this command to stop the interactive mapping process. New UV coordinates will be assigned to the selected UV polygons and the tool active prior to interactive mapping will be activated once more.

Unstitch UV

Top: UV points; bottom: UV Polygon mode.

This command basically does the opposite of what the UV Terrace command does. Executing this command will result in the following, depending on the UV mode selected:

The Unstitch UV command lets you separate parts of the UV mesh in order to edit them separately.

Line Up UV

Select rows of points whose individual points should be lined up in a row based on defined start and end points. The rows of points must be well-defined so the algorithm can indentify them as rows. This command will not work on several rows of points lying on top of each other!

Return to CINEMA 4D Index


Your Ad Here