teaching machines

CS 491 Lecture 4 – Terrain

February 4, 2016 by . Filed under gamedev3, lectures, spring 2016.

TODO

Lab

Today we’re going to make a terrain, replete with walking paths, vegetation, and teleporters!

  1. Add a terrain game object.
  2. Use the Raise/Lower Terrain tool to sculpt your landscape. Keep this general design principle in mind: start with the large, coarse features. Only after these features are roughed out should you focus on fine details. Which brushes are appropriate for the coarse features? Which for the fine?What role does a brush’s opacity setting play? How does one lower terrain instead of raise it?
  3. Add an FPSController to your scene and playtest.
  4. Getting the player’s vertical position can be tricky. If you set it too high above the terrain, it will briefly fall before it collides with the terrain. If it’s too low, it will fall forever in the Neath. To position an object (a player controller or other game objects) exactly on the terrain, click on the Translate tool (W on the keyboard), and Command/Control-Shift-Drag on the gray cube at the center of the translate manipulator.
  5. Add some texture to your terrain. The first texture you add using the Paint Texture tool is the base texture that’s applied everywhere automatically. Try adding some random images (of animals, David Bowie, etc.) as the base texture. What must be true of this base texture in order for it look believable?
  6. Let’s add a more realistic texture. Import everything in the Environment assets package. Replace your base texture with one of the imported ones.
  7. Create a multi-tier plateau somewhere in your landscape. What tool makes this easy?
  8. Steep elevation changes tend to distort textures. Your plateau probably demonstrates this. Argue with your partner why this is the case. Which terrain tool can help soften these distortions?
  9. Paint a walking path for your player. Add a second texture that seems appropriate for a walking path.
  10. Add trees to your scene.
  11. Add a wind zone to your scene. Make the wind gentle. The default settings are usually too powerful for anything but a hurricane.
  12. Add grass.
  13. Carve out a sunken area and add some water. Size it so the edges of the invoking geometry cannot be seen.
  14. Add a teleporter using a vertical cylinder. Make it spin forever. What component makes this easy? Add a material with an albedo texture that you create using an image editor. Give the texture an interesting pattern in the RGB channels, but mask out portions of it in the alpha channel to give it a ghosted quality. Apply this material to cylinder. Try out the material’s different Rendering Modes to see which gives the best effect. Disable shadow casting.
  15. Make a second teleporter like the first. But don’t Duplicate! Duplicate makes an independent copy. If you need to change something about the teleporters, you’ll have to change each individually. Instead, drag the teleporter from the hierarchy into the project assets. This makes it a prefab—a template or class that can be instanced many times. Changes made to the prefab automatically propagate to the instances.
  16. This last step is underspecified. When the user enters one teleporter, have it move the user automatically to the other. How can you do this? You’ll probably want a TeleporterController script. Give it a public Transform in which you can drop the matching teleporter game object. When the player enters the teleporter ( OnTriggerEnter), move the player to the matching teleporter.