/
Maxwell Grass

Maxwell Grass



Image courtesy of Marcin Jastrzebski



The Grass extension allows you to very easily and quickly create different types of grass. The extension is designed to offer you a great amount of randomization and  control with many of the parameters also being mappable. Moreover, you can apply several different grass generators to the same object, which allows you to mix the look of different types of grass. You can create grass in Maxwell Studio and also in almost all of the 3D applications that have a Maxwell Render plug-in: 

  • Sketchup 

  • 3DS Max 

  • Maya 

  • Cinema 4D  

  • Rhinoceros 3D 

  • ArchiCAD

  • form•Z

This extension consists of two different components: 

  • Grass Generator: Creates grass guide curves spread across the surface you choose, and controls their distribution, length, width, bend etc. 

  • Grass Primitive: three different analytic primitives to define the shape of the blade itself: straight flat segments, curved flat segments and cylindrical.



To quickly get you started, have a look at the Grass Examples page in the Knowledgebase section where you will find different examples of grass types and their settings, and also a couple of helpful textured grass materials ready to download and apply.



Image courtesy of Hervé Steff- Meindbender



Get a taste of the Grass feature



The Grass Primitives

The guide curves created and distributed by the Grass Generator have to be replaced by a renderable geometry in order to present an actual surface that can handle a material description and be renderable. This happens at the beginning of the render, when the guides in the MXS file are replaced by one of the following Grass Primitives, that define the shape of each blade of grass.

Flat

The Flat primitive renders a segmented flat strip, and the number of points define how many "segments" the rendered blade will have. The minimum number of points is 3. It's well suited for thin SSS materials since it's a single sided geometry. 

The main advantage of this type is that it renders faster than any of the other grass primitives. For example you can create grass that is very close to the camera using the Curved type and apply a second grass primitive to the object for blades that are farther away from the camera. You can control where these two types of grass grow by using a density map.

As this primitive is made of straight segments, the number of Points per Blade define the number of straight segments in each blade. You may determine the number of segments you need depending on how it looks from your camera view. The more segments, the smoother the blades will look, but you will also increase the demands of RAM needed to render your scene.

Flat primitive using 4 points per blade



Curve

The Curve primitive renders a smooth curved blade of grass that has infinite detail - no matter how close the camera gets to a blade you will not see any facets or breaks in the curve. Similar to the Flat primitive, it's well suited for thin SSS materials, and perfect for close-ups and areas near the camera. You can specify the number of points that define the curve. 3 points is the minimum, 4 is a good number even for blades that bend a lot.  

As this primitive is made of an analytic curved surface, it is smooth at each point, no matter how close you look at it. This means you don't need to increase the number of points too much to get a smooth blade. In general, using around 4-6 points per blade is enough to perfectly define the smooth shape, without using too much RAM during rendering. Many more points than this is not necessary for the Curve primitive and will only increase the RAM usage without adding anything to the look of the blade.



The Curve grass primitive is slower to render than the Flat primitive. For this reason, we suggest to always use the Flat primitive for the fastest renders and if the camera needs to be very close to the grass blades, use a separate smaller patch of grass that's close to the camera and use the Curve primitive for this patch.



Curve primitive using 4 points per blade



Cylinder

The Cylinder primitive renders each guide as a rounded cylinder, exactly the same primitive used by the MaxwellHair extension. It is well-suited for rounded grass, or even for generating fur and hair.  The cylindrical fibers have an actual thickness and volume, so they can handle transparent and volumetric subsurface scattering materials.

As this primitive is made of straight segments of a cone, the number of Points per Blade define the number of straight cone segments in each blade. You may determine the number of segments you need depending on how it looks from your camera view. The more segments, the smoother the cylindrical blades will look, but you will also increase the demands of RAM usage that is needed to render your scene.

Cylinder primitive using 16 points per blade



Applying Maxwell Grass to an object

Simply select a piece of geometry and apply the MaxwellGrass modifier to it. You can do this either by right-clicking on an object in the Object List panel and choosing Apply Object Modifier Extension>MaxwellGrass, or you can click the New button in the Modifiers section in the Object Parameters panel. You will see the MaxwellGrass modifier and its parameters in that object's Modifiers section. You can also click the little white dot to the left of the modifier to disable/enable it. You can click the Refresh button when you have scaled the grass geometry to update the viewport so it shows the grass blades generated from the new size of the object. You can apply more than one grass modifier to the same object and each extension will use its own settings.



If you apply more than one grass extension to the same object, make sure each one has a unique seed number, to avoid having the blades growing from the same location.



Several MaxwellGrass modifiers being applied on the same ground geometry (screenshot from Studio)



Two independent grass modifiers applied together to the same ground geometry (hidden here) to create a more natural look by generating a mix of two different grass species



Texturing grass

Similar to the MaxwellHair extension, the grass can use UV channels 0 and 1 to map a texture from the root to the tip of the blade (channel 0) and across the surface of the object (channel 1). Any Maxwell material can be applied to the grass, except of course glass and volumetric subsurface scattering materials, as these need a thickness in the geometry to render properly, and will only work with the Cylinder primitive.

Example 1 - Using a texture in the UV 0 channel (root to tip)

In the image below a texture using UV channel 0 was applied to the reflectance 0 of a BSDF.

Color variation using this gradient texture (right) as the root-to-tip map (channel 0).
The root-to-tip texture is read vertically (only the first column matters) 



Example 2 - Using a texture in the UV 1