Most websites that offer PBR textures do not include cavity textures. But what if you want to use them? Where can you get them? In this tutorial, we’ll explore how to create cavity maps in Photoshop. You can also use GIMP as a free alternative; the same principles apply there as well.
Your advertisement can be placed here for $200 permanently. Suggested resolutions: 1800x663 or 1400x1400. Contact us.
If you’re not interested in theory, you can skip this section (Section 1) and its subsections, but I highly recommend at least skimming through it. So, why would you want to use cavity textures in the first place?
Cavity textures are excellent for enhancing realism by adding subtle/micro-details to areas that would naturally have more shadow or dirt buildup. Like ambient occlusion (AO), cavity textures are grayscale maps, where darker areas indicate deeper cavities and lighter areas represent raised or flat surfaces. But wait — how is a cavity texture different from ambient occlusion?
I believe the points outlined here should make the differences clear. However, if you have any questions, feel free to contact me.
Curvature textures highlight the inward and outward curves of a model to simulate effects such as wear and tear, edge highlights, and dirt accumulation. The main difference between a curvature texture and a cavity texture is that curvature textures emphasize the overall shape of the geometry, showing where the surface curves outward or inward. This can be useful for simulating effects like edge wear or highlighting details at the edges. In contrast, cavity textures primarily focus on fine details within the surface, emphasizing small crevices, grooves, and indentations. However, cavity maps can also be used to enhance geometrical changes around the edges of a mesh.
Launch Photoshop, import your normal map texture, and create two new empty layers:
Name Layer 3 as ‘Red Channel’ and Layer 2 as ‘Green Channel’.
Then select your normal texture layer, and switch to ‘Channels’ mode. Click on the red channel, press ‘Ctrl + A’ to select everything, and ‘Ctrl + V’ to paste it into the respective layers we just renamed. Set the blending mode to ‘Overlay’:
Apply the ‘Emboss’ filter to the red channel layer:
Then apply the ‘Emboss’ filter to the green channel layer:
Merge the red and green channel layers:
Now, what we have here is a curvature texture. To adjust this texture and convert it into a cavity map, we can add a ‘Levels’ adjustment node and tweak it until the finer details become visible. The key point is that it should resemble an AO map while capturing the finer details we are aiming for.
And that’s it! If you enjoyed this tutorial and would like to see more text-based tutorials, you can support me on Patreon. In return, you’ll receive a bunch of goodies that you can use in your projects!