public:t-vien-14-1:lab_3_materials
Table of Contents
Lab 3: Outdoor Environment
Goal
The goal of this lab is to create an outdoor environment that could serve as a backdrop for an interesting story. Put some effort into the planning and the designing, as well as into making the environment believable.
Preparation
- Make sure you have an account in the Unity Asset Store. You can create an account on the store's web page if you like. Once you are inside Unity, you can access the store through Window→Asset Store.
- Download and import the free Terrain Assets package from Unity through the Asset Store. The package will get imported into your currently open project.
- Browse the Asset Store for other free terrain and environmental assets (you can of course also purchase things you like, but you are certainly not required to spend money in this class ).
Documentation
- You will be using Unity's Terrain Engine. For more information about how to use it and for looking up what the different buttons and parameters do, please check out Unity's Terrain Engine Overview.
Procedure
- Decide on a Theme Decide what kind of story you wish to tell. You do not have to decide on any details, just a rough theme which you can summarize in a title, e.g. “The search for the city of gold”, “Stranded and lost”, “The valley time forgot”, “The Dwarves last stand”, “Save our planet”.
- Plan and Design On a piece of paper (or on your computer, if that is more comfortable) make a rough map / sketch of an outdoor environment that supports your theme. Remember the following:
- You need a “natural” border that keeps the user confined to your environment. For an outdoor environment it is easiest to either make (1) an island surrounded by water or (2) a valley/canyon surrounded by steep slopes / mountains.
- Provide a variation in scenery, e.g. low flat areas vs. high cliffs, and plan paths that users can take to reach the most interesting spots.
- Chose one location where you can place a structure of some sort, plan to make that location flat enough for a structure to stand.
- Configure a Terrain Game Object Start a new scene in Unity and add GameObject→CreateOther→Terrain to it. Inspect the object and open the Terrain Settings (the gear wheel / cog icon tab in Terrain script component). Choose a terrain size and height. Tip: Keep the environment relatively small so that you can quickly travel across it and also so that you can sculpt / populate it relatively quickly. Side lengths of 500m - 1000m and heights of 400m - 700m would work well.
- Adjust Terrain Base Level Using the Paint Height tool (second tab) you can quickly make the whole terrain a certain height, base height. Type a value into the
Height
parameter and press the Flatten button to do this. - Shape the Terrain Use the Raise/Lower TerrainPaint HeightSmooth Height tools to shape the terrain according to your map / sketch. Make sure to create one flat location for placing a structure. Remember the following:
- You can lessen
Opacity
to make your brush work in a more gradual fashion, rather than immediately giving you extreme and sharp slopes. - Experiment with the different brush shapes and experiment with light and short mouse-clicks vs. press-and-hold mouse drags.
- In the Paint Height tool, you can “copy a height value” directly from a spot in the scene by SHIFT clicking on it.
- Add First-Person Controller Find the “First Person Controller” prefab and add it to the scene (and remove the
Main Camera
). Place the controller on your terrain and test it. - Add Directional Light Add a GameObject→Create Other→Directional Light to the scene and adjust it so that you can clearly see the features of your terrain.
- Color the Terrain Use the Paint Texture tool to apply certain textures to certain areas of your map. Load at least 4 different textures into the tool, using the Edit Textures… button. These textures form your “palette”. When you paint from this palette, play with
opacity
and brush shapes to create natural blends between the different textures. Avoid sharp transitions from one texture to another. Remember:- Your palette should include textures for different amounts of slope, e.g. a rock/cliff texture for very steep slopes (it would not make sense to paint those with regular grass for example).
- You can paint paths through your environment, e.g. using a dirt/gravel texture. Don't make the path too clean though, since typically those are partially overgrown and faded (unless it's an asphalt road).
- Place Trees Use the Place Trees tool to add trees and pay attention to where you would logically find them in your environment. Also, pick tree types that make sense for your theme. Leave some areas without trees, e.g. mountain tops and beaches. Also consider leaving some clearings in forested areas.
- Place Details Use the Place Details tool to place grass and rocks, but do it sparingly.
- Place Structure Use the Asset Store to import some structure (building, ruin, mechanical device..) in the location you had prepared for it. Use details (decorations) to make that area richer (and to hide the “flatness” of it).
- Add Skybox, Fog and Adjust Lighting Manipulate parameters in Edit→Render Settings to create atmosphereic fog and pick an appropriate skybox. Think of the atmosphere that you wish to create. How mysterious should this place be? What is the weather like? How cold is it? What time of day is it? Remember that you can also create a night scene (your directional light can be moon light). Pick colors that match (fog, skybox, light).
- Bake Shadows Pick a shadow type for your
Directonal light
(Hard, soft). Open Window→Lightmapping and press Bake Scene. - Optional/Extra Bring in your scripts from Lab 2 and place “pickable” props around your environment that you can collect.
/var/www/cadia.ru.is/wiki/data/pages/public/t-vien-14-1/lab_3_materials.txt · Last modified: 2024/04/29 13:33 by 127.0.0.1