Fantasy Adventure Environment Documentation

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

Using the shaders with custom assets #

Should you like to use the FAE/Branch shader on a tree outside of this package it must conform to a requirement, namely the Ambient Occlusion (AO). Which must be baked into the mesh’s vertex colors. This is used for shading and animation purposes.

Certain information is required to be baked into a tree mesh’s vertex colors:

Red: Ambient Occlusion
Green: Wind influence
Blue: Thickness
Alpha: Stiffness

Note: As of version 1.2.1 the Blue and Alpha channel were swapped. If your custom tree uses the old layout, check the “Legacy vertex colors” checkbox. This is set to be removed in v1.3.0

Generally any software that can bake Ambient Occlusion into the RGB vertex color channels will suffice. Stiffness (Alpha channel) is less straight forward, since this represents a gradient from the base of the tree, to its tip. This information was calculated and baked using a proprietary tool, which will not be made available to end-users as it pertains source files and some third party source code.

For vegetation assets using the FAE/Foliage shader much of the same holds true. Where the AO information is used to determine which parts are not affected by wind or player interaction. As well as several other shading functions.  

SpeedTree

The tree shaders will also work with SpeedTree trees made using the Unity SpeedTree modeler.

To enable the wind animations check the “Sample SpeedTree wind” box on your branch and trunk material. The wind implementation is not the same as the SpeedTree shaders, so the animations you see in the modeler will not be the same, but similar.

Shaders used on the Standard Assets SpeedTree trees

 

Suggest edit
Last updated on October 17, 2018
1 of 1 users found this section helpful
Suggest Edit