Grass shader for DAZ Studio
Contents
Introduction
The AoA Grass Shader allows 3d grass to be easily applied to any surface. Many controls are available to adjust effects such as blade thickness, grass length,
colors and clumping.
The shader is almost entirely procedural so it can be used on any surface, even non-UV-mapped objects.
Because the shader actually creates grass geometry it can be used for scenes where texture based grass would not be suitable
due to insufficient closeup detail or noticeable texture tiling. Please note that this extra detail comes at a cost and may render more slowly than a standard,
texture-mapped surface.
Important Concepts
The grass is generated using mathematical formulas and displacement. The shader may be able to generate grass which is extremely fine and tends to look
better in large renders and when using fine shading rates (in the DS render settings) such as 0.5 to 0.1.
The shader can be used directly on any surface but, due to clumping, parts of the object may have small areas where little or no grass is seen.
This may cause some of the backdrop to be visible through thin spots in the grass.
A technique which corrects this issue and also adds realism, is to use a dirt colored shader on your terrain surface then create a geometry shell
of it and apply the grass shader to the geometry shell. This causes your terrain to have two layers, one for dirt and another just slightly above with the grass.
This way dirt will show anywhere there are thin spots in the grass just like real life.
This method can also be used along with a simple black and white map to create grass only in certain areas of an object. Simply load an item with dirt, cobblestones
or whatever you desire to show in areas where there is no grass, create a geometry shell then apply a grass preset to the shell. Now you can use a black and white texture
in the Displacement Mask channel. In areas where the map is white the grass will appear. In areas where the map the map is black, the grass will have no length
and the shell will displace downward below the original geometry where it should not be seen.
An opacity mask can also be used to achieve the same effect though the displacement method is preferred as it renders without the extra time needed to calculate transparency.
Because the displacement method generates no transparency it is a good candidate for using the fast rendering Primitive Hitmode feature of the AoA Advanced Lights.
Quick Start
The !Grass Shader Base preset can be found in the content tab under Shader Presets - Age of Armour - Grass.
Additional grass presets, created by Dimension Theory, are located in the subdirectory DT-Presets.
To apply grass to any object, select the object and any desired material zones then double click one of the presets.
If the grass looks very coarse or erratic you may find that using a finer Shading Rate (in the render settings) provides better results.
Most of the product shots were rendered at a shading rates between 0.5 and 0.1 (smaller numbers providing better results).
Quick Tips
General
- A PDF version of this guide should be available in your DAZ Studio "ReadMes" folder. Additionally, you can download this guide for offline viewing
by right clicking any blank area of this page and selecting Save Page As...
- As stated above, the grass shader generally works best when applied to a geometry shell which is slightly above a dirt colored surface.
- If using any of the AoA Advanced Lights, render times can be greatly improved by flagging the grass (and underlying dirt surface if any)
and using Hitmode - Primitive on the lights for these flagged surfaces. Because of the high variation in grass, you may often be able to use
a very low shadow sample count for grass surfaces too, further speeding up the rendering process.
- If you wish, you can achieve an even more complex looking lawn by creating a second geometry shell of your ground and applying a different grass preset
to each one. With some creative adjustments to clumping and grass lengths you can have a nice, fine bladed lawn covering along with other heavy clumps of
larger grass mixed throughout the terrain.
- Lowering the Minimum Displacement setting causes the grass to begin growing below the level of the surface's geometry. This can be used
to create patches of grass growing through an underlying surface as shown in the image above.
- The Translucency Color setting has a fairly strong influence on the overall color of the grass. If you are having difficulty getting exactly the
color you wish by adjusting the root and tip colors, try lowering the Translucency Strength or changing the Translucency Color.
Advanced Light Flags Group
The parameters of the Advanced Light Flags group contain settings for use with the AoA Advanced Lights.
The settings themselves do nothing to the appearance of the grass. They simply provide settings
which can facilitate flagging when used along with the Advanced Ambient, Distant and Spot lights.
See the AoA Advanced Lights user guides for more information on flagging.
- Accept Shadows - Determines whether or not the grass should receive shadows cast from itself an other items in the scene.
This setting works with most DAZ Studio lights, not only the AoA Advanced Lights.
- Ambient Strength Flag - Allows you to flag the grass for special shadow and light settings by matching this value
with the Diffuse, Ambient or IOR Value dial in the light's Lighting Control group then choosing Ambient Strength Value of...
from the Flag Surfaces With drop-down menu.
This parameter can also be used with the AoA Advanced Light's Set Light Strength with Surface Ambient Strength feature.
- Diffuse Strength Flag - Same as the Ambient Strength Flag but used with the lights Diffuse Strength Value of... setting.
- Index of Refraction Flag - Same as the Ambient and Diffuse Strength flags but used with the lights Index of Refraction Value of...
setting.
Keep in mind that the Light's flag value uses a percentage while the grass shader's Index of Refraction Flag parameter is a number value.
So to properly match a light setting of 99% the grass Index of Refraction Flag would need to be 0.99.
This was done for consistency with other DAZ Studio shaders.
Diffuse Group
The parameters of the Diffuse group set the base colors and color variation of the grass.
- Color Variation Frequency - Sets how quickly the grass will change from Color 1 and Color 2. This helps give a more believable
appearance to the grass than simply using a single color as real grass tends to have various lush and dry regions. The limits of this parameter may
be increased or turned off if you desire a higher level of variation.
- Root Color 1 - Sets the primary hue of the grass roots.
- Root Color 2 - Sets the secondary hue of the grass roots.
- Tip Color 1 - Primary color of the tips of the grass.
- Tip Color 2 - Secondary color of the tips of the grass.
Displacement Group
The settings of the Displacement group control, and allow for the masking of, the length of the grass.
In most cases, it is advisable that you use the Length setting in the Shape Group rather than any of the displacement settings.
However, the Minimum Displacement setting can be useful to lower the starting points of the grass to bring it below another surface
when using a Displacement Mask for trails or when you desire the grass to grow in patches as illustrated earlier in this guide.
- Displacement Mask - This allows a black and white mask to be loaded to determine where grass will grow on a surface or directly
control the length of the grass in certain areas.
Grass will be generated in areas on the map which are white. Grass will not grow in areas where
the map is painted black. Shades of grey can be used to lower the length of the grass in select areas.
Note that this parameter also has a strength slider. This should always be set to 100% unless you find a special, specific reason to adjust it.
- Maximum Displacement - Sets the overall outward length of the grass, however this parameter should not need to be changed from it's default
setting of 1.0. The Length setting in the Shaping Group should be used instead.
- Minimum Displacement - Controls how far down (or inward) the grass will begin to grow below the surface.
If you use a Displacement mask and parts of the grass surface are still visible in areas which you intended it to be masked out, you can use this setting
to move those areas further down. Take for instance the pathway render shown earlier in this guide. If I had patches of green still poking above the pathway
I would set Minimum Displacement to a lower value.
Opacity Group
The Opacity Group contains only one setting. Like the default DAZ Studio Shader this allows areas of the surface to be made invisible by
use of a transparency map.
While this has its uses, it is recommended that you use the geometry shell and displacement mask method outlined earlier as transmapped surfaces
tend to render more slowly.
- Opacity Strength - This allows a black and white mask to be loaded which determines what areas of the surface are visible. Black areas will
not appear in the render while white areas will be fully opaque. The value slider can be used to make the grass semi transparent should the need arise.
Shape Group
Here you will find parameters to adjust the length, shape randomization and the waving, or clumping, of the grass.
An important thing to keep in mind is that Clump Frequency, Clump Strength and Blade Thickness are somewhat tied together.
Adjusting one setting may require a bit of fine tuning to another.
Though not a rule by any means, in general, the higher the Clump Frequency the lower the Clump Strength should be. If both these settings are high
it may give th appearance of crab grass rather than "majestic waves of grain" though more leafy. When both these settings are high you may also want to
lower the Blade Thickness to make the grass look less leafy.
- Blade thickness - Adjusts the thickness of the individual blades of grass. Because the renderer cannot accurately process displacement
which is finer than the shading rate, when using a thin blade setting you may need to also use a finer shading rate (DS render setting).
- Clump Frequency - Clumping causes the blades of grass to grow at angles based on random waves. This setting
controls how frequently the directional waves undulate. Higher values produce more clumps.
- Length - Sets the maximum overall length of the grass. This value is roughly in centimeters.
- Length Variation Frequency - This is similar to the Color Variation Frequency pattern but rather than alternating the hue,
this setting creates undulation in the length of the blades of grass. Limits on this parameter may be safely increased or disabled should
more variation be needed.
- Length Variation Strength - Sets the overall amplitude of the length variation. At 100% the grass will vary from 0 length to the full
distance of the Length setting.
Smoothing Group
The two settings in the smoothing group are unlikely to be needed for surfaces with grass but are included in the event a special need arises.
At this time neither of these settings have any effect on subdivided geometry.
- Angle - Determines at what angle a geometry edge will be treated as a sharp crease. Any geometry with angles below this setting will
shaded as if they are smooth rather than the polygons looking faceted.
- Smooth - When on objects will be rendered as smooth surfaces according to the above Angle setting. When set to Off
all polygons and edges of the object will appear sharp and faceted.
Specular Group
Specular highlights can be useful to help accent the grass, giving it a wet, lush look.
Because specular is very dependant on viewing angle it can also be used to help define shapes like accentuating changes in rolling hills.
With that said, you may want to use specular sparingly or at a low strength, particularly in large or distant scenes. Glossy highlights on distant
grass can produce a speckled effect and less glossy highlights can sometimes appear waxy on large rolling hills.
- Glossiness - Adjusts the apparent shinieness of the grass by increasing or decreasing the size of specular highlights.
- Specular Color - Sets the hue of specular highlights.
- Specular Strength - Controls the overall strength of specular highlights.
Tiling Group
Tiling controls allow the repeating and shifting of images loaded into the Displacement Mask and Opacity Mask parameters.
All other aspects of the Grass Shader are completely procedural so are unaffected by tiling.
- Horizontal Offset - Allows the shifting of images horizontally across an object's UV coordinates.
- Horizontal Tiles - Causes displacement and opacity masks to repeat horizontally across a surface.
- Vertical Offset - Allows the shifting of images vertically across an object's UV coordinates.
- Vertical Tiles - Causes displacement and opacity masks to repeat vertically across a surface.
Translucency Group
Translucency is a important part of the AoA Grass Shader. It provides extra realism by allowing some light to shine through the blades of grass,
softening shadowed areas and giving rolling hills a velvety appearance.
Notice in the image above how the translucency not only brightens the grass but also gives visual ques which
better show the rolls between the near and far hills.
- Translucency Color - This is the color of light which will shine through the individual blades of grass.
Translucency can strongly affect the overall color of the grass. If you are having difficulty getting the diffuse colors of the grass to show,
using a less saturated Translucency Color or a lower Translucency Strength may help.
- Translucency Strength - A parameter to adjust the overall strength of the translucency effect.
UV Maps Group
- UV Set - Allows alternate UV mapping to be loaded on any DAZ content which contains additional UV sets.
Known Issues
Only on some SubD geometry - When tall grass is applied to a complex shape, such as Genesis with SubD applied,
it is possible that some sections of grass may appear to be clipped.
The grass shader was intended to be used on more appropriate objects like lawns and terrains, however, should grass be used on
complex objects such as a human figure, either turning off SubD for the object (Resolution Level - Base in the object's parameters tab)
or using a large Bucket Size (in the DS render settings) may help eliminate the error.
Top
Introduction
Important Concepts
Quick Start
Parameter Settings