Modeling Rocks with Height Maps

This is a technique I use to quickly sculpt and texture various rock formations or even terrain patches for the level designer to use in world building. Since this workflow uses tiling textures it has the benefit of increased texel density versus a unique unwrap for texturing. It also means you are capable of scaling the tiling depending on the size of the rock in engine if you so choose.

Obtain Source Textures

Create or obtain a tiling rock texture with a heightmap.


Rough in the Shape

Now to your favorite modeling package. I will be using maya for this tutorial since it is what I know best for this specific workflow. Your preferred modeling package may have similiar functionality. Model a basic shape for a rock in quads (important for zbrush).


Hide Your UV Seams

Unwrap the model and hide the seams in a crevice. Having to deal with seams is a limitation of this workflow, since we simply cannot paint them out. However, we will discuss later how to deal with that.


Apply HeightMap Material

Create a displacement material and plug in your height map to the “Displacement” input.


Next create a blinn or anything other than a lambert if you wish to render a preview. Then middle mouse drag from the displacement material to your phong and choose “displacement” from the pop up menu. Now apply this material to your mesh.


To adjust the strength of the heightmap, go to the “Color balance” tab of the file input node and adjust the “alpha gain” parameter.


If you wish to preview your mesh you may do so by rendering with default settings and with any shader other than lambert applied to the model. You should see much more surface detail on your mesh. If you are getting inside out polys, you may need to turn down the displacement strength.


Transfer Height Detail to Mesh

Before we apply our displacement map, we will want to smooth the mesh a little, otherwise there may not be enough vertices to accurately displace. Do not subdivide the mesh any more than 4X otherwise maya may crash after displacing, depending on how much memory you have.


We will now tessellate our mesh by applying the height map as a displacement map.
Go to “Modify” > “Convert” > “Displacement to Polygons”.


You will now have a much denser mesh that should have quite a bit of surface detail. Playing with the “alpha gain” of your height map will yield different topological results.
Use “Mesh” > “Average Verts” to soften the geometry since the last procedure often introduces jaggies. This may not take care of all jaggies, but this will become a non issue later when we run projection in ZBrush.


Prepare Meshes for Detail Projection

Export the newly created model, import into Zbrush and sculpt/detail as needed.
Append the High poly tool with the Low poly mesh. Subdivide the low poly mesh until it is within your preferred final poly count.


Project Details

Under “Projection”, turn “PA Blur” down to 1 or 0. Also change “Scan Distance” to 1.


Hit “Project All”, this will transfer details from the High poly mesh to the unwrapped Low poly mesh.
Export the Low poly mesh.


Finishing Touches

You may now bring the model into Maya or whatever UV editing program for UV adjustement or second UV channel creation.



Hiding UV Seams


There are several ways we can hide these pesky seams.
One solution would be to place other similiar rocks to intersect and cover up the seams and merge all these meshes together. Or group environmental objects around these seams.

However, if poly count is an issue, an alternative would be to use a second tiling texture and poly paint this over any seams. Something like moss or lichen would hide this well and add some personality and ground the rock into the surrounding environment.