Sub-Patching and Weight Maps

 

A brief tutorial on how to use sub-patching and weight maps to smooth your objects

 

Created by Todd Brown

 

Sub-Patching:

A feature which smoothes the shapes you create in a way similar to sub-divisions, but without actually creating any new geometry that is editable directly in Modeler.

 

Positives:

Creates a smooth object without as much effort as actually creating all the geometry by hand.

Provide a much better end result than the smoothing option alone.

 

Negatives:

Increases render times, though not by too much if used sparingly on a decent machine.

Does not provide much control over the smoothing.

Does not work on polygons with more than four vertices.

 

Weight Maps (as relating to sub-patching):

Vertex based maps of data affecting some aspect of the vertex. In this case, the data has to do with how far the sub-patched geometry is from the vertex. Weight maps have many other uses which we will not get into here.

 

Positives:

Provide some limited control over the sub-patching feature.

Much easier than using sub-divisions to manage sub-patching.

 

Negatives:

Does not provide unlimited control.

Causes all edges from a modified vertex to be hardened, sometimes inappropriately.

 

The Tutorial

 

Step 1:

 

Load or create the object you wish to use this technique on.

 

Sub-patching only works on polygons with three or four vertices. Using the Boolean tools will almost certainly create polygons that cannot be sub-patched. It is important to plan ahead if you are going to use sub-patching and construct your object accordingly. Some of the basic shapes such as the cylinder have a few polygons which the sub-patching cannot be applied to. These are the top and bottom in the case of the cylinder.

Creating objects with all four or three sided polygons is a good idea.

 

 

Step 2:

 

Press the "Tab" key to enable sub-patching.

 

The "SubPatch" button is location under the "Construct" tab right under the heading "Convert".

 

 

Step 3:

 

Make sure that the "W" is selected out of the three letters in the bottom right hand corner of Modeler. This sets weight maps as the type of map selected for editing. Select "SubPatch Weight" in the drop down box to the right of the three letters to select the weight map affecting the sub-patch as the current weight map set for editing.

 

 

Step 4:

 

Find any locations on the object that appear either too hard edged or too smooth. In this example, we zoom in on the metal spiral around the base of the light bulb.

 

 

Step 5:

 

Select the points along the edge you wish to increase or decrease the sharpness of and open the "Set Map Value" window which is located under the "Map" tab below the "General" heading. If you have multiple maps, ensure the correct one is selected in the "Vertex Map" selection box. Set the percentage in the "Value 1" box as you see fit. Positive values create a sharper edge whereas negative values create a deeper curve. Basically, you are setting the distance from the vertex that the object's rendered surface is.

 

You can adjust the weights with  polygons selected instead of points.

You can use the "Airbrush" and "Weights" tools under the "Weight and Color" heading in the "Map" tab to adjust the weights manually, though using the value setting is better for high precision.

 

 

Step 6:

 

Once you apply your setting you can view it in the perspective window. Undo the changes and redo them with different until you are happy with them.

 

One of the faults in Lightwave's sub-patching feature can be seen here. Since weight maps are applied by vertex, rather than by edge, the effect goes in all directions from the modified vertex. This creates a hard edge where it is sometimes  inappropriate.

For the purpose of this example, I will be leaving the vertices overly weighted to show the full effect.

When working on organic modeling with sub patching, you will want to keep hard edges to a minimum.

 

 

Step 7:

 

Now that your object is properly weighted, bring it into Lightwave proper for a test render. As you can see, the object does not look very smooth at all.

 

 

Step 8:

 

An actual rendering will produce the same results.

 

 

Step 9:

 

To solve this problem, select your object in Lightwave such that it has a yellow bounding box displayed around it. Go to the "Objects" tab and select the "SubPatch Level" button under the "Properties" heading. The two values here represent the number of sub divisions created by the sub-patching feature. The "Display" value sets the number of sub-patches displayed within Lightwave's view port and the "Render" value represents the number of sub-patches in the final render.

 

A value of ten under render should be sufficient for most objects.

If you have a powerful enough machine, go ahead and set the "Display" value to the same value as your "Render" value.

Setting your "Display" value too high may cause the system to lock up, especially on lower end machines or in highly detailed scenes.

The "SubPatch Level" option is set by object and is not universal throughout a scene. You may want to keep the value low for far away objects.

 

 

Step 10:

 

If you perform another render now you will see that things are looking quite a bit better, but the edges of the polygons are still visible, especially in areas with secular highlights.

 

 

Step 11:

 

To resolve the issue of hard edges, open the texture properties for the surface you wish to modify and enable the "Smoothing" option. You will need to determine your own "Smooth Threshold".

 

A "Smooth Threshold of the default value of 89.53 is fine for most objects.

If render times are important and the object will not be near the camera, using "Smoothing" exclusively or with a much lower level of sub-patching may be wise. Sub-patching drastically increases render times in some cases. "Smoothing" without sub-patching may create distortions in how the object appears, especially in the object's lighting.

 

 

Step 12:

 

Create another render to ensure everything looks as it should.

 

You should attempt to use the minimum level of sub-patching possible to attain a completely smooth object at the distance it will appear in the final scene.

 

 

Step 13:

 

Ensure that your object still looks correct under the conditions it will be in for the final render, in terms of lighting and such.

 

As you can see, the hard edges caused by excessive weighting of the vertices around the base of the light bulb are still visible at this distance. In a final render of this object, it is unlikely that this would be seen. If you need hard edges without the distortion caused by weight maps, using the knife tool to create subdivisions around the protruding points may be a better option.