grass

grass
0:00
/0:03


The procedural grass node connects to the .grass input on a mesh and is used to create surface scattered grass blades. Since the surface representation of each grass is calculated at render time the scene can save significant memory costs at the expense of some extra computation.

type="round" represents a tube with open ends. The surface appears continous when zoomed in and the blade made progressively thinner. This probably means the surface representation is adaptive per blade. Since Albert codes extremely complex stuff, I don't know if this is standard procedural triangle mesh creation or some space age path tracing algorithm.

When .type ="flat" the curve's control vertices probably are the same as for round but looks more like a rail sweep using linear interpolation. Using a grass blade texture with an alpha channel would obviously render faster than round.

0:00
/0:03

.mapping="area" each blade inherits a single color from the "ground" mesh
.mapping="blade" applies 0-1 UV mapping on the tube of the blade

grass grass:
  .baseRadius              = 0.075f;
  .bend                    = 1f;
  .densityMultiplier       = 1f;
  .density                 = 50000u;
  .lengthVariation         = 1f;
  .length                  = 6f;
  .maxBlades               = 100000000u;  
  
  .mapping                 = "area","blade";
  
 
  .material                = inputNode;

  .type                    = "round","flat";