Upload
kobkrit-viriyayudhakorn
View
117
Download
2
Embed Size (px)
Citation preview
Lecture 1: Introduction to VR ProgrammingDr. Kobkrit Viriyayudhakorn
iApp Technology [email protected]
ITS488 (Digital Content Creation with Unity - Game and VR Programming)
Course Instructor• Prof. Shigekazu SAKAI
• School of Fundamental Science and Engineering, Waseda University.
• Digital Image Expression
• Computer graphics and animation
• Scientific visualization
• Web content design
Course Instructor
• Dr. Kobkrit Viriyayudhakorn
• Creator of CS_UNTITLED / CS_UNTITLED2in Counter Strike 1.6 Game
• Make a few retro game.
• Joined the GlobalGameJam2013@Japan
• Love playing game, as well as making it too.
Prof. SAKAI’s course content• Lecture 1: Introduction to Virtual Reality and its Application
• Lecture 2: Principle of Computer Graphic, Elements, and Structure of Digital Content.
• Lecture 3: Audio/Visual Design
• Lecture 4: Improvement of Image Quality by using GLSL
• Lecture 5: Learn Unity Interface and Work-flow of VR content development
• Lecture 6: Computer Graphic Programming (Basic of C.G.)
• Lecture 7: VR Programming
Dr. Kobkrit’s Course Content• Lecture 1: Introduction to VR Programming + Unity Installation + Tryout + Game
Design
• Lecture 2: C# Programming (Part 1)
• Lecture 3: C# Programming (Part 2)
• Lecture 4: Basketball VR Game (Part 1)
• Lecture 5: Basketball VR Game (Part 2)
• Lecture 6: Squashy Toad (Part 1)
• Lecture 7: Squashy Toad (Part 2)
Grading Policy and Books
Kobkrit’s Part Books:Unity Game Development in 24 Hours, Sams Teach Yourself (2nd Edition)
by Ben Tristem (Author), Mike Geig (Author)
Tools that you need.
• PC / Laptop (Already Provided in the Lab room).
• A Phone (iOS/Android) and a phone cable.
• Google Cardboard with a shooting button.
• Please get one at https://vr.google.com/cardboard/get-cardboard/
Device Price Resolution
Google Cardboard $20 + phone 1280x768 to 2560×1440
Samsung Gear VR $99 + phone 2560×1440
Google Daydream $79 + phone ??
Hololens $3000 ??
VR Mobile Platforms
Device Price Resolution
Oculus Rift CV1 $599 2160×1200
PlayStation VR (Morpheus) $399 1920x1080
HTC Vive (SteamVR) $799 2160x1200
OSVR $299 2160 x 1200
VR Desktop Platforms
TV
30°
Field of View (FOV)
VR
~100°
Field of View (FOV)
Device Resolution Field of View Pixels per Degree
Google Cardboard 1280x768 to 2560×1440 <90 degrees 7-14
Samsung Gear VR 2560×1440 96 degrees 13
Oculus Rift CV1 2160×1200 110 degrees 10
PlayStation VR (Morpheus) 1920x1080 100 degrees 10
HTC Vive 2160x1200 110 degrees 10
Device Performance Sickness Degrees of Freedom Interactions
Google Cardboard Phone hardware Minimal 3 One button
Samsung Gear VR Phone hardware Some 3 trackpad (option controllers)
Oculus Rift CV1 High-end PC Minimal 6 (partial)Xbox controller
(2 hand-held controllers later)
PlayStation VR (Morpheus) PlayStation 4 Minimal 6 (partial) PS Move Controllers
HTC Vive High-end PC Minimal 6 2 hand-held controllers
Device Development Environment Platforms Marketplace
Google Cardboard OSX, Windows iOS, Android App Store, Google Play
Samsung Gear VR OSX, Windows Android Google Play, Oculus Share
Oculus Rift CV1 Windows Windows Oculus Share, Steam, direct
PlayStation VR (Morpheus) Closed developer program PlayStation 4 PlayStation Store
HTC Vive Windows Windows Steam, direct
Game Design & Plan
• Create a rough plan
• Define player’s problem
• Brainstorming concept, rules & requirement
• Document possible future ideas.
User’s Problem
• Boredom
• I want to challenge myself.
• Want to beat my friends.
Concept
• You are a miner and you want to find a gold pit.
• All you know is your distance between yourself and the gold pit from a gold-o-metric detector.
Rules
• You can move up, down, left, and right.
• Movement is a fixed distance.
• After each turn, your distance from the gold pit is displayed.
• You win when you get the gold pit.
• Your score is how many turns it took.
Write the game requirement
• What assets will you need?
• How much sound effects?
• What artworks will you need?
• What features will you leave out?
Requirements
• Introduction and story text.
• Some ASCII artwork.
• No sounds.
Future Ideas (Leave out List)
• Graphical Interface.
• Sound effects.
• Mouse Input.
What is ?• Unity is a game engine developed by Unity Technologies.
• Used for developing Video games and simulation.
• Cross-Platform! the game be deploy to 27 operating systems!! as shown on the right =>
• iOS, Android, Mac, Windows, Linux, Oculus Rift, Web, ....
• First Released in 2005, Latest Stable release: 2017.1 on July 1, 2017
Unity Licensing
- CCU stand for ConCurrent Users worldwide.
Installing Unity 5.3.8
• https://unity3d.com/get-unity/download/archive
Double Click Select all default option.
Password: Student
Tryout: Create a new Project
Play around change windows as you wish.
Reset Window Layout Back to Default
• Go to top right, Select Layout.• Select "Default"
Scene Screen
• Right Click Drag: Move Around
• Middle Click Drag: Pan Around
Top-bar View
Hierarchy Windows
• Show the hierarchy of 3d objects in the Scene.
• You can select objects from either scene or hierarchy windows and do some operation to it at the Inspector windows.
• You can search objects by typing the name into the search box.
Inspector Windows
• Usually on the right panel of the screen.
• Showing the various property of the selected objects.
• You can read and modify any object’s property.
• Try to select different object property and see how it changes.
Console Windows
• At the bottom, the second tap.
• Print out the text, console out.
• We are going to make a game via Text Console.
• Not yet need to use the 3D object.
Project View
• Show all files and assets used in the project.
• You can save them as the favorites for easily access later.
– Kobkrit V.
“Let start making a game”
Let’s create the first script!
Right click at Project Window Name it as "ConsolePrinter"
Start writing a code• Double Click at the ConsolePrinter.cs
• The MonoDevelop-Unity IDE will be show up and you can make the first program.
Code structure
Printing a Text
Important Notice.
In C#, Name in the filename must be the same with the name of the class.
How can we run?
• We need to add the script (as a component) to the game objects.
• In order to be run, Script (and other game components) need to be attach to the game objects.
Create a New Game Object
Right click Select
Rename + Enter
Inspect Window on the right.
Attaching Script to A Game Object1. Drag the
ConsolePrinter script and drop onto ConsolePrinterGO in Hierarchy Window
2. Or Drag onto Inspector Window
Start Running
• Click on Run Button
• Switch to Console Window, you will see "Hello World!" text.
Try to Remove the Script from Game Object
• At the inspector panel, try to click at the little gear next to the component (script) name.
• Select "Remove Component"
• Try to hit "Run" button again.
• What happen?
• Don’t forget to re-attach into the game component.
Making the Game Introduction
1. Add the game introduction Text 2. Hit "Run" Button 3. Game Introduction is shown!
Making your own game introduction!
Q/A