---
title: "Procedural Edge Breakup"
canonical: "https://rmanwiki-27.pixar.com/space/RU/502759691/Procedural%20Edge%20Breakup"
format: markdown
---
Adding edge breakup to props is a common practice, often achieved by painting masks in texturing software like Adobe Painter or The Foundry’s Mari.  

At Pixar, however, we tend to take a procedural approach to edge breakup.  

This allows retaining creative control, such as quickly reacting to the director's notes without repainting and exporting edge masks, and creating shading variants on props, from a new-looking prop to various stages of wear and damage.

Below is a quick guide to procedural edge masks.


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

Let’s start by adding a PxrCurvature node with the default settings to our geometry.  In this example, we’re going to use the RenderMan University shield.  

As you can see from the first render, it’s not very impressive … but worry not, in a few simple steps we’ll vastly improve the look.

![ProceduralEdgeBreak_1.jpg](media://a02db951-19fc-4566-9151-76e1fdb8338f)


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

The next step is to adjust some of the default settings.

The first thing we want to do is make the curvature brighter, so increasing the Output Gain from 1 to 10 immediately produces a stronger signal.  

Increasing the number of samples from 4 to 8 (or 16) will reduce some of the grain in the curvature, but will slightly increase the render time.

![ProceduralEdgeBreak_2.jpg](media://9dac6a72-bc59-4274-bc8a-246b2f68ee4a)


Next, we'll load a map to start breaking up the curvature.  In this example, I’ve used grunge_04.tex from our Grunge Texture Vol 1 Pack, and mapped using a PxrRoundCube+PxrMultiTexture (Triplanar) approach.

To add a bit more contrast to the grunge map, a PxrThreshold node is used to achieve this effect.

![ProceduralEdgeBreak_3.jpg](media://c34d6be3-a181-4339-8f09-f7299a45d853)


Using a PxrBlend node, we can subtract the grunge map from the curvature by setting the mode to Subtract.

![ProceduralEdgeBreak_4.jpg](media://0cd9e3c5-8c58-493b-8fb7-9a19f0fb52e3)


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

Now we’re starting to get somewhere useful for use as a mask between two layers or to add bump/displacement to the edges of the shield.

The last step in this simple example is to increase the brightness of our result, and here we’re using a PxrSplineMap node. 

![ProceduralEdgeBreak_5.jpg](media://8239d83c-ec11-49e0-a8ee-4b5037daa5a9)

![ProceduralEdgeBreak_nodes.jpg](media://d59fe5a9-005a-4e1a-adb3-2cc482053f3f)


Great, now we have a mask that’s more useful for our purposes, but it’s worth noting that this example is just a straightforward approach.  


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

To increase the realism, you could try subtracting the curvature with multiple grunge maps, adding more detail, and breaking up your mask.

Below is an example where two grunge maps are layered over the curvature, using a PxrLayeredBlend node to handle the blending modes of the layered maps.

![ProceduralEdgeBreak_6.jpg](media://e4619d20-303e-4c52-a12e-ca8f61c48717)

![ProceduralEdgeBreak_nodes2.jpg](media://a39e65d7-b7fa-45f7-9a35-c3c5845348c2)