Getting Started

Quick Start Guide

The project is all contained in a single prefab called MCTerrain. Simply drag the prefab into the scene and expand it to find child game objects for the various features of the project:

• TerrainManager
• DevModeManager
• BiomeManager 

The project also includes a very basic player controller called TempPlayer to get you started. Once you have confirmed that you have got MC Terrain running, you should replace the TempPlayer with a fully featured player controller. The TempPlayer camera can move through the terrain which can cause strange behaviour when modifying the terrain - you have been warned!

Once you have imported MC Terrain you will find a 'Tools/MC Terrain' menu in your editor menu bar. You can access the project's Readme from the menu. You will also find an option called Add Tags. You will need to click on this before you run MC Terrain for the first time to add in the tags that the project expects to have available.

Once the tags have been added, pressing play will start the project. The project will then generate the chunks of terrain, and when the required amount have been generated the terrain will be displayed.

You can use the standard WSDA keys to move the player and Space Bar to jump. There is also a Dev Mode flying option that allows you to fly the player over and through the terrain. Pressing F will activate Fly Mode and then you have the following controls:
Forward: W
Up: Space
Down: Left CTRL
Quit Flying: L

Replacing the TempPlayer controller

Adding the Invector Third Person Controller

There are lots of Third Person Player Controllers available on the Unity Asset Store. In this video I look at adding the free version of the Invector Third Person Controller which can be found here:
https://assetstore.unity.com/packages/tools/game-toolkits/third-person-controller-basic-locomotion-free-82048

Adding a different player controller is very straight forward. First you need to remove the existing Main Camera and the TempPlayer GameObjects from the Scene. Then you drag in the prefab for the player you want to use, and then drag in the prefab for its follow camera.

The player prefab must be tagged as Player, and the follow camera as Main Camera. That's all there is to it!

Adding the Starter Assets Third Person Controller

In this video I replace the TempPlayer with the Unity Starter Assets Third Person Controller, which can be found here:
https://assetstore.unity.com/packages/essentials/starter-assets-third-person-character-controller-urp-196526

This asset uses the the Input System and Cinemachine, so I discuss how to get the import process works and how you add the player to the scene and set up the Cinemachine camera correctly.

Adding the Starter Assets First Person Controller

MC Terrain can also be used with a first person controller. In this video I replace the TempPlayer with the Start Assets First Person Controller which can be found here:
https://assetstore.unity.com/packages/essentials/starter-assets-first-person-character-controller-urp-196525

This also uses Cinemachine so I discuss how to set up the follow camera correctly.

Render Pipelines

Setting up MC Terrain in the Universal Render Pipeline

MC Terrain can be used in all render pipelines. However the Invector Third Person Controller only comes with shaders for the Standard Render Pipeline (SRP), and the Starter Assets Third Person Controller only comes with shaders for the Universal Render Pipeline (URP). However, to make these controllers more useful I have included shaders for both characters for all three render pipelines, Standard, Universal and High Definition. There are also TriPlanar terrain shaders for all three render pipelines included as well.


Setting up MC Terrain in the High Definition Render Pipeline

The MC Terrain menu has options to update the demo scene to each of the three render pipelines. Each option will update the terrain shader, the TempPlayer, Invector Third Person Controller and the Starter Assets Third Person Controller. However, if you are using a different player controller then the script won't be able to update that player's shaders. However the scripts that do the updating can be found here:
"Assets\MCTerrain\Editor\ConvertToSRP"
"Assets\MCTerrain\Editor\ConvertToURP"
"Assets\MCTerrain\Editor\ConvertToHDRP"

You will be able to see how the shaders are updated and add you own players to the scripts.

© Copyright 2023 MC Terrain. All Rights Reserved.