OverviewDemos, Documentation, Tutorials 

Unity Asset Store - Unity Forums - NatureManufacture - Procedural Worlds

Welcome to CTS - The Complete Terrain Shader for Unity 3D. This page shows the basic work flows, and also how to access the help system built into CTS. To see this in action please click on the tutorials link.

CTS Overview

The CTS terrain shading system is a Profile based shading system for Unity.

A Profile is a Scriptable object that stores the settings and textures used by CTS to shade your terrain. It is used to generate a customised set of texture arrays containing specially packed textures that are use by CTS to render your terrain.

Once a Profile has been created it can be applied at any time, and the terrain will take on the characteristics and textures that have been defined in that profile. This is usually an instantaneous update.

Another benefits of this approach is that you can modify Profile in-game and have them persist out of the game back in edit mode, so you can customise everything from the perspective of your user. 

CTS Directories

CTS - Main CTS directory

  • Demo - CTS Demo directory
  • Prefabs - CTS Prefabs directory (has a handy little FPS counter)
  • Profiles - CTS Profiles directory - where new profiles will be placed - you can move them later
  • Scripts - CTS Scripts directory
  • Shaders - CTS Shaders directory
  • Terrains - CTS Terrains directory - Where materials and global normal maps are created for each terrain in your scene - you can move them later
  • Textures - CTS Texture library directory - a great collection of fantastic textures you can use

NOTE - You can move CTS around in your project, but this directory structure must be preserved. You must also leave the CTS_ReadMe file in the main CTS directory as this is what is used by CTS to locate CTS in your project.

CTS Work Flows

Setting Up Your Terrain - First Time

  1. The first step to set CTS up on any new terrain is to select Component -> CTS -> Add CTS To Terrain.
    This will iterate though all of the terrains in your scene and add the CompleteTerrainShader script to them. This script is resonsible for taking whatever profile has been assigned to it, and applying those settings to the terrain.

  2. The next step is to select Component -> CTS -> Create And Apply Profile
    This will create a new profile in your CTS / Profiles directory, ingest the content of the terrain into the new profile, and apply it to all of your CTS terrains. This is generally quite fast, but the actual speed will depend on the speed of your development environment.

  3. The next step is to configure up your profile. Please check out the tutorials for more information on this.

Applying An Existing Profile To Your Terrain

  1. Make sure that CTS has been added to the terrain (step 1 above).

  2. Click on the Profile - by default they are stored in the CTS / Profiles directory.

  3. Scroll down to the bottom of the Profile and click the Apply Profile button. This will apply this Profile to all the CTS terrains in your scene. NOTE: This will also replace the textures in the terrain with the textures in the profile.

Adding Or Removing Textures From Your Terrain (and Profile)

  1. Make sure that CTS has been added to your terrain and that this Profile has been applied to your terrain.

  2. Click on the terrain object and add the new textures in the usual way.

  3. Click Bake Textures - This will load the textures from the terrain into your Profile and also regenerate your texture arrays.

Updating Textures In Your Profile (and Terrain)

  1. Make sure that CTS has been added to your terrain and that this Profile has been applied to your terrain.

  2. Click on the Profile and update the texture in the profile by dragging the texture into the appropriate slot.

  3. If the texture is an albedo or normal texture, it will immediately be applied into the terrain. If the texture is used by the texture arrays that drive your terrain then the Profile will turn RED.

  4. If the Profile turns RED then click Bake Textures - This will load the textures from the terrain into your Profile, the new textures on top, and then regenerate your texture arrays. You will only see texture changes in your terrain after this has been done.

Adding Weather to Your Terrain

  1. Make sure that CTS has been added to your terrain and that a Profile has been applied to your terrain.

  2. Click Component -> CTS -> Add Weather Manager. This will add a CTS Weather Manager object to your scene. It will also iterate through every terrain and add a CTS Weather Controller to it. The Weather Manager is the central point that sends weather updates to the weather controllers on each terrain.

  3. Change the weather either by script on the Weather Manager, or via the custom interface in CTS. You can control the rain, snow and seasons (tints the terrain based on the seasonal colors you select).

Packaging Your Terrain for Build

  1. By default, your profile and the textures it references stays in memory, as do the original textures that were applied to the terrain, however this memory overhead is not required in your build's, so you can remove it if you want. Note - you don't need to do this in day to day development - just at build and if you want to reduce your memory footprint.

  2. Click Component -> CTS -> Package CTS For Build. This will replace the terrain textures with small placeholder textures and disconnect the profile object. Save your scene and then build via your normal process.

  3. When you are ready to develop again, click Apply Profile, and CTS will put the original textures back into the terrain and connect this Profile back into the terrain.

CTS Texture Management

The primary texture management operations are:

Bake Textures -> Pick the textures up out of the terrain, apply them to your Profile, and create the arrays that the shader needs.

Update Texture In Profile -> Applies the texture to the profile and the terrain, changes profile colour to red if re-baking is required.

Apply Profile -> Take the textures in the profile and applies them to the terrain (WARNING: This will replace what was there before).

Bake Normals -> Will create a global normal map for each terrain and assign it to the CTS shader. This is only needed when you change terrain heights.

CTS Help System

CTS is largely a self documenting system. To show documentation within CTS hit the question mark at the top of each CTS component. This will show or hide CTS help. You can also click on the button to come to the web site here for more information. The video tutorials in particular are a great source of information.