User Tools

Site Tools


public:t-vien-14-1:lab_3_materials

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

  1. 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.
  2. Download and import the free Terrain Assets package from Unity through the Asset Store. The package will get imported into your currently open project.
  3. 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

  1. 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

  1. 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”.
  2. 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:
    1. 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.
    2. 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.
    3. Chose one location where you can place a structure of some sort, plan to make that location flat enough for a structure to stand.
  3. 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.
  4. 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.
  5. 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:
    1. You can lessen Opacity to make your brush work in a more gradual fashion, rather than immediately giving you extreme and sharp slopes.
    2. Experiment with the different brush shapes and experiment with light and short mouse-clicks vs. press-and-hold mouse drags.
    3. In the Paint Height tool, you can “copy a height value” directly from a spot in the scene by SHIFT clicking on it.
  6. 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.
  7. 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.
  8. 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:
    1. 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).
    2. 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).
  9. 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.
  10. Place Details Use the Place Details tool to place grass and rocks, but do it sparingly.
  11. 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).
  12. 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).
  13. Bake Shadows Pick a shadow type for your Directonal light (Hard, soft). Open Window→Lightmapping and press Bake Scene.
  14. Optional/Extra Bring in your scripts from Lab 2 and place “pickable” props around your environment that you can collect.
/var/www/ailab/WWW/wiki/data/pages/public/t-vien-14-1/lab_3_materials.txt · Last modified: 2014/01/29 11:34 by hannes