User Tools

Site Tools


This page exists within the Old ArtZone Wiki section of this site. Read the information presented on the linked page to better understand the significance of this fact.

Texturing a $20 Bill Using Shading Domains

Author: thedanman

Tools Needed

  • Carrara 3 or higher

Support Files

Introduction

Have you ever tried to apply separate textures to an object only to be frustrated back the inability to find a mapping mode to get your texture where you want it? Shader Domains can help you demarcate exactly where you wish to place a texture on your object. By modeling and texturing a $20 Bill this tutorial will illustrate the basic concepts of using shader domains.

100-747.jpg

Step 1 - Modeling the $20 Bill as a Vertex Object

For this simple tutorial we wish to create a simple model that we can establish shading domains for. A $20 bill is a great candidate as it has unique front and back faces that can be textured using two separate texture maps one for each face respectively. This tutorial will: 1. Help you model the $20 bill as a vertex object, 2. Establish shading domains for the front and back of the $20 bill, 3. Apply textures using UV Mapping so that textures can be morphed and manipulated correctly.

To begin modeling the $20 bill, start by inserting a vertex object into your blank scene by selecting “Insert > Vertex Object”

100-748.jpg

Switch to the modeling room by selecting the “Wrench” icon towards the top right of the screen.

100-749.jpg

Now within the modeling room Select a cube vertex primitive and create one in the center of the screen by left clicking dragging your mouse anywhere on the screen.

100-750.jpg

Switch your selection tool to “scale” by right clicking the cube.

100-751.jpg

This will change the right sidebar's display so that new X, Y, Z scale values will appear. Set the X value to 6.25“, the Y value to 2.5” and the Z value to 1“ initially. Setting the Z value (thickness) to 1” will help for manipulation - we will change this value eventually to 0.1“ for the final version of the bill. These dimensions as given are the actual dimensions of a US $20 bill.

100-752.jpg

Step 2 - Creating the Shading Domains

We will use two shading domains on our $20 bill. Shading domains help determine over what faces on our object's geometry textures will be placed. Without shading domains you could try to texture map an object in various mapping modes, however, you are limited to using a single texture to try to map precisely to your object. This is often difficult and frustrating to do. As we will see shortly using shading domains is a simple solution to texture mapping problems.

To create our shading domain for the top face of our $20 bill. Switch to the “four views” mode within the Modeling Room which you should be already in.

100-753.jpg

Using the “Front” view pane of our four views (the bottom right of the four) Select only the vertices of our $20 dollar bill. By selecting those vertices in the front view you will actually be selecting the entire top face of $20 dollar bill. You can easily confirm that the correct faces are selected by viewing your selection from the Director's Camera view (immediately above the Front view pane).

100-754.jpg

Once you have selected the top face, under the “Model” tab in the side bar, and under “Shading Domain” select “New Shading Domain.” You will be prompted for a name for the shading domain. I used the label: “Front” You have now established a shading domain for your $20 bill! The top face of your $20 bill will now have a shading domain “Front” associated with it.

100-755.jpg

Repeat the same series of procedures as outlined in this step back face - selecting the bottom vertices/faces of the $20 bill. For this domain I used the label: “Back”

100-756.jpg

After you have created both “Front” and “Back” shading domains, this is a good point to rescale the Z scale of the $20 bill down from 1” to 0.1“ You can do this by selecting all the vertices and right clicking the “Scale” option as covered in Step 1 of this tutorial. This will make you $20 bill appear “paper-thin”

100-757.jpg

Step 3 - Applying the Shaders

We are now ready to apply the textures to our “Front” and “Back” shading domains.

Switch windows to the texturing room by clicking on the pencil icon at the top right of Carrara's user interface.

100-758.jpg

Notice now that under the “Vertex Object” in the sidebar and under its “Shading” tab there are now 3 shading domains. “Texture 0” is the default domain to all created object, but the “Front” and “Back” domains are two which you just created.

We will first create new master shaders for the “Front” and “Back” domains. This is simply done by clicking on the drop down blue arrow button within both the “Front” and “Back” shading domains in the sidebar. Select the bottom option in the drop down menu: “New Master Shader”

100-759.jpg

Once this is done, edit each shader to apply a texture map to the color channel of the shader. Do this first by double clicking on the shader from the sidebar to bring up its respective properties. For example, for the “Front” shading domain's shader properties, double click on “Shader 1” under “Front.” A property window will appear along with a preview of your object.

Edit the “Color” property of your shader by selecting “Texture Map.” You will then have the option of loading your texture from a file on your computer. For this tutorial textures have been saved internally in the example Carrara Scene file, but you are free to use any texture you like at your disposal. For this tutorial all other properties of the shaders are left untouched.

100-760.jpg

100-761.jpg

Repeat this same series of steps for applying the shaders for “Shader 2”, under the “Back” shading domain.

100-762.jpg

Step 4 - Texture UV Mapping

Sometimes deformers to the vertex object will mess up the texture mapping unless you have a UV Map applied to your shading domain. This is especially important in animation. A UV map “welds” your texture to your object so that even if the object is deformed or changes, the texture will change correspondingly. If you are only producing the $20 bill without the intent to deform your $20 bill object you may wish to skip this step, otherwise to UV map your textures for animation, simply go back into the Modeling Room and select the “UV Map” tab on the side bar. Click the “UV Editor” and the UV Editor window will appear.

100-763.jpg

Within the UV Editor under the “Edit” tab you can easily select your “Front” and “Back” shading domains. By clicking either one of these, the faces for those domains will appear in the UV Editor. Each vertex that appears in the UV Editor (in red) will serve as a weld point to the texture that has been assigned to its domain. As such we need to position our UV vertices as accurately as possible over our texture. To do so we will need to make some preliminary changes on the “Projection” tab of the UV Editor. With the “Projection” tab selected, change the projection to “Planar” oriented along the Z axis. Click “Apply” to set the changes.

100-764.jpg

Click apply and a UV grid will appear with the texture that is currently mapped to the shading domain. For this tutorial I started with the “Back” shading domain, and hence the back texture to the $20 bill has appeared. As we will need to do this for both “Front” and “Back” shading domains, these steps for the “Back” will be equally applicable to the “Front” as well. Align the red vertices using the transform and scale tools.

100-765.jpg

Note that the UV Editor wraps the vertices both laterally and vertically. You will need to carefully manipulate the red vertices to align to your texture map as shown in this image:

100-766.jpg

Again, repeat this series of steps for both the “Front” and “Back” shading domains.

Step 5 - Render and Conclusion

Finally you are ready to render, animate, and use your textured $20 Bill. Use shading domains do add textures to virtually any object, anywhere. I hope this tutorial was helpful to you in learning how to use shader domains - happy rendering!

100-747.jpg