Grass is everywhere. In CG, it is also commonly overlooked. A simple texture does the trick - does it?

Update: HDA's and scene are now here:
https://github.com/woelper/houdini-lab/tree/master/grass

I'll document doodling around with grass here. A good read about it can be found on this blender-related page (Did I mention that I love blender) http://www.blenderguru.com/product/grass-essentials/

There are some very valid points here. Basically it is just saying that you need more and sophisticated geometry instead than just using hair strands.

So let's do it! I start with a curve sop, 15 centimeters in length. I use a sine function in a point SOP to make it look grassy. sin($MAPU*400)*0.002 in tx looks fresh enough. Further, I add a RGB ramp parameter called gradient and a color attribute in the point SOP. Then, as R value chramp("gradient",1-$MAPU,0),as B value chramp("gradient",1-$MAPU,1) and chramp("gradient",1-$MAPU,2) as G (0,1,2 are the components).

Just wow. Almost there. Now the width attribute. An attribcreate SOP later with width set to (1.1-$MAPU)*0.002 we end up with a render like this:

So, let's stamp that one:

Seriously, this would normally be (and has been in the past) a point where I would despair and scramble for something "better", like an "established" workflow and program and some fancy tutorial explaining "just what I want". Man, this looks like dog poo-poo. Let's stamp in the copy SOP and add a skylight:

Man, that's better. Looks hairy though, but it's only a single strand without a material.

The great thing about houdini is: At some point you'll realize that everything will work out - you just have not realized how.

The copy SOP randomized scale and rotation. but we can do better:

Subtle. Increased height variance, color (value) randomness.


Increased width and created a point VOP to introduce randomness.


Strands added.

Guess what: It's about the content. Some leaves and larger grass strands later:

Note how easlily the eye spots repetitions, such as the white seeds on the long weeds. Somehow, when feeding multiple sops in a stamped switch, those do not seem to be properly picking up the randomized seeds.

Further, hue variation in vex is cool and easily done:


That's what we have now. A bit of hue variation and a bit of SSS on the strands. Also, a slight color shift towards reality, taken from the pictures below.
On distribution:

  • On a square meter, there are several species competing for resources - I would guess about 5 to 10 in a meadow.
  • Some plants are rarer than others.
  • Due to their often localized reproduction strategies, plants cluster together by type.
  • Among other things, competition for coverage (as in who gets the most sunlight) ist the main visual distincion.
  • Only your neighbor's lawn exhibits regularity.


Some of the above applied. You'll notice three things:

  • The growth is now broken up by a noise function
  • The water mark is gone and the resolution went up, I bought Houdini Indie for my Laptop, too :)
  • The lighting is more dramatic to prepare for the shading step

What you can't see:

  • The distribution is now done via OTL (will share all of that later), it takes any number of plant species as groups. These may have a count attribute to declare how often they should grow, as well as a cohesion attribute. The higher the value, the more the plant will grow in clumps.
  • The individual plants have been moved into OTLs.


Dandelions have been added.


Dandelions come in two flavors now.


Grass without cohesions, other stuff with.
Next up should be correct height scale and height maps. Had the idea to use the cohesion map as height map (multiplier) as an option or when off.

Now lit with just one HDR, grass colors picked from the image.

I found out that just randomizing the rotation looks rather ... random. Instead, weather and wind also create localized effects, as combing and clumping in fur simulation.

An initial test with distorted normals:

Before:

After:

The effect is not quite apparent, since the rotation itself is too random. Also the noise function was shitty.

Now this looks cool:

Result, with less random rotation:

It immediately looks more furry; on the other hand you notice effects present in meadows: Rain and wind has pressed on the grass, forming structures like in this picture.

The cheap magic happens in a point VOP:

Antialiased 3d noise is split into components and than added to x and z normal components.


In the image above, other plants have been added back, as well as the growth heightmap. Getting better.


The dandelions still suck.


Clumping refinement


Tests: Clumps


Tests: Dune-like grass

On Shading:


Grass does have specular. It appears largely anisotropic due to the way it grows - it has very fine grooves in the growth direction, broadening the otherwise sharp highlight. This - as in the picture I took - may be broken by larger grooves, contributing to the typical grass appearance.

Images have been white balanced like this