EASY MOSS
The easiest way to make moss!
Introduction
Easy Moss is the fastest way to add moss to your game world objects. Natural looking moss is more than just “green snow”. While moss does grow thicker on the surface of objects, it also concentrates in the cracks and crevasses of objects. The Easy Moss shader determines the most natural looking places to grow moss rather than just on top.
Features
- No need to spend time creating moss specific versions of existing textures. Just choose a moss texture and choose the options to let it “grow” over existing textures.
- Many options that allow you to control on how the moss will grow, with more to come.
- Shader created in Shader Graph. Edit it to fit your project’s needs.
- All custom HLSL source included!
- The growth direction of the moss can be chosen, so moss can be set to grow from the ceiling instead of the ground.
Shader Properties
The following is an explication of what all of the shader properties do.
Surface Inputs
These are your standard material properties for URP. If you want to get to the moss properties keep scrolling to the next section.
Base Map
The base texture.
Base Color
The base color represents the color of the unshaded area of object.
Tiling (XY)
Tiling is how often the base map should be repeated across the object.
Emission Color
The color of the object’s emission. If there is no Emission Map then the entire object will emit light.
Emission Map
A texture that tells the shader which parts of the object’s texture should emit light.
Occlusion
Computers how much of the ambient light this object reflects.
Specular
Controls Specular reflections.
Smoothness
Controls the smoothness levels of the material. Higher smoothness allows for reflections.
Enable Shadows
Disables or enables shadows.
Moss
These are the properties that determine how the moss is to be drawn. There are three ways moss is added to the objects. This first is by using the values in the normal Texture to determine where to draw moss, where deeper sections in the normal texture will have more moss. The second is based on a direction, where by default moss is more likely to grow on the top of the object. The last is via a noise texture that can diversify the look of the moss across multiple objects.
Moss Basic Settings
This section defines how the moss that will be placed looks like. It sets up the texture that is to be drawn on the object.
Moss Enabled
This determines if the Moss Rendering for normal and direction settings is enabled or not. This is independent from the setting that disables or enables the noise. If this is disabled, but the noise is enabled, then only the results of the noise rendering will be shown.
Moss Texture
This is the texture that is used for the moss.
Moss Texture Tiling
This determines how often the moss texture specified above is repeated on the object.
Moss Added Colour
Like Base Color in the Surface Inputs, this modifies the Moss Texture to mix in a selected color. Leaving it as white will use the color from the Moss Texture.
Moss Normal Settings
The normal texture contains information about surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry. Moss tends to grow in these grooves, cracks, and
crevices in a natural environment. At the moment there is only one setting that determines the strength of the moss grown in the normals.
Moss Normal Strength
This is the setting that determines how much the Normal texture is involved in moss growth. Depending on your normal texture, results can vary based on the settings. A setting of 0.5 might fill one object with moss completely if the normal is shallow, while on others it will not start to grow moss until 0.8. Play with this value to get the desired result.
Low value |
Medium value |
High value |
|
|
|
Moss Direction Settings
The properties Moss Direction and Moss Direction Strength work in tandem to decide which direction the moss
prefers to grow, and how strong that tendency is. By default, the moss is set to grow on the top of the object, which is represented by vector3(0, -1, 0), or down.
Moss Direction
This is the direction the moss prefers to grow on. This can be set to any vector3. The direction is in world space. Now matter how this object is rotated, the moss will always grow in the direction indicated. Think of this setting as the
direction of light shining on the object, where the light shines the moss is more likely to grow. To make moss prefer to grow on the bottom of the object, the Y value would be flipped.
0 Degrees |
110 Degree rotation |
|
|
Moss Direction Strength
This defines how much moss is to be applied in the direction specified in Moss Direction.
Low value |
Medium value |
High value |
|
|
|
The properties of Moss Normal Strength, Moss Direction, and Moss Direction Strength work together. When both the direction and normal properties are in use the value that would create the most per pixel moss is used.
In the example below this is a mix of the medium direction and a medium normal.
Noise
One of the issues Easy Moss aimed to solve was making the moss on each object look different to avoid the player seeing repeat texture patterns. This is a wall made from six wall segments. When the moss is applied without noise a repeating pattern can be seen. Adding some noise will break up the pattern. The noise will change based on the
location of the object.
Without noise |
With noise |
|
|
Noise Enabled
Is the noise texture enabled or disabled. If disabled then no noise will be drawn on the object. If noise is enabled but Moss is disabled, then only the noise will be drawn on the object. In the following examples only, the noise has been enabled.
Noise Texture
This texture determines the pattern being used when drawing the noise. There is a collection of noise patterns in the Textures Folder, or any black and white image can be used.
Invert Noise Texture
If this is set to true then the noise texture selected will be used inverted.
Noise strength
How strong the noise texture shows on the object. The higher the value, the more of the moss noise texture pattern will appear on the object.
0.25 |
0.5 |
1 |
|
|
|
Noise contrast
This value will determine how the noise texture is distributed. When this is set to 0 all of the places the noise appears will be 50% transparent. At a value of 1 any place where the moss texture would display more than 50% will be at
100%, and all others will be at 0%. The noise strength is calculated before the contrast is. The examples below are at a Noise Strength of 0.5.
0.5 |
0.5 |
1 |
|
|
|
Noise Lower Cutoff
Noise is calculated in each pixel by a value of 0 to 1. Larger values produce a stronger level of moss. This cutoff value is a threshold where below this value, no moss is to be created for the noise texture. This value is to reduce the size of a noise texture on the object. The below examples have been done with a contrast of 0.6 and a strength of 0.5.
Such as with the normal texture, the values used and the result they give is heavily dependent on the noise texture being used.
Low value |
Medium Value |
High value |
|
|
|
Noise Tile
This value determines how much of the noise texture is repeated in a 0.2x0.2-meter area. Since the goal is to avoid repeating textures smaller values should be used to render the texture over several objects. However, not too small to avoid large splotches. Try several values with each noise texture to find one that fits the scene. 0.02 to 0.1 tends to provide optimal results for most noise textures. However, this might not work depending on the texture. Use whatever value works best for the scene being created.
0.25 |
0.05 |
0.01 |
|
|
|
Future Plans
Separate Texture for the Noise.
I want the ability to add another texture that will be used for the Noise that is separate from the moss texture.
Normal texture for the moss.
I'd like an option for a separate normal texture that is used for the moss instead of overlaying the base normal.