How Do I Shade / Texture Stuff?: Shading Workflow Overview
By Neil Blevins
Created On: Nov 12th 2013
Updated On: Dec 10th 2024
Software: Any

So this lesson discusses my workflow for shading / texturing models. This topic is of course huge, so consider this an overview.

This workflow is the process I go through when shading any sort of object, regardless of whether its a character, vehicle, set, or prop, hard surface or organic, maya, 3dsmax, blender, this workflow is pretty much the same no matter what software you choose (I use 3dsmax as my main example software in this lesson, but all the theory applies to all of the 3d apps and renderer out there).

Most of us when texturing are doing something similar to this workflow instinctively, but the nice thing about laying it all out is it may help you make more informed decisions on which techniques to use for what objects. There are many, many ways to go about texturing cg models, and rather than choosing one technique and trying to use it for every situation, there is value in using a number of different techniques, ones that are better suited for the specific situation. At many companies, they have decided to UV and then paint everything. Which is fine, but they're missing out on a lot of time saving methods like Triplanars, Procedurals and Projections. This article hopes to show that there are lots of methods for shading, and using many instead of few has a lot of advantages.


Here are the basic steps of my shading / texturing workflow...
  1. Reference
  2. Visual Details List
  3. Splitting Details Into Shaders And Patterns
  4. Shaders
  5. Patterns
  6. Splitting Patterns Into General and Specific Patterns
  7. General Patterns
  8. Specific Patterns
  9. General Pattern Placement
  10. Specific Pattern Placement
  11. Pattern Storage And Texture Baking
  12. Pattern Creation
  13. Layering
  14. Light Rig
  15. Final Material
Now lets look at each stage one by one.

1) Gathering Reference

Probably the most important thing you can do to make your project successful, even for objects that don't exist in real life. Sometimes we get so excited making an object in 3d that we don't stop to first think about and observe the thing we are going to make. Spend the time to get good reference! Use original sources (real photos, observation) more than processed sources (other people's paintings, images, films).

Here's some places to get Reference:
2) Identifying Visual Details

Pick the 5 to 10 things that make this object look the way it looks and write them down.

Example, Rock:


Example, Fire Hydrant:


3) Splitting Visual Details Into Shaders And Patterns

A Surface Shader is a set of equations used to determine the appearance of a surface and how it responds to light. A Shader is combined with Maps (Patterns) to form a Material. Sometimes your material is referred to as a "shader", but for clarity sake, I will only refer to the Illumination portion of your material as a shader.

Now lets look at your Visual Detail List, what on the list is part of the shader?

Example, Hydrant (3 shaders):
Look at your Visual Detail List, what on the list are patterns?

Example, Hydrant (8 patterns):
4) Shaders

Common Shaders in the CG World:
Now lets choose the most appropriate shaders...

Example, Hydrant: Here's a few lessons on shaders...
5) Patterns

Now we look at our list of patterns. To make a successful material, you generally want at least 3 patterns per material...
Although some specialty shaders require more patterns like a Translucency amount, subsurface color, emissive, etc.

Patterns tend to be chains of nodes (maps) that are layered together and then plugged into a particular channel of a material. Like in this example, a Placement node places a Pattern, that Pattern is Color Corrected (CC), then these Color Corrected Patterns are layered together using a Layer node, the result of that is Color Corrected, and then plugged into your material as a color, a bump, a specular amount etc. At its most basic level, pretty much all Pattern Map Chains you do for any material take on a form like this...



6) Splitting Patterns Into General And Specific Patterns

Think of this with a traditional painters metaphor. Many painters start by blocking in the basic colors over the entire canvas, then they add details on top. So your basic color would be the General Patterns, and your details would be the Specific Patterns.

Also, some companies have a specific "Shader" job and a specific "Painter" job, usually the Shader handles the Materials and General Patterns, Painters handles Specific Patterns. Or in some companies you have Shader Writers and Painters, in which case the Shader Writer codes the shader, and almost everything else is handled by the Painter. Some companies, one person does both the shader, specific and general patterns.

7) General Patterns

In our Fire Hydrant Example, these are the General Patterns:
8) Specific Patterns

In our Fire Hydrant Example, these are the Specific Patterns:
9) General Pattern Placement

Patterns can be thought of as having three components, how you place that pattern on your object, how the pattern is stored, and creating the pattern itself. These three components are tied together, but for the purpose of choosing techniques, lets keep them conceptually separate for the moment.

No one pattern placement method works in all cases, generally a material will need to use several different pattern placement methods. All pattern placement methods can be used for General and Specific Patterns, but for the most part a placement method tends to work best for one or the other. So lets look at the 8 General Pattern Placement methods, and then you can decide which ones work best for the General Patterns in your material:
  1. Blended Box Mapping
  2. Curvature
  3. XYZ Space
  4. Switcher
  5. Occlusion
  6. Direction
  7. Reference Object
  8. Distance
9.1.1) Blended Box Mapping

This is also sometimes refered to as Triplanar mapping. Its like regular box mapping, a bitmap is projected from 6 different directions onto a surface, but the edges are blended, so you don't see any seams.



Here's a lesson on Blended Box Maps...
Examples In Software:
Advantages:
Disadvantages:
9.1.2) Curvature

This pattern creates a gradient. The gradient depends on the concavity or convexity of an area. You use the resulting gradient to mix between materials or maps. Similar to Ambient Occlusion.



Here's a lesson on Curvature...
Examples In Software:
Advantages:
Disadvantages:
9.1.3) XYZ Space

The pattern exists in a 3 dimensional space. This is generally used by Procedurals. XYZ Space can be in world space or object space. For example, if you rotate your object, the object space changes, but the world space will not.


Examples In Software:
Advantages:
Disadvantages:
9.1.4) Switcher
A switcher is the simplest of pattern placement. Basically, you define a set of patterns, and they get assigned to specific groups of objects, faces, etc., usually using some sort of ID value that connects the pattern to the thing its being applied to. So for example, you create a rock material that has 5 different rock colors, and then spread randomly the ID 1 to 5 on a bunch of rocks, and each rock receives one of the 5 rock colors.



Here's a lesson on switchers...
Examples In Software:
Advantages:
Disadvantages:
9.1.5) Occlusion
Ambient Occlusion (AO) is a pattern that creates a gradient. The Gradient is based on how much of a particular surface sees of the sky (Or for the more technical minded, its the amount a particular point sees of a hemisphere centered at the point and oriented by the face normal (unless you have a cutoff distance, in which case it's far more likely you'll be simply calculating how close you are to adjacent surfaces)). You then use the resulting gradient to mix between materials or maps.



Here's a lesson on Occlusion...
Examples In Software:
Advantages:
Disadvantages:
9.1.6) Direction

Map that creates a gradient. Areas pointing in a particular direction get one color, areas pointing away get a second color, and a soft transition in between. This can be in camera space (so faces pointing towards the camera get 1 color, faces perpendicular to the camera get another color), or this can be in world space (all faces pointing up in Z get one color, all other faces get the second color.) You use the resulting gradient to mix between materials or maps.



Here's a lesson on direction...
Examples In Software:
Advantages:
Disadvantages:
9.1.7) Reference Object

Map that creates a gradient. Areas inside a particular reference object is one color, outside is a second color, with controls for a soft transition (object can be Geometric, a special widget, even lighting). You use the resulting gradient to mix between materials or maps.



Examples In Software:
Advantages:
Disadvantages:
9.1.8) Distance

Map that creates a gradient. Areas that are a certain distance from an origin point get one color, areas near a second origin get a second color, and a soft transition in between. Origins can be a point object in space, a coordinate in world space, the distance from a camera, etc. You use the resulting gradient to mix between materials or maps.



Examples In Software:
Advantages:
Disadvantages:
10) Specific Pattern Placement

Now lets look at the 3 Pattern Placement methods for Specific Patterns:
  1. Atlas
  2. Projections (UV Projections, Camera Mapping (Perspective Projections), Ortho Projections)
  3. Per Polygon
Once you decide how you will place your specific patterns, they can be interacted with in one of two ways:
  1. 3D Interaction
  2. 2D Interaction
10.1.1) Atlas

A texture atlas is a large 2D image containing a collection of sub-images, or "atlas" which contains many smaller sub-images, each of which is a texture for some part of a 3D object. In other terms, this is breaking up your 3d model into flat sections and then applying the pattern to these. Frequently this is done using UVs, where you set up a set of flat 2D uvs that correspond to the vertexes of your 3d object.



Here's a few lessons on Atlases...
Examples In Software:
Advantages:
Disadvantages:
10.1.2) Projections

Your pattern is projected from a projector source, which is usually a primitive shape such as a planar projection, although sometimes the projection can be spherical, cylindrical, etc. Projects come in 3 different flavors, each with their own advantages and disadvantages.

10.1.2.1) UV Projections

Your pattern is projected from a projector source and then applied via UVs. Ideally, this projector source is procedural so you can make tweaks to its size and position later on. Since they're applied as UVs, you can flatten the projector and then just treat the resulting UVs as an Atlas.



Here's a lesson on projections...
Examples In Software:
Advantages:
Disadvantages:
10.1.2.2) Camera Mapping (Perspective Projections)

This is another subset of Projections, but you project your pattern from the viewpoint of your final perspective camera, or a camera or set of cameras similar to your final camera. Frequently used in Matte Painting.



Examples In Software:
Advantages:
Disadvantages:
10.1.2.3) Ortho Projections

The Projection Source is decoupled from the object (like in Camera Mapping), but your camera isn't your final scene camera, and the camera is orthographic.


Here's a lesson on projections...
Examples In Software:
Advantages:
Disadvantages:
10.1.3) Per Polygon

Software that lets you apply your pattern directly on your 3d model, applying the pattern to the faces and / or vertexes of your mesh. Pattern data can be stored in a number of formats such as PTEX (for detailed face paint) or Vertex Colors (for sparser patterns).



Examples In Software:
Advantages:
Disadvantages:
10.2.1) 3D Interaction

Applying your pattern on a model in a 3D view. If using 3d Paint software, paint can be applied to a 2d plane above your surface, and then the result gets projected onto your surface (Zbrush, Mari), or the paint can be applied directly to the surface (Mudbox).



How This Technique Interacts With Pattern Placement:
Examples In Software:
Advantages:
Disadvantages:
10.2.2) 2D Interaction

Applying your pattern on a model in a 2D view.



How This Technique Interacts With Pattern Placement:
Examples In Software:
Advantages:
Disadvantages:
11.1) Pattern Storage And Texture Baking

Once you decide how you want to place your pattern, you have to decide how that pattern will be stored.

Now lets look at the 7 Pattern Storage methods:
  1. Atlas Bitmaps
  2. Projection Bitmaps
  3. Vertex Colors
  4. Object Attribute
  5. PTEX
  6. 3D Volume
  7. Algorithm
11.1.1) Atlas Bitmaps

This is the most common Pattern Storage method. The pattern is stored in a bitmap image and is applied to your object using unwrapped UVs.



Examples In Software:
Advantages:
Disadvantages:
11.1.2) Projection Bitmaps

The pattern is stored in a bitmap image and is applied to your object using projections. Are frequently tileable.



Examples In Software:
Advantages:
Disadvantages:
11.1.3) Vertex Colors

Pattern is stored on the vertexes of your object. Each vertex has a color assigned.



Examples In Software:
Advantages:
Disadvantages:
11.1.4) Object Attribute
 
Like Vertex Colors, pattern is stored on the 3d object. However, a single uniform value is assigned to the entire object. Used almost exclusively with Switcher Pattern Placement.



Here's a lesson on Object Attributes...
Examples In Software:
11.1.5) PTEX

A per face mapping developed originally at Disney. Each face gets its own map, and these are collected together into a ptex file.



Here's a few lessons on PTEX...
Examples In Software:
Advantages:
Disadvantages:
11.1.6) 3D Volume

The pattern is stored in a 3d volume, such as a point cloud or brickmap file, and then projected at rendertime onto a surface, or in some cases the 3d representation is rendered itself.


From http://renderman.pixar.com/view/brickmapgprim

Examples In Software:
Advantages:
Disadvantages:
11.1.7) Algorithm

The pattern is not stored at all, but is generated at rendertime by evaluating an algorithm at a point in space. Frequently this is true for procedural patterns.



Examples In Software:
Advantages:
Disadvantages:
11.2) Texture Baking

Texture Baking is the process of converting the storage type from one type to another.



Baking Examples: Here's a lesson on Texture Baking...
Examples In Software:
12) Pattern Creation

So now that you've looked at the different ways to place your patterns, and how to store them, you need to decide a method to create these patterns. The 3 main ways are...
12.1) Procedurals

Algorithmically defined patterns. Great for General Patterns.



Here's a few lessons on procedurals...
Examples In Software:
Advantages:
Disadvantages: 12.2) Hand Painting

Using brushes and filters in a piece of paint software and create a digital pattern. Can be used to make General or Specific Patterns.


Here's a few lessons on painting textures...

Examples In Software:

Advantages:
Disadvantages:
12.3) Photo Manipulation

Taking photos and editing them to get the result you want. Many times combined with Hand Painting. Source photos should be preferably taken on cloudy day so you get pure flat color without lighting information. Can be used to make General or Specific Patterns.


Here's a few lessons on photo manipulation...

Examples In Software:
Advantages:
Disadvantages:
13) Layering
Now we combine the shaders and patterns to create your final result.



Three methods:
Here's a lesson on layering...
Examples In Software:
14) Lighting Rigs

To see the results of your material, I highly recommend you creating a standardized lighting rig to view all your models in.



A lighting rig should ideally…
Having all 4 things 100% is almost impossible, so you do the best you can to make a compromise lighting rig.

Here's a lesson on creating a lighting rig...
15) Final Material

The final step is taking your layered material, testing it in your lighting rig, and now you have your final material.

Conclusion

Personally I use a lot of different methods to shade my objects. I always try and use whatever is easiest for a particular situation. My most commonly used techniques are...

Hard Surface Models:
Organic Models:
So hopefully this gives you a little more information on not only how to go about shading an object, but also the different methods you can use and what are their advantages and disadvantages of each technique. Now time to decide on your own favorite pipelines!


This site is ©2024 by Neil Blevins, All rights are reserved.
NeilBlevins.com TwitterMastodonBlueskyInstagramCaraBloggerFacebookLinkedIn ArtStationKickstarterGumroadYouTubeIMDB