Distressed Texture Processing Overview

06 Nov

The distressed texture processing system I developed is part of a three pronged attack meant to solve the challenge of differentiating many similar objects in a scene.  The goal was to create a system that was capable of taking a single set of standard textures, meshes, and UV’s, and make each one look unique.  This component of my answer to that issue was to create a network capable of applying a sun damage and/or wear and tear texture processing effect to the base input textures.  The other two parts create the functionality and organization capable of sending different signals to each object via switches and modulation lines, and a decal propagation system capable of randomly generating texture stacks for each object.  For this post however, I want to focus solely on the distressed texture processing effect and how it is made.

Firstly, I want to talk about the general organizational structure I used to wrangle the network into an easy to use system.  I used a series of nested asset containers to sub-divide the different functions into make-shift objects; think object-oriented programing.  I then created a series of null nodes spread throughout the network to hold all of my custom attributes for user input.  From there, I simply published the attributes on those null nodes to the single wrapper asset that encloses the whole network.  The network finally outputs the processed textures to another null node.  This output method allows the network to be used with any render engine or individual shader, since it simply takes the textures in one end, processes them to add the effects, then outputs them out the other end.

Here is the closed network, showing the consolidation of the network and its null node published attributes(very important since null nodes do not appear in the hypershade tabs by default):

Click to Enlarge

Here is a picture of the master asset open, holding only the upper level nodes(note these pictures are of an older build, so the final null output node is not shown):

Click to Enlarge

Next up is the overview of the dynamic sun damage system.  The idea was to emphasize the difference in position and rotation of these many objects by highlighting a single facing angle with sun damage.  The system uses a directional light’s transform to allow a user to point an arrow at a group of objects, and generates a rotational matrix from the transform.  That matrix is then converted into a vector originating along the negative Z axis.  The new vector is then projected onto the object’s vertex positions in object space (gotten from a sampler info node) using a vector dot product.  The resulting vector is then passed through a set range node in order to apply the user’s additional spread input and then used to drive the V value of a V ramp.  Ultimately, this process allows a user to project a directional light’s direction onto a dynamically controlled ramp radiating out from the light’s intersection center, but only effecting the object’s surfaces that face the light.  This ramp is projected in object space, so it is animation/transformation independent, and will move with the object instead of swimming across its surface.  This ramp is then simply used in the final texture processing step as a screen blend over the final color output from the rest of the network, and a reverse is used as a multiply against the processed reflection gloss value.  Thus, this effect is able to desaturate and lighten a surface’s color, and dull its reflection, in the area affected by the generated/projected sun damage ramp.

Here is a picture of the sun damage network:

Click to Enlarge

You can see some sample images from a separate demo in another post on my blog here:

Next, I want to go over the more important texture processor, the wear and tear network.  The purpose of the wear and tear was to provide a dynamic post-texture creation distressed effect.  The system uses a simple white for on, black for off, texture map to apply the effect; similar to bump maps.  The texture map simply provides a boundary for the effect however.  There are three user-input values that provide for the dynamic nature of the effect, with a final option to work in coated or non-coated modes.  First is the color processing amount which works the same in both modes, and lightens and desaturates the base texture’s color map in the affected area.  Next is the bump processing amount which also works in both modes, and smooths out the base bump or normal map in order to make it flatter.  Finally, there is the reflection processing amount that lightens the base reflection map and increases he glossiness in non-coated mode, or darkens the base reflection and decreases the glossiness.  This is an important step that gives the effect of wearing off a surface coat like varnished wood or a waxed car, or the wearing down of a solid material like eroded stone or rubbed tarnished metal.

Here is the top wear and tear asset:

Click to Enlarge

Here is the fully opened asset:

Hopefully this explains what this part of the whole texture processing system can do.  I will be making similar posts soon explaining the other two parts of the system since they are just as important (if not more so) in differentiating multiple similar objects.  I will leave this post with one last set of images showing the effects highlights on the duck demo scene I made to showcase the whole system, as well as the full open network for that scene:

-Individual Texture Processing Demo

Click to Enlarge

-Texture Processing Highlights.  Blue is wear and tear, red is sun damage, and purple is decals

Click to Enlarge

-Fully opened texture processing network for this scene

Click to Enlarge

You can see this scene animated, all three components of this system in action, and more in my shading demo reel here:

Leave a comment

Posted by on November 6, 2012 in Uncategorized


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: