Share

Texturing with procedural noise shaders

In this tutorial, we will explore how to use procedural shaders and noises in LookdevX to create natural weathering and aging effects for objects.

What is a procedural shader?

Textures are a fundamental part of creating realistic-looking objects in computer graphics. They are used to add color, roughness, and other properties to a surface.

When it comes to texturing, we generally distinguish between two commonly used methods:

  • Bitmap textures: Static image files that load from disk and mapped to a surface during the rendering process. Common formats include .png, .jpg, and .exr.
  • Procedural shaders: Unlike bitmap textures, procedural shaders compute on the fly during rendering. They don't have a file representation on disk or in memory.

You can use various methods to generate procedural effects, ranging from basic arithmetic and trigonometric operations to complex noise algorithms like Perlin and Worley.

Procedural shaders versus bitmap textures

Compared to bitmap textures, procedural shaders have some distinct advantages:

  • Randomness: Procedural shaders excel at producing randomness and natural variation that's tricky to capture with bitmap textures.
  • Resolution: Unlike bitmaps, procedural shaders aren't limited in resolution, meaning they can generate extremely detailed textures without increasing memory overhead.
  • Memory usage: Because shaders compute on the fly during rendering, they reduce memory requirements.
  • Scene information: Procedural shaders have access to information about the scene and the object being rendered, and can adapt their output accordingly. For example, a falloff shader can compute values based on the current sample point and its angle to the viewing camera.
  • Variations: It's straightforward to produce variations by adjusting the parameters of the shader.
  • UV layout-agnostic: Procedural shaders generally don't require a clean UV layout, which makes them ideal for sharing across different objects and scenes.
  • Reusability: The procedural graph can be stored in the document or even published, making it easy to share and adapt setups.

Reproducing natural aging effects

With the above advantages in mind, we can see that procedural shaders are particularly useful for effects that rely more on randomness and natural variation than on exact art-directed control:

  • Grime, weathering, and aging.
  • Natural terrain and terrain variations.
  • Fire and smoke.
  • Clouds and fog.
  • Many more.

Many effects in nature are the result of natural weathering processes over long periods of time: erosion, corrosion, oxidation, mold, dust, and many others. These usually occur slowly over many years and are the result of a variety of environmental factors such as wind, rain, and temperature fluctuations. Other effects, such as scratches, dents, or similar marks, are the result of more recent events such as usage, damage, or impact.

In both cases, these processes could be replicated using complex, time-consuming simulations, or they could be reproduced by artists painting detailed bitmap textures in a painstaking manual process.

Alternatively, we can use procedural shaders to reproduce these effects with relatively little time and effort. You can reproduce any complex natural phenomena with clever combinations of basic noise, some math, and a healthy dose of creativity.

Examples

In this tutorial, we will focus primarily on procedural noise shaders for texturing.

Procedural noises come in all sorts of flavors: Cloud-like, granular, organic, and more. Here are some examples of noises available in LookdevX via MaterialX:

Worley Noise Perlin Noise Fractal Noise Cell Noise

From left to right: Worley, Perlin, Fractal, Cell

Tutorial

For this tutorial, we will use a model of a baby Cthulhu by Noss. We will create the appearance of an aged wooden statue using only procedural shaders.

We will cover diffuse shading (the main texture of the model), roughness, and other effects such as scratches and dents (via bump mapping). To top it off, we will add some procedural dust to our statue.

Using noise to create a wood texture

The diffuse texture (also known as albedo) is the main texture of the model. It defines the overall color of the surface. For our wooden Cthulhu, we will create a simple wood texture using a combination of two procedural noise shaders:

Large vertical stripes

This low-frequency noise will define the wood's overall structure and vertical stripes. We pipe it through a mix node to produce the appearance of a base wood color and a secondary color variation. This goes into our material's base_color property.

Dots and stippling

We use a high-frequency noise to add detailed wood grain into the material's base_weight property.

Diffuse We produce a wood-like texture by combining two colorized procedural noise shaders.

As we're using procedural 3D noise, we don't need to consider the UV layout of our model: The noise computes in 3D space and gets mapped to the surface of the object.

1. Specular roughness

A material's specular roughness is a key factor in determining the properties and type of surface we're looking at: it indicates whether it's a shiny new, smooth object or a rough, aged, battered one that has withstood the test of time. We can use roughness to simulate smudges on an otherwise pristine surface and various other effects.

For our Cthulhu statue, we don't want to go overboard: the original statue may have been polished at some point, but over time it has become rougher and more weathered through use. So we will introduce a modest level of overall roughness with a bit of variation across the surface to simulate wear and tear.

Similar to what we did with the diffuse texture, we use a procedural noise shader to vary the roughness across the surface of the statue.

Specular Roughness Applying procedural noise in the specular roughness helps give the surface a more natural look.

2. Bump mapping for scratches and dents

Bump mapping is a technique that creates the illusion of depth and surface detail in a material by adding perturbations to the surface normal based on a texture. Unlike displacement mapping, which actually moves the object's geometry, bump mapping is a simple surface effect and is much faster to render and easier to set up.

We will apply bump mapping to create the appearance of random scratches, dents, and other marks on the surface of our statue.

However, we want to focus these weathering effects in specific areas of the statue that are more exposed or have sustained wear through use:

  • Thinner parts are more likely to have chipped or carved away over time
  • Edges and corners are more likely to have suffered from wear and tear from bumps and knocks

For this, we use another procedural utility—the Arnold Curvature shader. It's a powerful and flexible shader that can detect creases, edges, and other surface features. We use its output to mask the intensity of our bump-mapping noise, focusing the weathering effects in the desired areas.

Bump Mapping We use bump mapping to create the appearance of random scratches and dents in thinner parts, edges, and corners.

3. Finishing touches: Procedural dust

The final touch we will add to our statue is some procedural dust.

Dust is a common occurrence on aged objects. Over time, dust tends to accumulate in crevices and corners, but in particular on surfaces facing upwards.

We will use the material's Fuzz property to simulate the appearance of dust on our statue. To limit the dust to upward-facing surfaces, we use a dot product node to compute the surface direction and use this as a mask for our Fuzz property. Finally, the smoothstep node allows us to adjust the intensity of the dust to our liking.

Procedural Dust We use procedural shaders to limit the dust to upward-facing surfaces.

Conclusion

Final Result The final result is an aged wooden statue covered in dust using only procedural shaders.

In this tutorial, we explored the power of procedural shaders and noises in LookdevX to create realistic weathering and aging effects. By combining different types of noise patterns, we transformed a simple model into a convincing aged wooden statue with:

  • Procedural wood textures using vertical stripes and high-frequency grain patterns.
  • Varied surface roughness to simulate areas of both wear and polish.
  • Realistic surface details through bump mapping for scratches and dents.
  • Dust accumulation using the material's Fuzz property.

The key takeaway is that you can produce complex, natural-looking materials entirely through procedural techniques, eliminating the need for painted textures while providing infinite variation and easy artistic control.

These procedural approaches aren't only efficient but also highly flexible, allowing you to quickly iterate and adjust the aging effects to match your creative vision.

Was this information helpful?