Blog

Visualizing Plants: Grass

2014-05-16

This article shows how to create grass using a particle system.

The scene consists of the following key objects: ground which is the particle emitter (ground), a set of 5 grass types (grass_1-5), and a big boulder (stone), which serves as a source of shadow. The additional objects are: empty object to focus the camera on (Empty) and a wind source (Field).

Lets start building the scene with creating the grass billboards. The billboards will not be flat but slightly bent to imitate volume.

To the billboards we will assign a material which contains the grass texture with a transparency mask. This grass texture (diffuse + alpha) is shown below. Mind that a special non-contrast background is placed around the grass particles. This is done to avoid mipmapping artefacts which show at low resolution if the background is contrast (black or white).

Nodes for grass material:

Transparency settings:

The next step is to scatter the grass over the glade. Here we use a low-detailed disk. Lets use a special texture to smooth the transition between the grass and the ground.

Nodes for grass base material:

Now lets plant the grass. To scatter the grass we use a randomly spread group of objects. The spreading region is limited by the grass_1 vertex group.

Check Billboard and select Random rotation in the Render panel. Wind bending buttons in the inheritance panel let us choose which object will be the source of settings for the wind bending. Parent and Instance options are available. We need Instance because this is the one the settings will be taken from.

The grass can be tinted with the mesh's vertex color. In this case we'll tint the mesh with approximately the same color as the ground. This way we achieve a grass color diversity and at the same time the grass and the ground are blended together.

Color baking parameters:

We set the wind bending parameters on the grass group objects. We can set the deviation angle and the frequency. A wind source is required for this effect to work.

Link to the interactive scene

Link to the source blend file

Changelog

[2014-05-16] Initial release.

[2014-07-07] The second vertex group for grass distribution has been removed because it had little effect on the final result.

[2015-09-10] Screenshots and text updated because of new interface.