---
title: "Procedural Ground Dirt"
canonical: "https://rmanwiki-27.pixar.com/space/RU/392265765/Procedural%20Ground%20Dirt"
format: markdown
---
![RenderMan_GroundDirt_Header.jpg](media://8ecb1044-1e3d-4f7f-941d-a1dfeba826e3)

Often, when a prop is left on the ground or a shelf or has a general buildup of directional grunge, the lower parts of the prop become dirtier than the top parts.

Imagine a fire hydrant that has been on a street corner for many years, a box left on the dirty floor, or, in this example, a display case that went on a messy shelf for a long time and has started to get dirtier on the bottom than on the top.

Of course, you can use Mari or Substance Painter to paint a dirt ground mask, but in this example, we want to look at how we can achieve this same look procedurally using RenderMan’s shading toolkit.

The advantage of doing this effect procedurally is that if we have a number of these trays scattered along a bench, on the floor, or on a display shelf, we don’t have to paint individual masks for each tray instance and get shading variation for each tray.

Let’s have a look at how this can be achieved in Blender. Of course, this effect can be equally achieved in other DCCs, but we’ll use Blender in this example.  

---

> ℹ️ <span style="color: #ffffff">**Goal**</span>

We aim to create a b/w gradient that starts at the bottom of the prop and travels upwards.  

We will then use this as a mask for layering in our dirt diffuse layer.

---

> ℹ️ <span style="color: #ffffff">**Steps**</span>

The shader has been simplified to demonstrate the effect by using a PxrConstant node, so we can easily preview the mask we are trying to create.

The key to achieving this effect lies in a few nodes.  The first is a PxrRamp, and the second uses a PxrManifold3D node.  

- If we attach a PxrRamp to the EmitColor of our PxrConstant, this is what we get.

![RenderMan_ProceduralGroundDirt_01.jpg](media://18f2c4ff-5fae-4c28-85ad-30b3ab886e69)

It’s not very useful or impressive at the moment, but wait… 

The next step is to create a PxrManifold3D node and connect it to the manifold input of the PxrRamp node we just created.  

- Next, in the PxrRamp node, change the Ramp Type to T Ramp.

![RenderMan_ProceduralGroundDirt_02.jpg](media://9af78387-19c2-48a8-bb5c-1ad8c2d1a1b1)

For the effect to be beneficial, we need to create a coordinate system in Blender so we can control the gradient's direction.

- Create an Empty-> Plain Axis
- Give the Plain Axis node a useful name, like GroundDirt
- Under RenderMan Geometry, turn on Export as CoordSys

![RenderMan_ProceduralGroundDirt_03.jpg](media://f1058cd0-6998-4798-afae-89d10c3828d4)

> ℹ️ Note : In Maya, a coordinate system can be created using a [3D Placement ](https://help.autodesk.com/view/MAYAUL/2025/ENU/?guid=GUID-DA87060A-A3D6-4AB7-A6A1-A70ED1A9B1BE)node

Once done, we need to tell the PxrManifold3D node that we want to use the Axis controller as our coordinate system.

- In the PxrManifold3D node under Coordinate System, enter the name of your newly created Axis Node. In this case, it’s called GroundDirt

Our gradient is now looking much more useful.

![RenderMan_ProceduralGroundDirt_04.jpg](media://d5b6282f-7f19-4754-9d59-ff612e34fd67)

We can control the effect by adjusting the ramp knots to set where we want the dirt to start and end on our prop.

![RenderMan_ProceduralGroundDirt_05.jpg](media://1dfab17c-0805-4fc9-97dc-6eaba7ea4278)

We can further refine the placement by moving the GroundDirt Axis up and down.

![GroundDirt_MoveAxis.mp4](media://53c0f5d4-449f-4776-9732-372fa245b2a2)

We now have a ground-dirt mask that is much more useful … but we can push it even further by breaking the ramp's smoothness with a dirt texture map.

![RenderMan_ProceduralGroundDirt_06.jpg](media://3da82b43-2d39-40ef-b0c9-4e8756f9d4b3)

There are a number of different ways we can use this texture map to breakup our ramp, but one such way is to use a PxrBlend node to blend the dirt spots texture above with our ground dirt ramp.

![RenderMan_ProceduralGroundDirt_07.jpg](media://f058c5ea-e670-494b-9fe0-8d08f98446cd)

As we are trying to be as procedural as possible, we want to use a PxrRoundCube & PxrMultiTexture setup to tri-planar our dirt spot texture onto our prop.  This approach allows us to randomly offset, rotate, and tile our dirt spots onto other instances.

- Using the PxrBlend node, we then blend the tri-planar dirt spot texture over our ground dirt ramp using a Multiply ink mode.  You can also play with different ink modes to give you different results.
- If we need the effect of the mask to be more pronounced, we can adjust the mask, again, in a number of ways, but in this example, we’ll use the PxrSplineMap node and curves to adjust the mask.

![RenderMan_ProceduralGroundDirt_08.jpg](media://af1a9a3f-136a-41eb-83a0-74d6da66b17c)

Nice!

Now, we can use this mask as a layer mix for a procedural Lama or PxrSurfaceLayer shading setup.  

Note, once we start to use this mask in our actual shader you might find you need to further adjust the brightness and contrast of the mask to dial in the look you are going for.

![RenderMan_ProceduralGroundDirt_09.jpg](media://45eab991-4188-450e-9789-582b93e78bff)

![RenderMan_GroundDirt_Header2.jpg](media://549737a2-ce2f-412c-9cb1-776d9b12ca91)

---

> ℹ️ <span style="color: #ffffff">**Further Practice**</span>

1. Try using other textures or a PxrFractal node to further break up the ground dirt gradient
2. Use a PxrDirt node to add crevice dirt into the mask (as the above setup demonstrates)
3. Use a PxrDirt node to remove crevice dirt from the interior of objects that wouldn’t always be affected by ground dirt.

---

![RenderManUniversity_logo.svg](media://48243b20-9fe2-48b0-b709-753ff84afafc)