Page Information

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The tutorial is broken up into the following chapters:

 

Creating the Grass

...

Bending the Grass

...

Randomly Changing the Grass Color with an Expression

...

Changing the Length with an Expression


A Maya scene can be downloaded here.

...

Anchor
Creating the Grass
Creating the Grass

Creating the Grass

  • Create a polygon plane with 20 subdivisions in both Height and Width. This will enable us to sculpt it into the plane to form a varied base for our grass. Scale the plane up to around 10 in X and Z.

...

Center

 

A plane with XGen grass splines (cube with a ramp has been placed under the plane).

Anchor
Bending the Grass
Bending the Grass

Bending the Grass

Rather than bending the grass uniformly in one direction, we can use expressions to bend the grass in random directions. Bend U and V control how much the spline is bent at the corresponding CV. 0 is no bend, and 1.0 is a 90-degree bend.

...

Anchor
Randomly Changing the Grass Color with an Expression
Randomly Changing the Grass Color with an Expression

Randomly Changing the Grass Color with an Expression

We can use an expression with XGen along with the Ai UserData Color node to randomly change the hue of the grass.

...

  • Render the scene. You should see that the green Hue shading of the grass is now random.
Center

 

Changing the Length with an Expression

Now we can also randomly change the length of the grass using an Expression.

...