User Tools

Site Tools


public:t-vien-15-3:lab3_the_great_outdoors

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. Import the “Environment” assets from Assets→Import Package→Environment.
  2. 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.
  3. Browse the Asset Store for free environmental assets such as SkyBoxes, rocks, grass and small structures (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. Choose 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. Center the Terrain You may notice that the origin of the terrain mesh is in its lower left corner and that is the point that gets placed at (0,0,0) in the world. If you want to center the terrain, change its x and z position (under its Transform component) to be half its width and length.
  5. 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 (useful to carve valleys, but maybe not so useful for making an island).
  6. 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. The SHIFT key gives you the “other” function, e.g. holding the SHIFT using the “Raise/Lower” tool, will activate the “Lower” function.
    2. You can lessen Opacity to make your brush work in a more gradual fashion, rather than immediately giving you extreme and sharp slopes.
    3. Experiment with the different brush shapes and experiment with light and short mouse-clicks vs. press-and-hold mouse drags.
    4. In the Paint Height tool, you can “copy a height value” directly from a spot in the scene by SHIFT clicking on it.
  7. Add the FPS Controller Import the Character asset package if you haven't already. Find the “FPSController” prefab and add it to the scene (and remove the Main Camera). Place the controller on your terrain and test it.
  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 Ocean / Lake Find the WaterProDaytime Prefab and place in your scene. Scale it up to the size of your terrain if you want an ocean, or use a smaller one for lakes. Drag it up/down until the sea/lake level is what you want it to be? It should fill the lowest parts of your map. Play with its WaterMode property and the material/shader properties (especially Wave scale, …distort and ..color)
  10. 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.
  11. Add Wind Pick WindZone from the GameObjects→3D Object, edit its Main value to change its intensity if the trees are moving too much.
  12. Place Details Use the Place Details tool to place grass and rocks, but do it sparingly.
  13. 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).
  14. Play with Lighting Use Window→Lighting to change the SkyBox if you have found another one to try. You can use that SkyBox as the AmbientSource, which may make the scene too bright, in which case you can also choose Gradient as your AmbientSource which you can carefully adjust to capture the mood you are after. Also look at the color and intensity of your DirectionalLight object, as well as its direction to make all lights and shadow paint a coherent picture.
  15. Add ambient sound Add a looping sound clip to an Audio Source component you attach to something like the terrain itself. Search the Internet for Creative Commons licensed sound that you can use if you credit.
  16. 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-15-3/lab3_the_great_outdoors.txt · Last modified: 2015/09/03 21:48 by hannes