grass_base
A grass_base material is used to create realistic animated grass, plants and flowers. It is applied to ObjectGrass objects.
States
Passes
- Auxiliary - auxiliary pass.
Auxiliary pass
All lights influencing opaque objects are computed by means of deferred shading (and a forward shading for transparent objects only). The only rendering pass that can come separetely from deferred is Auxiliary that is used for writing the contour of object with the specified material into an auxiliary color buffer. Detail information on the pass can be found here.
To enable the pass, check the Auxiliary option as Default in the Passes field of the States tab.
Options
- Shape - grass geometry.
- Animation - procedural animation.
- Spacer interaction - enables interaction with the WorldSpacer node.
- Color noise - spatial color noise based on a 2D texture.
- Light map - enables lightmap.
- Shadow Shafts - simulates volumetric shadows.
- Occlusion - activates occlusion.
- Emission - emission and post processing glow.
Shape
Shape specifies the way to render the grass geometry:
- Default - grass quads are rendered as a plain geometry and are turned randomly.
- Billboard - grass quads are rendered as billboards and always face the camera.
Default shape.
|
Billboard shape.
|
Animation
Animation option enables animation for objects (e.g. for plants swinging in the wind). Available modes:
- Skip - animation is disabled.
- Default - standard animation is enabled.
- Field - standard animation is enabled. Besides, objects are also influenced by the Field Animation node.
Spacer interaction
Spacer interaction enables interaction with the Field Spacer node.
Color noise
Color noise activates a spatial color noise texture, so the objects will be colored differently according to it.
Color noise disabled.
|
Color noise enabled.
|
Light Map
Light map activates an additional light map texture therefore specifying that the material will be rendered lit by it. Color is multiplied by the light map and the ambient color.
Shadow Shafts
Shadow shafts simulates visible volumetric shadows, arising when a bright world light source is partially obscured by grass.
Occlusion
Occlusion enables the occlusion that sets shading arising from the ground to the top of the grass blade.
Emission
Emission activates an additional emission texture. It is used to simulates glow from extremely bright surfaces, therefore imitating real light sources and highlights.
Textures
Base
Diffuse
Diffuse texture defines the grass shape and color. The texture should contain:
- 4 grass slots in a row.
- N number of rows (specified in Num textures field).
Basically, 4 columns represent different types of grass. Each column contains N variants of the same grass (thiner, thicker, tangled etc.) These four columns are masked separately.
Samples of grass diffuse textures |
The texture is 4-channeled:
- RGB values store grass color information.
- An alpha (A) value stores transparency values and specifies how the grass will fade at the distance.
Auxiliary
Auxiliary texture is used to render it in auxiliary buffer.
Additional
- Spatial Noise - spatial noise texture.
- Lightmap - light map texture.
- Emission - emission texture.
Spatial Noise
Spatial noise texture is used to color the grass that has the gray diffuse texture or to add irregularity to the grass that has the colored diffuse texture.
It will cover the whole terrain and allows you to color grass differently in all locations.
This texture is generated based on the terrain's diffuse texture colors.
- Dimensions of the texture should be equal to some power of two (for example, 1024 × 1024, 2048 × 2048 and so on).
- Dimensions of the texture should be proportional to the terrain size. For example, if you have the 4096 × 4096 terrain, the texture should not be 256 × 512.
- Dimensions of the texture should be chosen so that to get the result of appropriate quality after mapping pixels to the terrain. For example, if you have the 4096 × 4096 terrain and the 1024 × 1024 texture, 1 pixel of this texture will be mapped to cover 4 units of the terrain. If such quality is enough, you can use this texture. Otherwise, you should create a new one of an appropriate size.
Lightmap
Lightmap - light map texture storing pre-computed light information.
Emission
Emission - emission map texture. Emission map stores information about the light emission. It is blended additively over a texture, so areas which do not glow at all should be pure black on the glow map, and any brighter colors will appear to be emitting light.
Parameters
Parameters available for the material. All of the parameters have set default values, which can be replaced by your own ones. Availability of some parameters depends on the set States field values.
Material Editor, Parameters tab. |
Animation Parameters
Animation parameters:
- Stem noise - spatial noise scale.
- Stem offset - animation offset amplitude height scale.
- Stem radius - animation rotation amplitude scale.
- Stem scale - animation time scale.
Shading Parameters
- Diffuse - diffuse texture scale.
- Fibers - a coefficient to scale the intensity of the fiber.
- Translucent - translucence level of the material.
- Decal mask - decal mask.
Diffuse
Diffuse texture color. A color picker to choose the color of the diffuse map. Diffuse defines the base color of the surface.
Fibers
Fibers parameter creates an effect of napped surface. Fibers is a coefficient to scale the intensity of the fiber. The higher the value, the higher the fiber effect is.
Translucent
A coefficient to scale a translucency level of the material. The higher the value, the more translucent the material is. Back is a scale of the translucency effect, which permits light to pass through the object, but diffuses it so objects on the opposite side are not clearly visible.
Decal Mask
Decal mask parameter specifies decal bit-mask. If the decal mask of the decal material matches the surface material, the decal will be projected.
Base
Base material parameters:
Slope
A coefficient to scale the inclination of grass blades. By the neutral value of 0.5 the blades are not inclined at all and oriented upwards. Modifying the value leads to changing of the grass angle of inclination.
Slope value = 0 |
Slope value = 10 |
Alpha
A coefficient to scale grass diffuse texture alpha channel. The higher the value, the bigger areas of a texture are rendered.
Alpha value = 0.1 |
Alpha value = 1.0 |
Noise
- Transform - spatial noise texture coordinates transformation.
- Scale - spatial noise texture color transformation.
Emission
Auxiliary
Auxiliary rendering pass parameters:
- Color - auxiliary rendering pass constant color.
Lightmap
- Scale - lightmap texture scale.
Occlusion scale
Occlusion scale parameter specifies scale of the occlusion.