Microdisplacement for Grass in Blender

a tutorial on Medium because where else should I put it these days

free stock photo from Pexels

Grass is often the bane of 3D scenes: it spans the range from a flat plane with a diffuse texture slapped onto it to particle systems rendering tens of thousands of blades, stems and weeds to create this entire ecosystem and crank rendering times through the roof.

Vray has enjoyed microdisplacement for a long time now so this grass technique isn’t super new, but I thought it was worth the tutorial for Blender since tessellation is a relatively new feature for Cycles (and sure beats the old method of crazy subdividing everything at a geometry level).

Here’s my baseline test render. We’ve got our “building” and a “sidewalk” and a strip of grass that goes around the corner. This particular (heh) render is Andrew Price’s Grass Essentials pack, which I really do endorse and love for hero shots of grass like this:

But in the context of a building like the above, it’s pretty inefficient. That’s a 7:40 render time just for what might be a really minor detail in the end of a scene that’s mostly building with large parking lot.

So the real goal is:

First try with displacement was okay but not great.

The encouraging part was that we got render times down. 1:58 which is nearly 1/4 of the time as before. Awesome!

I set up a separate testbed so I could play with dicing rate by itself.

Dicing rate difference between 1.0 and 2.0 is 80% less VRAM usage and 26% faster rendering, but the difference between 2.0 and 3.0 was only 20% less VRAM (than 2.0), and a scant 5% improvement on render times, so clearly there was some diminishing returns to uglier dicing rates getting fast results.

I suspected from this point there’d be a sweet spot somewhere in 1.5 to 2.5 and as it turns out, my final grass for the building render was 1.8

At this point we’re still using the diffuse shader with an image texture and the spikes look solid and spiky.

This is the hair shader which smooths out a lot of the lumpiness in the main body of the grass and yet continues to give us the nice silhouette we’re after.

Render time goes up to 2:12 but still a huge reduction from 7:40 and the 14 seconds really does look much nicer. It’s worth it.

…and finally, we can texture that back with an image or procedurally to give it some more random-feeling variation. I didn’t run the texture straight, you’ll see an RGB mix in the nodes — grass, while random, is shockingly uniform. You don’t need much to give it the effect and so grass textures intended for use as plain diffuse materials are often too random feeling.

Final render time is 2:15 which is awesome compared to 7:40.

A few notes here:

I think that’s pretty much it. The other good news is if you append it into different scenes you don’t also need to worry about particle groups and multiple materials and everything. It’s pretty much plug and play.

The downside is that you won’t get any fancy weeds or weight painting for density or anything but for my purposes I just wanted little rectangles of lawn to put in front of buildings. They’re almost always thin and flat and the bare minimum to be considered ‘green space’ in marketing materials. As such, you don’t want to render them with weeds anyway, though it’s more realistic.

If you really wanted, you could use Grass Essentials in conjunction with this method to intersperse real geometry bushes and weeds and stuff with faster, fake grass.

Industrial designepreneur. Working on a degree in curiosity. Always walking jay and crackin' wise