Introducing Unity – Harper Lecture Notes 02-17

Introducing Unity – Harper Lecture Notes 02-17


5:15–5:30 #VRStorytelling Finds

5:30–5:45 Ben Farr Presentation

5:45–7:00 Getting to Know Unity

  • Today you will create your first CGI scene. If you get lost, everything I'm showing is in this video tutorial so you can watch it after class.
  • But first, let's see Harvest of Change, which Prof. Dan worked on at Gannett Digital.
  • Walk through the Mac downloadable version.
  • We'll look at the scene in Unity.
  • Missed something? Check out the video tutorial.
  • Sketch of today's tutorial is live here, updated weekly.

Time to get a tad more juicy! 

Your first scene won't be anywhere near as complex as Harvest of Change, which took 3 months to create. But all of the basic elements you pull together will be essentially the same. We'll go through the following steps together.

Sign In
- Use your free Unity account, which you can do here.

Create a new project
- Make sure 3D is selected
- Click Asset Packages and check these: Cameras, Characters, Environment
- Wait for everything to load

Make a Terrain
- GameObject > 3D Object > Terrain
- Texture your terrain. Inspector > Paintbrush > Edit Textures > Add Texture. Then select the Texture on the left. Add Grass and Rock or Sand.

Add a sky
- Find a free skybox in the Unity Asset Store (Window > Asset Store, then search for Skybox).
- Open lighting settings (Window > Lighting).
- Select the circle next to the skybox.
- Search for sky. Select the skybox you downloaded.

Add a First Person Controller
- Project pane > Assets > Character Controllers > First Person Controller
- Position the character controller so that it doesn’t fall through the earth. Hit play and move around.

Add lighting
- Game object > Light > Directional light.
- Move the light and character controller to the center of the grid.
- Move the light’s orientation and see how it affects shadows.
- Add a point light. Use coordinates in inspector to position it right where your controller is.
- Push Play and move around.

Add an object to the scene
- Windows > Asset Store and log in with your Unity account.
- Find a free asset and import it.
- Position the asset’s “Prefab" in the scene.

Model your terrain
- Click the terrain
- Inspector > mountain tools. You can reverse anything you do with mountains by holding down Shift while you click the terrain.
- Be sure to reposition your character controller or you may fall through the earth at play! And that’s no fun.
- Paint the mountains with a different texture

Add more assets
- Go through the Unity asset store and find more assets the import. Add at least 3 more.

Add some sounds
- Go to FreeSounds or SoundJay and download some Wave or MP3 files.
- Copy them to the Assets directory in the Project pane.
- Find the sound, then drag it to an object in your scene.

Build a Mac or PC standalone app
- File > Build Settings > PC,Mac & Linux Standalone
- Choose Mac or PC and click Build
- Save the file to your desktop
- Copy to a flash drive and then copy to your own laptop. You can run it from there.

7-7:15 Let's show what you've created so far.

Anyone who wants to show off their creation can connect to the big monitor via Airplay.

7:15-8: Work on Assignment 5

Assignment 5 is to create a cohesive scene. Due Feb. 23.

BONUS! Set it up for Walkaround in the HTC Vive

- Go to the Asset store and add the SteamVR plugin.
- Open your First Person Controller and select the camera inside.
- In the Inspector, click Add Component, then search for SteamVR Script.
- After the script is added, click the Expand button underneath it.
- Save Scene, and Save Project.
- Close Unity.
- Find the project folder on your computer and copy it to your flash drive.
- Bring that to the innovation lab and we'll load it up so you can walk around what you created.

Associate Professor

Ken Harper is an Associate Professor at the S.I. Newhouse School of Public Comunications and Director of the Newhouse Center for Global Engagement.

No related post

COMMENTS

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.