top of page

There is a template scene for terrain environment in the asset package (both built-in and URP) located here:

SnowDoc33.jpg

If you want to create your own terrain and implement the snow shader here's the important steps to follow:

1. Setup the terrain

SnowDoc34.jpg

Create a new terrain with a 100x100 dimension (works best out of the box rather than the HUGE 1000x1000 default terrain)

Then add the "SnowTerrain01" material or its URP equivalent or your own Snow & Ice material

SnowDoc35.jpg

IMPORTANT: You need to add the "BF_SnowTerrain" script to your terrain for it to work properly and if you're only using the terrain feature of the snow shader without regards for other terrain assets compatibility you are not required to add a "terrainToCopy" parameter nor should you press the "Sync terrain Data" button

VERY IMPORTANT: Be extra careful with these fields, if you assign or press the sync terrain button on a terrain you do not want to change its previous height map it will override and change it, you can press the revert button to set the values back to how they were.

After you've set the right shader/material to your terrain get over the paint terrain tool in the terrain inspector:

2. Edit terrain layers

SnowDoc36.jpg

To draw snow on the terrain use the SnowLayer01, the position in the terrain layers arrangement is very important, the first one SHOULD ALWAYS be the snow layer.

To draw ice on the terrain use the other SnowLayer (02,03), if you don't want/need other snow/ice layers you can delete them via the "Edit Terrain Layers" button (Currently limited to 4 layers).

If you want to edit the layers to have a new snow/ice layer you should head over to the corresponding "NewLayerXX" in the asset project:

SnowDoc37.jpg

The first layer which should ALWAYS be a snow layer;

If you want to have a Snow Layer:

Diffuse is the Albedo Texture,

Normal Map is the bump map,

Normal Scale is the normal multiplier,

Mask Map is the displacement map,

Specular is the overall color of the snow,

Metalic should be set to 0,

Size.XY is the Tiling size

If you want to have an Ice Layer:

Diffuse is the Albedo Texture,

Normal Map is the bump map,

Normal Scale is the normal multiplier,

Mask Map is the parallax ice texture,

Specular is the overall color of the ice,

Metalic should be set to 1,

Size.XY is the Tiling size

The only difference between a Snow Layer and an Ice Layer are Mask Map and Metallic slider.

STOP there if you don't use any other terrain assets and are not looking for cross-compatibility!

3. Terrain Asset compatibility (optional)

I implemented a solution for users to use my snow shader with any other terrain assets out there.

Here is what you need to do in order to get it working:

SnowDoc38.jpg

Let's assume you have a working terrain working with another terrain asset (it must be using the built-in terrain as a base)

SnowDoc39.jpg

Setup the snow terrain just like described in the steps before, add the snow terrain material and the BF_SnowTerrain.cs script.

SnowDoc35.jpg

In the BF_SnowTerrain component; drag and drop the other asset terrain in the "TerrainToCopy" field.

Then press the Sync Terrain Data button to sync the dimensions and height texture.

(I strongly recommend you to lower the tessellation count on the snow terrain material, you don't need as much precision for snow on a terrain)

SnowDoc40.jpg

The first layer should be a snow layer with metallic set to 0 just like the regular setup. And the second layer has to be an ice layer with metallic set to 1, use this layer to remove snow of the first layer.

SnowDoc42.jpg

Now you should be able to draw snow with the snow layers and cull the snow to show the other terrain asset with the second layer of ice! You can add snow layers to this process for more snow variety.

Please keep in mind that these steps are only necessary when you want to use my snow shader terrain feature with other terrain assets, you do not need to do this if you only use my shaders.

If you're having trouble setting up a terrain with the snow shader here's a step-by-step video to complement the informations above:

bottom of page