Weight Mapping a Dagger - This tutorial will show you how to use LightWave’s built-in weight mapping feature to control SimbiontLW procedurals and shaders. You will need basic operating skills for LightWave 7.x and SimbiontLW.

Regaining Artistic Control Over Procedural Shaders

Procedural shaders can add a significant amount of realism to your scenes. One drawback to using procedural shaders is the lack of artistic control. For example, let's say you create a very nice looking wood shader that has scratches and dings in it. You'd like to use this in a scene and you have a good idea of which areas should have more damage.  Your best hope is to change the random seed or translate/rotate the shader until the random pattern of scratches most closely resembles what you want.

In this tutorial, you will texture the blade of a simple dagger object that comes with LightWave.  You will use a weight map to control rustiness of a rusty steel shader applied to the object.  Even though weight maps do not have enough detail to surface an object directly, using them to control procedural shaders works very well.

1. Creating a weight map.

First we are going to load in the dagger object and create a weight map for it.

Load the dagger object.

  1. Start Modeler.
  2. Load the Dagger.lwo object, located inside the Weapons folder.
  3. Zoom in to show the dagger.

Create the weight map.

  1. Select the Map tab, then click the New Weight Map button.
  2. Change the initial value to 0.0 % and change the Name to Rust.
  3. Click OK to create the weight map.

2.  Painting the weight map.

Now we are going to paint the weight map.  Where you paint is where the rust is going to be.

  1. In the Perspective view, select Weight Shade from the drop-down display menu.  You can also select the Weight Shade mode in the other viewports.
  2. Click the Airbrush button (Map tab), or press 'z' to activate the airbrush tool.
  3. In the perspective view, click and hold the mouse button down until the busy cursor goes away.
  4. Drag the cursor over the blade of the dagger.  You should see the dagger turn red wherever you drag the cursor.  You will have to drag the cursor back and forth over one area to get it to turn bright red.
    Note:  Even though the results show the color changing across polygons, the airbrush only changes the values where there are vertices (points). Painting in the middle of a polygon won't work.  If you need more detail in your weight map, you can subdivide the object to create more vertices.
  5. Press the 'n' key (numeric). This panel allows you to change the value you are painting (100% by default), how quickly the paint changes color (Weight) and how wide an area you are painting (Radius).
  6. When you have a good feel for how the airbrush works, paint the blade so it has some red areas and some green areas on it .  The red is where the rust will show up. Here we chose to make the knife rusty along one edge and around the hilt as though the knife was used on that side and then dropped and left to rust.  Don't worry about being neat, it will actually look better if it's a little messy (this is rust, after all!). Below is a close-up picture of the weight map used in this tutorial:

Now, save the new object.

  1. Select Save Object As and save it as DaggerRust.lwo.
  2. Exit out of Modeler.

3. Creating the basic scene.

Now you need to create a scene with the dagger in it to show off the rusty blade.  You may already have a well lit scene that you can add the dagger to.

We simply loaded the dagger and moved the camera into a good viewing position. We also added a spotlight and changed the background to make the work stand out better.  Below is what our basic scene looks like with the default materials.

Once your scene is set up and ready for surfacing it is a good time to save it.

4. Applying a shader to the dagger.

Assign the Rusty Steel DarkTree shader to the blade.

  1. Bring up the Surface Editor.
  2. Make sure the DaggerBlade surface is selected.
  3. Go to the Shaders tab, click on the Add Shaders list, and select SimbiontLWShader.
  4. Double-click on the SimbiontLWShader to edit its properties.
  5. Click on the Load button.
  6. Browse the Materials folder that came with SimbiontLW, and choose MetalRustySteel.dsts.
  7. Go to the Options tab, make sure DarkTree shading and DarkTree Units are selected.
    Render out the scene.  The blade is rusty, but it's a random pattern of rust.  We want to control where the rust appears.

5. Controlling the rust with the weight map.

It's time to connect the weight map we created to the rustiness tweak of the rusty steel shader.

Assign a texture to the Rustiness tweak.

  1. Bring up the Surface Editor.
  2. Select the DaggerBlade surface.
  3. Choose the Shaders tab, and double-click on the SimbiontLWShader.
  4. Select the Rustiness tweak from the Select Tweak list.
  5. Click on the T button for the Rustiness tweak to bring up the Texture Editor.

Assign the weight map to the Rustiness tweak.

  1. Change the Layer Type to Gradient.
  2. Change the Input Parameter to Weight Map.
  3. Change the Weight Map to Rust.

Remap the values of the Rust weight map.

  1. The default maps all values to 100%, which won't do anything.
  2. Click inside the gradient area near the middle to create a new bar.
  3. Change the Parameter to 0% and the Value to 0%.
  4. Click again inside the gradient below the bar you just added.
  5. Change the Parameter to 100% and the Value to 70%.

Render out the scene.  As you can see in the example render below, the rust is in the areas defined by the weight map that you created. Note that the Rustiness tweak is a high level shader control that changes the color, bump, and specular properties of the surface.

In this tutorial, you used a single weight map to control one attribute of a shader. You can create mulitple weight maps for an object, and each of these maps can be used to control a different aspect of the object's surface.  So now you have a method to control the wear, tear, chipping, scratches, rust and wrinkles of your shaders.

This final image was created by adding a second light source, a floor, and more SimbiontLW shaders to the rest of the knife. Weight mapped tweaks were used to add extra corrosion or wear near the seams of the different materials, giving the result a much more compelling look.

Copyright © 2006 Darkling Simulations, LLC. All rights reserved.         Any questions? Mail me! skyler@darksim.com