Fantasy Adventure Environment Documentation

Fantasy Adventure Environment
Author: jonathan
Version: 1.3.1
Dated: 30 May 2017

Pigment map #

This script must be added to your terrain object. It generates a color map texture (pigment map) and heightmap (stored in the alpha channel) for the FAE/Grass shader (see shaders section). Which can be utilized in the material to tint the grass by the terrain’s color and have the height taper off where there is no grass texture painted.

Unfortunately only one texture is supported as a height source at the time. So if you have multiple textures on your terrain that represent grass, it’s best to set the dropdown to “None” and not use the height feature altogether.

This script is compatible with any third-party terrain shader, and will not impair their functionality.

This feature cannot be used when the terrain is using baked lightmaps or realtime GI since this will affect the render

Attaching this script to your terrain will load its pigment map on startup. So it’s possible to be used in multiple scenes. Do note that only one pigment map can be assigned to the grass shader at a time.

Once this map is generated, you can adjust the minimum and maximum grass height in any material using the FAE/Grass shader, as well as the pigment map’s influence on the material.

 

Multi-terrain setups
To render a pigment map from multiple terrain tiles, add the script to an empty GameObject (preferably the parent object of your terrain tiles). Please note this object must be active in a build, in order to load and assign the pigment map to the grass shader.

Once you’ve done this, a list will appear in the inspector, allowing you to add the terrain objects.

Mesh terrains
The script also works with mesh terrains. However, like Unity terrain’s, the size must be uniform, and the pivot point must be in the corner. If a mesh terrain fails to meet these requirements the pigment map will not line up accordingly.

When using a mesh terrain, option to flip or rotate the pigment map will be available, in case your mesh’s UV’s are set up differently.

Suggest edit
Last updated on July 2, 2019
0 of 0 users found this section helpful
Suggest Edit