Reader small image

You're reading from  Unity Game Development Essentials

Product typeBook
Published inOct 2009
Reading LevelIntermediate
PublisherPackt
ISBN-139781847198181
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Will Goldstone
Will Goldstone
author image
Will Goldstone

Will Goldstone is a longstanding member of the Unity community and works for Unity Technologies as a Technical Support Associate, handling educational content and developer support. With an MA in Creative Education, and many years experience as a lecturer in higher education, Will wrote the first ever Unity book, the original Unity Game Development Essentials, and also created the first ever video tutorials for the package. Through his sites http://www.unity3dstudent.com and http://learnunity3d.com Will helps to introduce new users to the growing community of developers discovering Unity every day.
Read more about Will Goldstone

Right arrow

Chapter 2. Environments

When building your 3D world, you'll be utilizing two different types of environment — buildings and scenery built in a third-party 3D modelling application and terrains created using the Unity terrain editor.

In this chapter, we'll look at the use of both, while giving an overview of the necessary import settings for externally created models, but focusing mainly on using Unity's own tools for creating terrains. We shall specifically be looking at:

  • Creating your first Unity project

  • Creating and configuring terrains

  • Using the terrain toolset to build an island

  • Lighting scenes

  • Using sound

  • Importing Packaged Assets

  • Introducing External 3D Models

External modellers


Given that 3D design is an intensive discipline in itself, I recommend that you invest in a similar tutorial guide for your application of choice. If you're new to 3D modelling, then here is a list of 3D modelling packages currently supported by Unity:

  • Maya

  • 3D Studio Max

  • Cheetah 3D

  • Cinema 4D

  • Blender

  • Carara

  • Lightwave

  • XSI

These are the eight most suited modelling applications as recommended by Unity Technologies. The main reason for this is that they export models in a format that can be automatically read and imported by Unity, once saved into your project's Assets folder. These eight application formats will carry their meshes, textures, animations, and bones (a form of skeletal rigging for characters) across to Unity, whereas some smaller packages may not support animation using bones upon import to Unity. For a full view of the latest compatibility chart, visit: http://unity3d.com/unity/features/asset-importing .

Resources


Models in this book will be provided online in a .fbx format (a native format for Unity use, which is common to most 3D modelling applications).

When downloading content to use as part of the exercises in this book, you'll need to utilize Unity's package system. Accessible from the Assets top menu, importing and exporting Unity packages gives you the ability to transfer assets between projects while including dependencies. A dependency is simply another asset related to the one you are importing/exporting. For example, when exporting a 3D model as part of a Unity package — when transferring to a collaborator, or simply between your own Unity projects — you would need to transfer the relevant materials and textures associated with the models, and these associated assets would be referred to as the model's dependencies.

When prompted throughout the book, you'll download the assets provided in the Unity package format and add them to your assets by using Assets | Import Package.

Your first Unity project


As Unity comes in two different forms — an Indie and Pro developer license, we'll stick to using features that the beginner, and therefore a likely Indie license holder, will have access to.

Having installed Unity, your first launch will present you with the Island Demo project. This is effectively a showcase project to demonstrate Unity's abilities and also to help new users pick apart certain features by observing and deconstructing the creations of its developers.

In this book, you will be starting from scratch, and you will need a new project to work with, so go to File | New Project. This will close the currently opened project and present you with the Project Wizard, a dialog window allowing you to select an existing project to open. You can also start a new one by selecting from several Asset Packages to start with.

Note

Be aware that if at any time you wish to launch Unity and be taken directly to the Project Wizard, then simply hold the Alt key (Mac and PC)...

Using the terrain editor


In building any game that involves an outdoor environment, a terrain editor is a must-have for any game developer. Unity has featured a built-in terrain editor since version 2.0, and this makes building complete environments quick and easy.

In Unity terms, think of a terrain as simply a game object that has a terrain toolkit component applied to it. Beginning as a Plane — a flat, single-sided 3D shape — the terrain you'll create shortly can be transformed into a complete set of realistic geometry, with additional details such as trees, rocks, foliage, and even atmospheric effects such as wind speed.

Terrain menu features

In order to take a look at the features outlined below, you will need to create a terrain. So let's begin by introducing a new terrain object to the game — this is an Asset that can e created within Unity, so simply go to Terrain | Create Terrain from the top menu.

Before you can begin to modify your terrain, you should set up various settings for...

Summary


In this chapter, we've explored the basics of developing your first environment. Beginning with nothing but a flat plane, you have now created a completely explorative island terrain in a short space of time. We've also looked at lighting and sound, two core principles that you'll apply in every kind of game project you encounter.

Remember, you can always return to the terrain tools covered in this chapter at any time in order to add more detail to your terrain, and once you feel more confident with sound, we'll return to adding further audio sources to the island later in the book.

As you continue to work through this book, you'll discover all types of additional nuances you can bring to environments in order to further suspend disbelief in the player.

We'll be looking at adding a dynamic feel to our island when we look at the use of particles, adding camp fires, and even a plume of smoke and ash from our volcano!

In the next chapter, we'll take the outpost building into our scene...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Unity Game Development Essentials
Published in: Oct 2009Publisher: PacktISBN-13: 9781847198181
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $19.99/month. Cancel anytime

Author (1)

author image
Will Goldstone

Will Goldstone is a longstanding member of the Unity community and works for Unity Technologies as a Technical Support Associate, handling educational content and developer support. With an MA in Creative Education, and many years experience as a lecturer in higher education, Will wrote the first ever Unity book, the original Unity Game Development Essentials, and also created the first ever video tutorials for the package. Through his sites http://www.unity3dstudent.com and http://learnunity3d.com Will helps to introduce new users to the growing community of developers discovering Unity every day.
Read more about Will Goldstone