0% found this document useful (0 votes)
168 views70 pages

3D - Game - Design - Module - I - Overview of 3D Platform

This document provides an overview of a module on 3D game design using the Unity game engine. The module aims to familiarize students with Unity game setup, design, programming, and their importance in game development. Key topics covered include an introduction to Unity, loading and creating new Unity projects, the Unity interface including scene view, game view, hierarchy view and more. The document also discusses 3D objects, materials, environments, player characters and interactions in Unity games.

Uploaded by

SamVish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views70 pages

3D - Game - Design - Module - I - Overview of 3D Platform

This document provides an overview of a module on 3D game design using the Unity game engine. The module aims to familiarize students with Unity game setup, design, programming, and their importance in game development. Key topics covered include an introduction to Unity, loading and creating new Unity projects, the Unity interface including scene view, game view, hierarchy view and more. The document also discusses 3D objects, materials, environments, player characters and interactions in Unity games.

Uploaded by

SamVish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 70

3D Game Design

Module Number: 01

Module Name: Overview of 3D Platform


Overview of 3D Platform

AIM:
The aim of this module is familiarize the students about the Unity 3D game setup, designing, programming
and their importance in game development industry.
Overview of 3D Platform

Objectives:
The Objectives of this module are:

Students will learn how to


• To understand the overview of 3D game platform.
• To identify the resources for a 3D game development.
• To learn techniques essential for setting up a 3D game.
• To understand the game mechanism and its interface.
• To explain 3D game workflow and optimization techniques.
Overview of 3D Platform

Outcomes:

At the end of this module, you are expected to:


• Explain 3D game ecosystem.
• Design the resources for a 3D game development.
• Describe pipeline techniques required for a 3D game.
• Project the game mechanism and its interface.
• Explain game management and optimization techniques.
Overview of 3D Platform

Contents

1. Introduction to unity 3D.


2. Loading or creating a New project or scene.
3. Layout, Toolbar, Menu, Simple Objects, selecting and focus, Transforming, Snaps.
4. Scene.
5. Lights.
6. Particle.
7. 3D Objects, Materials, Environment, Player Character, Interactions.
8. Concepts of unity 3d, Interface, Terrain Editor.
9. Camera, GUI and HUD.
Overview of 3D Platform

 Introduction to unity 3D

• Unity is a cross-platform game engine developed by Unity Technologies, first


announced and released in June 2005 at Apple Inc.'s Worldwide Developers
Conference as an OS X-exclusive game engine.
• As of 2018, the engine has been extended to support 27 platforms.
• The engine can be used to create both three-dimensional and two-dimensional
games as well as simulations for its many platforms.
• Several major versions of Unity have been released since its launch, with the
latest stable version being Unity 2018.2.15, released on November 9, 2018
• Used to develop video games for PC, consoles, mobile devices and websites.
• Nintendo provides free licenses of Unity 5 to all licensed Nintendo Developers
along with their software development kits (SDKs) for the Wii U and Nintendo
3DS Family.
Overview of 3D Platform

 Introduction to unity 3D

• Unity Game Engine


 Unity is a fully-featured game engine and provides:
 Scripting Engine (JavaScript, C#, Boo)
 Graphics Engine
 Physics Engine (based on NVDIA PhysX)
 Audio Engine
 Networking
 GUI Management
 Integrated editor
 Multi-platform deployment
 One of the greatest aspects about Unity lies in its GUI’s hospitability
and familiarity. You can open up Unity and try things around and
experiment with the different panels of the Editor fairly intuitively.
 Supports art assets and file formats from 3ds Max, Maya,Softimage,
Blender, modo, ZBrush, Cinema 4D, Cheetah3D, Adobe Photoshop,
Adobe Fireworks and Allegorithmic Substance Painter.
Overview of 3D Platform

 Introduction to unity 3D
Overview of 3D Platform

 Introduction to unity 3D

• Getting started - Unity Game Engine


 Installation
1. Download the latest Unity distribution from http://unity3d.com/unity/download/
2. Run the installer with default settings.
3. Run Unity for the first time. It may open the demo project, or it will ask you to create a project. Open the
demo or create a new project without changing any settings.
4. Follow the instructions to register online, fill out your email address and just use the free/indie license.
5. Go to File > Open Project
6. When your project will be loaded, it will open in unity. More on next slide
Overview of 3D Platform

 Introduction to unity 3D
Overview of 3D Platform

 Loading or creating a New project or scene


• To work with Unity, you must always start with a project.
• When you create a new project, a directory or folder is created, with
sub-folders containing the required files. Be sure to note where the
project is installed or use the Browse button to select a different
location. You will be asked to choose which asset packages you
want to include with your project. Earlier versions of Unity had
generic Pro and Standard packages as the choices. Now, however,
the packages have been split into component parts, so you can
reduce clutter for specific game types. In the book, you will use
most of the packages, so you can get a feel for what is available.
 Open Unity.
If you have downloaded the demo project, Unity will open
it to start. If there is no project, the Project Wizard dialog
opens, prompting you to select a project.
 If Unity has opened an existing project, from File, select
Open New Project.
 Select the Create New Project tab.
Overview of 3D Platform

❖ Loading or creating a New project or scene

⮚ Click Browse and navigate to where


you’ll keep your Unity projects, then
create a New Folder for the book
project.
⮚ Name the folder BookProject
⮚ Select Character Controller, Light
Cookies, Light Flares, Particles,
Physics Materials,
⮚ Projectors, Scripts, Skyboxes,
Terrains, and Water(Basic).
⮚ Click Create.
⮚ Unity closes and reopens to show
your new project—BookProject.
⮚ Unity Pro ships with the “dark” UI.
Overview of 3D Platform

 Layout
• There are many ways to rearrange the layout of the Unity UI.
• You can change the layout by selecting from the Layout drop-down in the upper right area of the
application window.
• If you have the screen real estate, you may even want to tear off the various views into floating
windows.
Overview of 3D Platform

 Layout
• Unity introduced a new split-column Project
view.
• It’s great for inspecting new assets in unfamiliar
projects, but many people feel it introduces
unnecessary clutter in their own projects.
• You are free to use whichever you prefer, but
for the book, most instructions and screenshots
will assume you are using the one-column
Project view.
• You can select the Project-view layout of your
choice by right-clicking over the Project tab and
choosing either One Column Layout or Two
Columns Layout
Overview of 3D Platform

 Layout
• Scene View :The Scene view is where you
build the visual aspects of your scene—where
you plan and execute your ideas.

• Game Window : The Game window is where


you test your game before building it in the
runtime environment. You can’t select objects
in this view and, unlike the Scene view, it has
no default lighting. You’ll have to use the Main
Camera to see objects in the Game window.
Overview of 3D Platform

 Layout
• Hierarchy View: The Hierarchy view shows
what’s in the currently active scene.
GameObjects that are dynamically added and
removed from the scene during runtime will
appear here when they are active in the scene.

• Project View :The Project view contains all the


assets available to the current project, as well as
all scenes or levels available for the finished
game or application. It is a mirror of the Assets
folder in the directory where the project resides.
Removing assets from this location delete them
from the hard drive! Removing assets from the
directory in Explorer removes them from the
Project view and could break the scene.
Overview of 3D Platform

 Layout
• Inspector : You use the Inspector to access various
properties and components for objects you’ve selected in
either the Hierarchy or Project views. You can also access
other scene-related information here. Select the only
object that’s in the scene now, the Main Camera, from the
Hierarchy view, and then take a look at the Inspector
Overview of 3D Platform

 ToolBar
• The menu bar is the toolbar, which contains five different controls.

• The Transform tools, provide functionality for navigating the scene and transforming objects.
• The button on the far left, the pan tool, can also become orbit and zoom tools for navigating and adjusting the
Scene view. You can click and drag to move the view around (to pan). To orbit the current viewport center, hold
the Alt key down, while clicking and dragging. And to zoom, hold the Alt key (Windows) or the Cmd key (Mac),
plus the right mouse button. There are other ways to perform these tasks, as you’ll see when you add an object to
the scene. But don’t test the navigation until you have an object to work with.
Overview of 3D Platform

 ToolBar
• The remaining three buttons are for transforming objects in the scene in edit mode. The available transforms are
move, rotate, and scale.
• Objects can be transformed in different coordinate systems and from different pivot points. The next set of
controls, to the right of the Navigation tools, let you toggle between the choices.

• The center controls are the Play mode controls that allow you to see how the game will work in real time, as if
you were the player.

• To the right of the Play controls, you’ll find the Layers drop-down. Layers are used in Unity for controlling
which objects are rendered by which cameras or lit by which lights.

• You already tried the Layout drop-down, when you set it to use the 2×3 split layout. You can rearrange and
customize most of Unity’s UI. The Layers drop-down lets you quickly get back to several default or predefined
layouts.
Overview of 3D Platform

 Menus
• Along with the usual file-handling options, there are many
concepts and features that are specific to Unity. Most are found in
the menus. Menus items also show the keyboard shortcuts for
those who prefer them.

• File: In the File menu, you can load, create, and save scenes and
projects. It is also where you build your game as an executable or
other deployment type.
• Edit: The Edit menu contains the expected Cut, Copy, Paste,
Duplicate, and Delete commands, as well as several runtime
commands. The actual editing of assets, however, is done in the
Inspector. Of particular value here are the keyboard shortcuts
shown next to the commands. There are several scene settings
that are not accessed through the Hierarchy or Projects views.
Besides the Render Settings, the Project Settings are where you’ll
access many of your scenes’ attributes. When you choose an
option, the information will show up in the Inspector view.
Overview of 3D Platform

 Menus
• Assets: In the Assets menu, you will find the Create submenu. This is where you can create the type of assets that
generally can’t be imported from DCC programs, such as non-mesh special effects, physics materials, and scripts.
It is also the place to define custom fonts and organize the project with folders and prefabs. You can also reach this
menu by right-clicking in the Project view.
• GameObject : The GameObject menu lets you create an empty GameObject. The GameObject is the base
container for objects, scripts, and other components in Unity. Like a group, it has its own transform and, so, is a
logical means of organizing similar objects or meshes. At its simplest, a GameObject contains its transforms
(location and orientation) and a few other properties. With the addition of various components, it can become
almost anything you need. GameObjects are invaluable when used as a parent group or “folder” to keep multiple
scene objects organized. You can create various objects, such as lights, particle systems, GUI 2D objects, and
Unity primitive objects from scratch with Components or find them ready-made in the Create Other submenu.
Unlike many modeling programs, you cannot change the number of segments in Unity’s primitive objects.
• Component: The Component menu gives you access to items associated with objects, such as meshes, rendering
types, sound, scripts, and colliders, as well as those that create or extend functionality with predefined behaviors or
even editors. Components let you add physics characteristics to imported meshes, function-curve animation to
objects, and all of the interactive intelligence that drives games and other, more serious applications via scripts.
They are the building blocks that are added to the GameObject foundation to create almost everything in your
scenes.
Overview of 3D Platform

 Menus
• Window: As you’d guess, this menu displays the commands for managing various windows and editors in Unity,
along with their keyboard shortcuts. It is also the way you must access Unity’s Asset Store, a place where you can
find or purchase assets of all sorts for your project.
• Help: The Help menu provides access to the various Unity help manuals, as well as to the massively supported
Unity Forum, Unity Answers, release notes, and instructions for reporting bugs.
Overview of 3D Platform

 Simple Objects: GameObjects


• It always helps to have something in the scene when you’re going to
experiment with navigation in a 3D application. Though you will
import most of the assets for your games, you’ll find many uses for
the primitive objects available in the Unity game engine.
 From the Create Other option in the GameObject menu, select
Cube. A cube is created in the center of the Scene viewport. It
may be little more than a speck at this point, if you’ve played
with the viewport navigation tools. You may also see it as a small
dark square in the Game window.
 To zoom, use the middle mouse roller or the Cmd button on the
Mac. Zoom in and out on the new cube in the Scene view.
 To see the cube properly in the Game view, you have to move the
camera. Rather than fussing with moving and rotating the
camera, you can set the camera to match the Scene view, where
you’ve already adjusted the preferred view of the cube.
 Select the Main Camera in the Hierarchy view.
 From the GameObject menu, choose Align with View.
Overview of 3D Platform

 Simple Objects: GameObjects


 The cube is now visible in the Game view and the camera
Preview inset in the Scene view.
 When the Light button is off, the Scene window is lit with default
lighting, a single light pointing straight into the viewport. This
assures that the object in focus is always well lit.
 Toggle the built-in lighting off and the scene lighting on, by
clicking the light button.
 The cube is now lit only with the scene ambient light, as in the
Game window.
 Navigating the Scene viewport does not affect the camera. You
can also zoom in and out by positioning the cursor in the
viewport, holding the Alt key down, and holding the right mouse
button down and moving the mouse back and forth. On a Mac,
hold down the Cmd key while clicking and dragging to zoom.
 Don’t pan the viewport yet.
 Toggle the scene lighting back off in the Scene view.
Overview of 3D Platform

 Simple Objects: GameObjects


 Slowly zoom out from the cube in the Scene view until a large camera
icon blocks the cube.
 Continue to zoom out, then zoom back in.
 The icon changes size as you zoom in and out.
 Click Gizmos above the Scene view and uncheck 3D to supress icon
scaling.
 Deselect the camera by clicking in a blank area of the Hierarchy view.
 Toggle off the scene Light button.
 To orbit the viewport around the cube, position the cursor in the
viewport, hold down the Alt key and the left mouse button, and move
the mouse around.
 The view pivots around the center of the viewport’s focal point. The
cube itself is not rotated, as you can see by watching the cube in the
Game view.
 You can pan the viewport by clicking the Pan button and then holding
the left mouse button down and dragging in the viewport. You can also
position the cursor in the Scene window, hold the middle mouse roller
down, and move the mouse.
Overview of 3D Platform

 Simple Objects: GameObjects


 Pan the viewport so the cube is no longer centered.
 Use the Alt key again and orbit, to see how the view still orbits its current center point, not the cube
Overview of 3D Platform

 Selecting and Focusing


 One of the most important navigation concepts in Unity is
that of quickly zooming in to specific objects or areas. To
focus the viewport back to the cube, or to “find” the cube, do
the following:
 Make sure the cube is selected in the Hierarchy view.
 Put the cursor over the Scene window.
 Press the F key on your keyboard.
 Also note that the edges of the selected object show in pale
green. Using the View mode drop-down, you can view scene
objects in several other modes
 The view shifts to the center of the cube.
 Try the Wireframe mode.
 The object shows only the object edges.
 Try the Textured Wire.
 The Textured Wire mode shows the solid object with the
edges, but unlike the selected object in Texture mode, all of
the scene objects will also be shown textured and edged.
 Return the view mode to Textured.
Overview of 3D Platform

 Transforming Objects
 In 3D space, you use what is called the Cartesian coordinate
system. If you come from Autodesk products, you will be
used to Z representing “up” in the world. This derived from
traditional drafting, were the paper coordinates on the
drafting table were X and Y, so Z became up. In Unity, Y is
up, harking back to the early days of 2D monitor space,
where X is horizontal and Y is vertical. With the advent of
3D space on computers, Z was assigned as back or forward
from the monitor. Z depth is an important concept in real-
time applications, as it is used to determine the order objects
are drawn into the scene.
 No matter which way is up, the directions are color-coded,
with red, green, blue (RGB) corresponding to X, Y, Z.
Objects imported from applications using Z up will retain
their original orientation, regardless of coordinate system.
 Objects can be transformed (moved, rotated, scaled) around
the scene with the rest of the tools on the upper left toolbar.
Overview of 3D Platform

 Transforming Objects
 Select the cube from the Hierarchy view or by picking it in the
Scene view.
 Select the Move button.
 A Transform axis appears for the cube.
 Click and drag on any of the three axes.
The active direction turns yellow, and the movement is
confined to that arrow’s direction. The object also moves in the
Game window.
 Next choose the Rotate icon. The gizmo consists of circles,
once again color-coded. Click and drag the red, green, and blue
circles to see what happens. The gray outer circle will rotate
the object to the current 2D screen coordinates, no matter
which way you orbit the view. In the Inspector, you can set the
object’s transforms manually.
 In the Transform section for the cube, set the Y Position to 0,
the X Position to 20, and the Z Position to 10.
 Use the F key to focus the viewport to the cube’s new position,
but remember to position the cursor in the Scene window first.
Overview of 3D Platform

 Transforming Objects
 The transforms are all floating point numbers; that is, they can have fractions, as indicated by the decimal
points.
 You can also adjust the values by positioning the cursor over the axis label, pressing the left mouse button,
and dragging.
 Position the mouse over the Y Scale label and drag. The cube is scaled on its Local axis, and the values
change accordingly in the Inspector. The small center gray rectangle allows you to adjust more than one axis
at the same time. With the Scale gizmo, it will cause the object to be uniformly scaled on all three axes.
 Select the Scale tool.
 Test the uniform scale by clicking and dragging within the small gray cube at the center of the Scale gizmo.
 Set the X, Y, and Z Rotations and Positions to 0.
 Set the Scale X, Y, and Z to 1.
 Use the F key to focus the viewport again.
Overview of 3D Platform

 Snaps
 Besides manually moving objects in the Scene view or adjusting their transforms
in the Inspector, you can snap objects by incremental amounts, or to each other,
by vertex.
 From the bottom of the Edit menu, open the Snap settings dialog. Note that
Move X, Move Y, and Move Z are all set to 1, and the Rotation snap is set to 15
degrees. To use the increment snap, hold down the Ctrl (Windows) or Cmd
(Mac) key while transforming the object.
 Select the cube.
 Make sure the Transform tool is active.
 Hold down the Ctrl or Cmd key and move the cube slowly in the Scene window.
 Ever so subtly, the cube moves in one-unit increments, as you can see by
watching the Inspector.
 Zoom out a bit, using either Alt + the right mouse button or the mouse roller, if
you have one.
 In the Snap settings dialog, change the Move amounts from 1 to 5.
 With the Ctrl or Cmd key still down, move the cube again.
 Set the Move amounts back to 1.
Overview of 3D Platform

 Snaps
 This time, the snap is more noticeable.
 Rotation snaps can be very useful when changing an object’s orientation. Rotation snaps work the same
way as the position snaps.
 Select the cube.
 Make sure the Rotation tool is active.
 Hold down the Ctrl or Cmd key and rotate the cube slowly in the Scene window.
 The cube snaps in 15-degree increments. 4. Close the Snap settings dialog.

 Vertex Snaps : As well as the increment snaps, you can also snap objects using their vertices as
registration points. While this may not be terribly useful in an organic environment, it can be invaluable for
snapping objects such as platforms, walls, roads, and tracks together.
 Activate the Move tool.
 Select the cube.
 Use Ctrl+D to duplicate the cube.
 Select one of the cubes and move it away from the other.
 Hold down the V key (for Vertex) and slowly move the cursor over the repositioned cube.
 The transform gizmo snaps to the cube’s vertices as you move the cursor.
Overview of 3D Platform

 Snaps
 Continuing to hold the V key down, press and hold the left mouse button and move the cube toward the
other cube, until it snaps to the desired vertex on the other cube.
 Delete the extra cube by using the Delete key on the keyboard or right-clicking the cube in the Hierarchy
view and selecting Delete from the menu.
Overview of 3D Platform

 Snaps
 Continuing to hold the V key down, press and hold the left mouse button and move the cube toward the
other cube, until it snaps to the desired vertex on the other cube.
 Delete the extra cube by using the Delete key on the keyboard or right-clicking the cube in the Hierarchy
view and selecting Delete from the menu.
 Scene Gizmo
 So far, you have adjusted the viewport and transformed the
object in a Perspective viewport. While this is useful when
you know the exact location, or don’t need to be exact at all,
it can be challenging and slow to continually rotate the view
and adjust the object with more accuracy. The Scene Gizmo
icon, lets you switch between Perspective and Iso views by
clicking on the view label. You can also quickly change the
viewing direction by clicking on the gizmo’s cones. The
cones point in the viewing direction. Orthographic views,
Front, Back, Top, Bottom, when using Iso projection, allow
you to judge position and scalar relationships without the
distortion of perspective.
Overview of 3D Platform

 Scene Gizmo
 Click the Y cone on the Scene Gizmo icon.You are now in a
Top viewport. At this point, the screen-space transform
gizmo makes more sense.
 Select the cube and activate the Rotate tool.
 Rotate the cube about 20 or 30 degrees with the outer circle,
until it is no longer in an orthographic orientation.
 Activate the Move tool.
 Toggle the coordinate system from Global to Loca.
 The local coordinate system allows you to transform the
object relative to its own local coordinates, as opposed to
 the fixed scene or World coordinates. You may also wish to
use the object Center instead of the object’s creation Pivot.
 Now, move the box in its local X direction.
 Set the cube’s rotations back to 0 in the Inspector.
 You may have noticed a small gray square in the middle of
the Move gizmo. It allows two-axis movement and is very
useful in orthographic-iso views.
Overview of 3D Platform

 Scene Gizmo
 Non-Snap Alignment: To align an object with another, you can once again use the options in the
GameObject menu.
 Click the gray center box of the Scene Gizmo to get back to a Perspective viewport.
 Select the cube and use the F key to focus or find it.
 From the GameObject menu, choose Create Other ➤ Create a Sphere.
 Activate the Scale tool.
 Scale the sphere using the center yellow cube on the gizmo to uniformly scale it, so it shows through the
cube.
 The sphere is created in the same spot as the cube.
 To align existing objects, you can use the third alignment option from the GameObject menu.
 Select the Move tool.
 Move the sphere away from the cube.
 Select the cube and focus the view to it.
 Select the sphere.
 From the GameObjects menu, select Move to View.
 The sphere is positioned at the cube once again, because the cube was focused to the center of the view.
 Delete the sphere by selecting it in the Hierarchy view, then pressing the Delete key, or by selecting Delete
from the Edit menu, or by pressing Shift+Delete.
Overview of 3D Platform

 Scene Gizmo
Overview of 3D Platform

 Lights
 In the Game window, the cube is dark, illumined only by ambient scene lighting, but in the Scene window, it is
lit. When you pressed the Lighting button at the top of the window, it toggled the built-in lighting off, so you
could see the scene lighting. Because there are no lights in the viewport yet, it went dark, just as in the Game
window.
 Focus the Scene view on the cube again and zoom out a bit.
 From the GameObject menu, choose Create Other ➤ Create a Directional Light.
 Directional lights emit parallel rays, no matter where they are in the scene.
 Move the light up and out of the way of the cube.
 Rotate it in the Scene window until the cube is lit nicely in the Game window
Overview of 3D Platform

 Lights
 Using Alt + the left mouse button, drag/orbit the viewport so that you are facing the unlit side of the cube .
 The details disappear.
 Toggle the scene lighting back off with the light icon (Figure 2-38, right).
 The default lighting shines directly into the viewport, ensuring objects are easy to see, regardless of viewpoint in
the Scene window.
 As you create your scene, you will probably toggle the Scene lighting off and on regularly.
 Now is a good time to take a peek at the light in the Inspector (see Figure 2-39). The light object is simply a
gameObject with a Light component.
Overview of 3D Platform

 Lights
 With the light selected, uncheck then check the box next to the
Light component’s label.
 The light turns off then on.
 Click on the color swatch next to the Color label. The floating
Color dialog opens
Overview of 3D Platform

 Lights
 Click and drag in the Color’s image/color swatch and watch the light’s color on the cube change.
 Choose something subtle.
 Close the dialog.
 Next, you will add a new material to the cube to replace the default.
 In the Inspector, select the Cube.
 In the Mesh Renderer section, click to open the Materials array list.
Overview of 3D Platform

 Lights
 It has a single material, Element 0, named Default-Diffuse. The material is shown at the bottom of the
Inspector.
 Most of the ready-made materials from the standard assets package are specialty materials, so you will be
creating your own. You will begin by creating a new folder to keep them organized.
 From the Assets menu, choose Create ➤ Folder .
 Rename the folder My Materials.
 You can access the same menu directly in the Projects view.
 Right-click the new My Materials folder and, from the same Create submenu, choose Material
Overview of 3D Platform

 Lights
 A New Material entry appears in the Inspector.
 Name the new material TestBark.
 Drag and drop the material from the folder onto the cube in the Scene window.
 In the Texture thumbnail window (not the Preview window), pick the Select button and, with the preview
slider all the way to the left in the Asset Selector, choose Palm Bark Diffuse.
Overview of 3D Platform

 Lights
 The cube now has a more interesting texture. The default shader is a simple Diffuse shader.
 Click the down arrow and select the Specular shader.
 Try adjusting the Shininess slider.
 Note the texture is retained as you experiment with different shaders. Now that your simple test scene has a
few objects in it, you should save it.
 From the File menu, select Save Scene, then repeat to Save Project.
Overview of 3D Platform

 3D Objects
 Meshes: While outwardly they appear no different from the primitive objects you’ve been using as test
subjects so far, meshes are stored quite differently. Instead of being stored as a list of parameters used to
create a 3D object, meshes are stored as a collection of points in space. As such, they can take on an endless
variety of shapes but tend to take up a lot of hard drive space. In runtime memory, both types of objects take
up the same amount of space, so storage, and download time, become more important issues when deciding if
it is easier to create simple meshes in Unity or import them as collapsed meshes.
 Sub-Objects of a Mesh: Unity does not provide easy access to the sub-objects of a mesh, but you can affect
them through scripting, so it is worth looking into what makes a mesh.
 Vertex: A vertex is the smallest sub-object, a point in space. Since vertices are little more than locations, they
are not drawn. They can, however, contain information about color, opacity, and lighting, for example.
 Edges: Edges are the straight lines between vertices. It is worth noting that in most 3D applications, the
rendered result does not contain true curved lines or surfaces; rather, they are approximations of curves
created by a large number of smaller straight lines.
 Faces: The face, also referred to as a triangle, is the smallest renderable part of a mesh. It is defined by three
vertices, the edges that connect them, and the surface between them. A face also has what is called a normal,
to tell the engine on which side to render the face. Unless you’re using a shader that specifically indicates that
a face should be rendered on both sides, a face is drawn only on one side.
Overview of 3D Platform

 3D Objects
 Mapping : Whenever an object uses a texture, or image, as part of its
material, it needs mapping coordinates, to tell the renderer how to apply the
image to the object’s faces. Mapping can be as straightforward as a simple
planar projection or as complicated as multiple UV unwraps.
 Mapping coordinates are referred to as U, V, and W, where U represents one
side of the map and V represents the other edge. W is the axis of a face
normal and is of use when rotating the map about that axis.
Overview of 3D Platform

 Materials
 Materials are generally different in real-time engines than in their DCC counterparts. At best, simple materials with a
diffuse texture will import intact. Plan on spending time rebuilding materials with their shader counterparts, once
they’re in the engine. Most game engines have a particular process for best practices when dealing with imported
textures.
 Modern engines have shaders for many uses, so you can use your textures and masks to duplicate the more complex
materials from your DCC application.

 Creating Environments
 Open Unity if you have not already done so. It should open the BookProject project by default, unless you have
opened other projects since the last time you saved it. If it does not open the BookProject from the File menu, choose
Open Project and select it from the Open Project tab. You may also use the version available in the Chapter 4 folder
from the book’s downloadable package.
 If the project opened with TestScene1 loaded, go to File ➤ New Scene.
 From File ➤ Save Scene, save it as ➤TerrainTest.
 In the Project view, create a new folder and name it Scenes.
 Drag both the TestScene1 and TerrainTest scenes into the new folder.
Overview of 3D Platform

 Terrain Editor
 Creating a Terrain Object : With your folders tidied up, it’s time to create your first terrain.
 From the GameObject menu, CreateOther, near the bottom of the list, select Terrain.
 You will see that a Terrain object has been added to both the Scene and the Hierarchy views, with one of its corners
at 0,0,0.
 In the Inspector, with the Terrain object selected, you will see its properties and the tools available for refining it.
 Make sure you are using default, rather than Scene, lighting in the Scene view.
Overview of 3D Platform

 Player Character
 Player Character is set by importing 3d model and writing script.
 Player is a rigidbody, then we apply physics by rigidbody component.
 For Collision, we do it through colliders.
 Rest is the functionality script of the character.

 Interactions
 There are various kind of interaction depending on game to game. Few common ones are as follows:
 Camera Follow.
 Collision.
 Collection.
 Die.
 User Interaction.

 Camera
 There are generally two types of camera perspective and orthographic. In 3d, we use perspective camera.
 In a game there can be more than one camera. The first camera is known as MainCamera.
Overview of 3D Platform

 Camera
 Cameras are the devices that capture and display the world to the player. By
customizing and manipulating cameras, you can make the presentation of
your game truly unique. You can have an unlimited number of cameras in
a scene. They can be set to render in any order, at any place on the screen, or
only certain parts of the screen.
 Cameras are essential in the 3D world, as they act as the viewport for the
screen. Having a pyramid-shaped eld of vision, cameras can be placed at any
point in the world, animated, or attached to characters or objects as part of a
game scenario.
 With adjustable Field of Vision (FOV), 3D cameras are your viewport on the
3D world. In game engines, you'll notice that effects such as lighting, motion
blurs, and other effects are applied to the camera to help with game
simulation of a person's eye view of the world—you can even add a few
cinematic effects that the human eye will never experience, such as lens ares
when looking at the sun!
Overview of 3D Platform

 Unity3D concepts
 Unity makes the game production process simple by giving you a set of logical steps to build any conceivable
game scenario. Renowned for being non-game-type specific, Unity offers you a blank canvas and a set of
consistent procedures to let your imagination be the limit of your creativity. By establishing its use of the Game
Object (GO) concept, you are able to break down parts of your game into easily manageable objects, which are
made of many individual Component parts. By making individual objects within the game and introducing
functionality to them with each component you add, you are able to infinitely expand your game in a logical
progressive manner. Component parts in turn have variables—essentially settings to control them with. By
adjusting these variables, you'll have complete control over the effect that Component has on your object.
 The Unity way : If I wished to have a bouncing ball as part of a game, then I'd begin with a sphere. This can
quickly be created from the Unity menus, and will give you a new Game Object with a sphere mesh (a net of a
3D shape), and a Renderer component to make it visible. Having created this, I can then add a Rigid body. A
Rigidbody (Unity refers to most two-word phrases as a single word term) is a component which tells Unity to
apply its physics engine to an object. With this comes mass, gravity, and the ability to apply forces to the object,
either when the player commands it or simply when it collides with another object. Our sphere will now fall to
the ground when the game runs, but how do we make it bounce? This is simple! The collider component has a
variable called Physic Material—this is a setting for the Rigidbody, defining how it will react to other objects'
surfaces. Here we can select Bouncy, an available preset, and voila! Our bouncing ball is complete, in only a few
clicks.
Overview of 3D Platform

 Unity3D concepts
 This streamlined approach for the most basic of tasks, such as the previous example, seems pedestrian at rst. However,
you'll soon and that by applying this approach to more complex tasks, they become very simple to achieve. Here is an
overview of those key Unity concepts plus a few more.
 Assets : These are the building blocks of all Unity projects. From graphics in the form of image les, through 3D
models and sound files, Unity refers to the files you'll use to create your game as assets. This is why in any Unity
project folder all les used are stored in a child folder named Assets.
 Scenes: In Unity, you should think of scenes as individual levels, or areas of game content (such as menus). By
constructing your game with many scenes, you'll be able to distribute loading times and test different parts of your
game individually.
 Game Objects :When an asset is used in a game scene, it becomes a new Game Object—referred to in Unity terms—
especially in scripting—using the contracted term "GameObject". All GameObjects contain at least one component to
begin with, that is, the Transform component. Transform simply tells the Unity engine the position, rotation, and scale
of an object—all described in X, Y, Z coordinate (or in the case of scale, dimensional) order. In turn, the component
can then be addressed in scripting in order to set an object's position, rotation, or scale. From this initial component,
you will build upon game objects with further components adding required functionality to build every part of any
game scenario you can imagine.
 Components : Components come in various forms. They can be for creating behavior, defining appearance, and
influencing other aspects of an object's function in the game.
Overview of 3D Platform

 Unity3D concepts
By 'attaching' components to an object, you can immediately apply new parts of the game engine to your object.
Common components of game production come built-in with Unity, such as the Rigidbody component mentioned
earlier, down to simpler elements such as lights, cameras, particle emitters, and more. To build further interactive
elements of the game, you'll write scripts, which are treated as components in Unity.
 Scripts :While being considered by Unity to be Components, scripts are an essential part of game production, and
deserve a mention as a key concept. In this book, we'll write our scripts in JavaScript, but you should be aware that
Unity offers you the opportunity to write in C# and Boo (a derivative of the Python language) also. I've chosen to
demonstrate Unity with JavaScript, as it is a functional programming language, with a simple to follow syntax that
some of you may already have encountered in other endeavors such as Adobe Flash development in ActionScript or in
using JavaScript itself for web development. Unity does not require you to learn how the coding of its own engine
works or how to modify it, but you will be utilizing scripting in almost every game scenario you develop. The beauty
of using Unity scripting is that any script you write for your game will be straightforward enough after a few
examples, as Unity has its own built-in Behavior class—a set of scripting instructions for you to call upon. For many
new developers, getting to grips with scripting can be a daunting prospect, and one that threatens to put off new Unity
users who are simply accustomed to design only. I will introduce scripting one step at a time, with a mind to showing
you not only the importance, but also the power of effective scripting for your Unity games. To write scripts, you'll
use Unity's standalone script editor. On Mac, this is an application called Unitron, and on PC, Uniscite. These separate
applications can be found in the Unity application folder on your PC or Mac and will be launched any time you edit a
Overview of 3D Platform

 Unity3D concepts
new script or an existing one. Amending and saving scripts in the script editor will immediately update the script in
Unity. You may also designate your own script editor in the Unity preferences if you wish.
 Prefabs: Unity's development approach hinges around the GameObject concept, but it also has a clever way to store
objects as assets to be reused in different parts of your game, and then 'spawned' or 'cloned' at any time. By creating
complex objects with various components and settings, you'll be effectively building a template for something you
may want to spawn multiple instances of, with each instance then being individually modifiable. Consider a crate as
an example—you may have given the object in the game a mass, and written scripted behaviors for its destruction;
chances are you'll want to use this object more than once in a game, and perhaps even in games other than the one it
was designed for. Prefabs allow you to store the object, complete with components and current configuration.
Comparable to the MovieClip concept in Adobe Flash, think of prefabs simply as empty containers that you can fill
with objects to form a data template you'll likely recycle.
 The interface:The Unity interface, like many other working environments, has a customizable layout. Consisting of
several dockable spaces, you can pick which parts of the interface appear where. Let's take a look at a typical Unity
layout: There are five different elements you'll be dealing with:
• Scene [1]—where the game is constructed
• Hierarchy [2]—a list of GameObjects in the scene
• Inspector [3]—settings for currently selected asset/object
• Game [4]—the preview window, active only in play mode
• Project [5]—a list of your project's assets, acts as a library
Overview of 3D Platform
Overview of 3D Platform

 GUI and HUD


 GUI is known as graphical user interface and HUD is known as Heads-up display.
 It is generally done with the help of UI component.
 GUI where interacts with menus and the game. The HUD gives us the player information.
 They are created to provide communication between user and the game.
Overview of 3D Platform

 Summary

 What is Unity3D, where can we found it for download, how to install and why to choose unity.
 We have looked into the visual editor of Unity3D game engine.
 The concept of game object and assets are explained.
 How different windows helped us to set the game project in the game.
 We have studied each and every component of Unity3D visual editor and understand the importance of that.
Overview of 3D Platform

 Self Assessment Question

1. Unity is _______ engine.

A. Movie
B. Real time Rendering
C. Game
D. Prototyping

Answer:   C
Overview of 3D Platform

 Self Assessment Question

2. How many projections are there in camera ?

A. One
B. Two
C. Three
D. Four
Answer:   B
Overview of 3D Platform

 Self Assessment Question

3. Transformation refers to_______

A. Rotation.
B. Scaling
C. Position
D. All the Above

Answer:   D
Overview of 3D Platform

 Self Assessment Question

4. Which window helps you to tweak game objects?

A. Scene
B. Game
C. Project
D. Inspector

Answer:  D
Overview of 3D Platform

 Self Assessment Question

5. Which window helps you to keep all game assets?

A. Project
B. Inspector
C. Console
D. Game

Answer:   A
Overview of 3D Platform

 Self Assessment Question

6. Which window helps you to manage game object?

A. Inspector
B. Scene
C. Hierarachy
D. Project

Answer:   C
Overview of 3D Platform

 Self Assessment Question

7. Which window helps you to set game object?

A. Inspector
B. Scene
C. Hierarchy
D. Project

Answer:   B
Overview of 3D Platform

 Self Assessment Question

8. Which window helps you to see live preview of game?

A. Inspector
B. Scene
C. Hierarchy
D. Game

Answer:   D
Overview of 3D Platform

 Self Assessment Question

9. Which one of the following is a sub object of a mesh?

A. Edges
B. Faces
C. Vertex
D. All the above

Answer:   D
Overview of 3D Platform

 Self Assessment Question

10. How many languages does Unity supports?

A. Three.
B. Four.
C. One.
D. Two.

Answer:   A
Overview of 3D Platform

 Important Document Links

URL
https://docs.unity3d.com/Manual/index.html?_ga
=2.180328420.1538787447.1557986302-449436258.1553675397
https://learn.unity.com/tutorials
https://www.tutorialspoint.com/unity/index.htm
Overview of 3D Platform

 Books Links

URL
https://hienbkb.files.wordpress.com
/2013/10/beginning-3d-game-development-with-unity-4-2nd-edition.pdf
http://ds.nashobmenfiles.com/fo/get/2655976/Packt_Unity_Game_Development_Essentials_2009-wapdi
sk_ru.pdf
http://bayanbox.ir/view/587817006110901466/Unity-Android-Game-Development-by-Example.pdf
Overview of 3D Platform

Thank you

You might also like