Difference between revisions of "Digital technologies/Virtual reality/Unity Project Resources"
m |
|||
Line 1: | Line 1: | ||
− | = | + | = Unity Software = |
Unity is a cross-platform game engine that can be used to create games, apps and experiences in 2D or 3D. In this section, resources on the Unity Software can be found covering Virtual Reality Projects, Augmented Reality, and 3D Projects in Unity. | Unity is a cross-platform game engine that can be used to create games, apps and experiences in 2D or 3D. In this section, resources on the Unity Software can be found covering Virtual Reality Projects, Augmented Reality, and 3D Projects in Unity. | ||
Revision as of 17:03, 6 June 2024
Unity Software
Unity is a cross-platform game engine that can be used to create games, apps and experiences in 2D or 3D. In this section, resources on the Unity Software can be found covering Virtual Reality Projects, Augmented Reality, and 3D Projects in Unity.
1.1. General
In this section, we will cover general Unity Information that carries across all projects in Unity. This section covers Getting Started, Scripting in Unity, Character Animations, Movements, Objects, and User Interface, Environment, Cameras, Sounds & Story Telling, and Design Day Preparation.
1.1.1. Getting Started
Unity can be intimidating to new users. To start, we have provided links to installation and to cover the basics.
1.1.1.1. Installation
Below is a link to the Unity Products page where you can download and install the Unity Game Engine Editor. The second link is a tutorial on how to install the Unity Game Engine Editor.
https://unity.com/products/unity-student
https://www.youtube.com/watch?v=DDPd2UKnoaU&ab_channel=HelpfulOnline
1.1.1.2. Unity Hub / Modules
Modules are optional components you can use to tailor your editor installation. You can limit the Editor download/install size if you select only the modules that you require. Below is a link that explains how to add or remove modules from unity installs.
https://docs.unity3d.com/2020.2/Documentation/Manual/GettingStartedAddingEditorComponents.html
1.1.1.3. Unity User Interface
The Unity User Interface (UI) comprises of visual elements and controls allowing interactions between you and the game. Below is an image of the Unity UI and a link that explains the basics of using the Unity Game Editor.
https://docs.unity3d.com/Manual/UsingTheEditor.html
1.1.1.4. Assets
Assets in Unity are objects that you use to create your game. They can be 3D models, characters, textures or 2D graphics. They can be either obtained for free or purchased from the Unity Asset Store.
· Unity Asset Store: https://assetstore.unity.com/
· Downloading Assets Unity: https://support.unity.com/hc/en-us/articles/210112873-How-do-I-download-an-asset
· More Assets: https://devassets.com/
· Installing Assets: https://www.youtube.com/watch?v=AzItMI583kY&ab_channel=Dr.AfiqahHashim
1.1.1.5. Plug-Ins / Package Manager
In Unity, you normally use scripts to create functionality, but you can also include code created outside Unity in the form of a plug-in. Packages deliver a wide range of enhancements to Unity through the Package Manager. To help find and use these packages, the Package Manager window provides collections of packages that you can use together, called feature sets.
· Package Manager Info: https://docs.unity3d.com/Manual/Packages.html#:~:text=The%20Package%20Manager%20also%20supports,examples%2C%20tutorials%20and%20Editor%20extensions.
· How to use Package Manager: https://www.youtube.com/watch?v=gWNBzMNFTqc&ab_channel=TurboMakesGames
· Plug-Ins Info: https://docs.unity3d.com/Manual/Plugins.html
1.1.2. Scripting in Unity
Scripting is an essential ingredient in all applications you make in Unity. Most applications need scripts to respond to input from the player and to arrange for events in the gameplay to happen when they should. Beyond that, scripts can be used to create graphical effects, control the physical behavior of objects or even implement a custom AI system for characters in the game. The language used is C# (C-sharp). The IDE used is Visual Studio Code which gets installed by default when you install Unity.
1.1.2.1. Scripting in Unity
Scripting Info: https://docs.unity3d.com/Manual/ScriptingSection.html
1.1.2.2. Creating a New Script
Creating a New Script: https://www.youtube.com/watch?v=9tMvzrqBUP8
1.1.2.3. What is C#
What is C#: https://dotnet.microsoft.com/en-us/learn/csharp
1.1.2.4. Python & Unity
· What is Python? : https://gamedevacademy.org/python-programming-for-beginners-2/
· Sending Data from Python to Unity (TCP Socket): https://www.youtube.com/watch?v=Dm0CiAiZk14&ab_channel=Conor
· Python Scripting Package: https://docs.unity3d.com/Packages/com.unity.scripting.python@7.0/manual/index.html
1.1.3. NPC Characters, NPC Character Animations, Movements, Objects, and User Interface
In Unity we often want to introduce other characters and objects. In most cases we want these characters to move, objects to be interactable, or assign materials to items to change its appearance. Maybe we want a regular 2D menu screen. In this section, we will cover the general uses for these features that will remain the same across VR, AR, and 3D projects.
1.1.3.1. Materials
· Info: https://docs.unity3d.com/Manual/Materials.html
· Video Tutorial: https://www.youtube.com/watch?v=aiTl7B2xTmA&ab_channel=TheRealTimeEssentials
1.1.3.2. NPC Characters and Modeling
NPC Characters and other Models can be downloaded from the Unity Asset Store or other online data bases.
· Realistic NPC Characters: https://www.youtube.com/watch?v=va-qyFa312g&t=10s
· Adding Character Models to Unity: https://www.youtube.com/watch?v=Q8lJpoUwaBA&ab_channel=Fui
1.1.3.3. NPC Character Animation & Movement
· Animating Characters (Unity Animator): https://www.youtube.com/watch?v=vApG8aYD5aI&ab_channel=iHeartGameDev
· Animating Animals: https://www.youtube.com/watch?v=fmp1t5Ug5CI
1.1.3.3.1. Mixamo
Mixamo is a website that you can download animations from and incorporate into your Unity project.
· Mixamo: https://www.mixamo.com/#/
· Tutorial: https://www.youtube.com/watch?v=Vsj_UpnLFF8&ab_channel=BMo
1.1.3.4. Universal User Movement (Using Mouse and Keyboard)
In most projects, it is useful to be able to control the user with the mouse and keyboard as it can save time in development. It is useful in the development phase so that you can test your game without the need of putting on/off a VR headset for example. The controls can still be implemented for 3D projects too if desired.
· First-Person: https://www.youtube.com/watch?v=f473C43s8nE&ab_channel=Dave%2FGameDevelopment
· Third-Person: https://www.youtube.com/watch?v=UCwwn2q4Vys&ab_channel=Dave%2FGameDevelopment
1.1.3.5. Menu Screen / User Interface
In all projects, you will want some type of menu screen. There are many different ways to do this. Below is a link to a basic menu start screen.
https://www.youtube.com/watch?v=DX7HyN7oJjE&ab_channel=RehopeGames
1.1.3.6. Trigger Zones
In VR games and Experiences, sometimes we want events to occur when passing through a certain point or when an object/character passes through a point. For example, a sound effect goes off when passing through a doorway, or narration continues once user completes a task. Below is a video explaining how you can implement this.
https://www.youtube.com/watch?v=p1ZgS2z-LTs&ab_channel=passivestar
1.1.4. Environment
This section focuses on the 3D Environment in which the VR game will be taking place. This includes World Building, Skybox, and Lighting.
1.1.4.1. World Building
World Building encompasses everything that includes attaining assets to create your in-game world.
· Using Pro-Builder: https://www.youtube.com/watch?v=Lqhn0Hl8e_Y&t=25s
· Terrains: Unity - Manual: Creating and editing Terrains (unity3d.com)
· Building a simple 3D Environment: https://www.youtube.com/watch?v=saa9zxgCMu4&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=3&ab_channel=ValemTutorials
1.1.4.2. Skybox
The desired ambience for your game can be created using the skybox. It is the background of the world and as the name suggests, the sky.
· Replacing default skybox in Unity: SMBMonth_CA_SMBPurchase_PROS_YT_Video_15s_16x9 (youtube.com)
· Manual: Unity - Manual: Skybox (unity3d.com)
1.1.4.3. Lighting
Lighting in Unity approximates how light behaves in the real world, contributing to realistic scenes.
· Info: https://docs.unity3d.com/Manual/LightingInUnity.html
· Lighting Tutorial: https://www.youtube.com/watch?v=VnG2gOKV9dw&list=PLPV2KyIb3jR5QFsefuO2RlAgWEz6EvVi6&index=20
· Environment Basic Lighting (@9:30): https://www.youtube.com/watch?v=saa9zxgCMu4&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=3&ab_channel=ValemTutorials
1.1.5. Cameras, Cinemachine, and Unity Recorder
This section focuses on Cameras in Unity, covering general Camera information, Cinemachine, and Unity Recorder.
1.1.5.1. Cameras
· Info: https://docs.unity3d.com/351/Documentation/Manual/Cameras.html
1.1.5.2. Cinemachine
Used to make cinematic trailers for game or application.
· Info: https://unity.com/unity/features/editor/art-and-design/cinemachine
· Tutorial / Showcase: https://www.youtube.com/watch?v=x6Q5sKXjZOM&list=PLX2vGYjWbI0TQpl4JdfEDNO1xK_I34y8P&ab_channel=Unity
· Tutorial: https://www.youtube.com/watch?v=XT6mUlpO4fA&ab_channel=iHeartGameDev
1.1.5.3. Unity Recorder
The Unity Recorder is used to record gameplay in the unity editor.
· Info: https://docs.unity3d.com/Packages/com.unity.recorder@2.0/manual/index.html
· Tutorial: https://www.youtube.com/watch?v=-W27WCobILI&ab_channel=SpeedTutor
1.1.6. Sounds & Story Telling
This section focuses on Sound Effects, Dialogue, and the powerful tool in Unity called the Timeline.
1.1.6.1. Sound Effects
· Info: https://learn.unity.com/tutorial/working-with-audio-components-2019-3
· Free audio files: https://learn.unity.com/tutorial/working-with-audio-components-2019-3
1.1.6.2. Dialogue / Narration
Dialogue can be useful when delivering information and guiding players throughout the game.
· Tutorial: https://www.youtube.com/watch?v=8oTYabhj248
· Narrative story using timeline: https://www.youtube.com/watch?v=AJBb-PA-nAk&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=9&ab_channel=ValemTutorials
1.1.6.3. Timeline
Use the Timeline window to create cut-scenes, cinematics, and game-play sequences by visually arranging tracks and clips linked to GameObjects in your Scene.
· Info: https://docs.unity3d.com/Packages/com.unity.timeline@1.2/manual/tl_about.html
· Video Intro: https://www.youtube.com/watch?v=G_uBFM3YUF4&ab_channel=Brackeys
· Video Tutorial: https://www.youtube.com/watch?v=42QZ3aUDnV0&list=PLmXKnJbgQ2cqGG4WwuE43L-kwmb3C0-1x&ab_channel=Unity
· Narrative Story Using Timeline: https://www.youtube.com/watch?v=AJBb-PA-nAk&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=9&ab_channel=ValemTutorials
1.1.7. Design Day Preparation
This section covers everything you need to prepare for Design Day to complete successfully.
1.1.7.1. Building/Exporting as a Game (.exe file)
Before Design Day, we recommend building your unity project as a launchable program on all of the MakerSpace laptops. This way on design day, no matter what laptop you are using, you will be able to demonstrate your functioning game. This will complete your project.
· Tutorial: https://www.youtube.com/watch?v=7nxKAtxGSn8&ab_channel=Brackeys
1.1.7.2. Transferring Project from one PC to another
· Tutorial: https://www.youtube.com/watch?v=ozVkcEfnlwI&ab_channel=WasayTechTips
1.2. Virtual Reality (VR) in Unity
In this section we will cover Unity features that will be specific for VR projects in Unity.
1.2.1. User Interface in VR
In VR projects, we can introduce a new way to interact with a User Interface. It is an in-game UI / menu that has a lot of different applications.
· Tutorial: https://www.youtube.com/watch?v=yhB921bDLYA&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=8&ab_channel=ValemTutorials
· Tutorial #2: https://www.youtube.com/watch?v=6WfowlZ51i8&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=11&ab_channel=ValemTutorials
1.2.2. User Movement and Interactions in VR
In VR there are a few different ways for the user to navigate the game/experience. This can be done by teleporting or moving continuously.
1.2.2.1. User Movement in VR
· Continuous Movement: https://www.youtube.com/watch?v=0VowAem2aMM&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=4&ab_channel=ValemTutorials
· Teleportation: https://www.youtube.com/watch?v=9pVdiBogmew&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=5&ab_channel=ValemTutorials
Note: In this video, the developer makes a mistake which he fixes in his next episode.
· More Teleportation and Continuous movement: https://www.youtube.com/watch?v=54J_mWO_gQ8&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=6&ab_channel=ValemTutorials
1.2.2.2. User Interactions in VR
In VR games and VR Experiences, Users often interact with objects or other characters. In this section some links are available to explore how to interact with objects and characters.
· Grabbing objects and applying physics: https://www.youtube.com/watch?v=apzZ5Tma7Sg
https://www.youtube.com/watch?v=0xt6dACM_1I&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=6&ab_channel=ValemTutorials
· Input and Hand Presence: https://www.youtube.com/watch?v=8PCNNro7Rt0&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=3&ab_channel=ValemTutorials
· Distance Grab: https://www.youtube.com/watch?v=nowlPXuPEG8&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=7&ab_channel=ValemTutorials
· Buttons and Socket Interactor: https://www.youtube.com/watch?v=pMOHX1qD2bE&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=7&ab_channel=ValemTutorials
· Ladder, Wheel, and Lever: https://www.youtube.com/watch?v=eX-jXuMQdps&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=8&ab_channel=ValemTutorials
1.3. Augmented Reality (AR) in Unity
In this section we will cover Unity features that will be specific for AR projects in Unity.
· Info: https://unity.com/solutions/xr/ar
1.3.1. Getting Started with AR Foundation
· Tutorial: https://www.youtube.com/watch?v=FWyTf3USDCQ
1.3.2. AR Setup for iOS and ANDROID
· Android: https://www.youtube.com/watch?v=0mpsiO2lCx0&list=PL6VJLOFcTt7awvyIGIbLLPOBrW6-Y1R-J&index=1&ab_channel=DineshPunni
· iOS: https://www.youtube.com/watch?v=eu_eG0eTFlA&list=PL6VJLOFcTt7awvyIGIbLLPOBrW6-Y1R-J&index=2&ab_channel=DineshPunni
1.3.3. Image Tracking in AR
· Tutorial: https://www.youtube.com/watch?v=o_z_Eb8Yh2g&list=PL6VJLOFcTt7awvyIGIbLLPOBrW6-Y1R-J&index=3&ab_channel=DineshPunni
· Info: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/manual/tracked-image-manager.html
1.3.4. User Interactions
· Plane Detection: https://www.youtube.com/watch?v=uWWiYfPTUtU&list=PL6VJLOFcTt7awvyIGIbLLPOBrW6-Y1R-J&index=4&ab_channel=DineshPunni
· Placing Objects in AR: https://www.youtube.com/watch?v=xguiSueY1Lw&list=PL6VJLOFcTt7awvyIGIbLLPOBrW6-Y1R-J&index=5&ab_channel=DineshPunni
1.4. 360 Video Experience in Unity
In Unity, it is possible to create 360 interactable video experiences.
1.4.1. Getting Started
· Unity Tutorial Playlist: https://www.youtube.com/playlist?list=PLX2vGYjWbI0TifrTlupfrJeLa7c8LunUf
2. Physical Equipment
In this section, resources on the physical equipment found in the lab can be found.
2.1. VR Headset and Controllers
This section mainly focuses on the VR Headset and Controllers, covering Configuration and Connecting to Unity. They can be found in the Makerspace. We will be using the Meta Quest 2.
2.1.1. Configuration
· Setup: How To Setup VR Development in Unity 2022.2 with a Quest 2 (XR Interaction Toolkit 2.1) - YouTube
2.1.2. Connecting to Unity and Headset Plug-Ins
· Unity Headset and Controller Connectivity Tutorial: https://www.youtube.com/watch?v=pm9W7r9BGiA&list=PLpEoiloH-4eM-fykn_3_QcJ-A_MIJF5B9&index=2&ab_channel=ValemTutorials
· Unity Headset and Controller Connectivity Tutorial 2: https://www.youtube.com/watch?v=HhtTtvBF5bI&list=PLpEoiloH-4eP-OKItF8XNJ8y8e1asOJud&index=3&ab_channel=ValemTutorials
· Meta Quest 2 Set-Up in Unity: https://www.youtube.com/watch?v=tGZgJ5XtOXo&ab_channel=Meetras
3. Sharing Files
As these projects are done in groups, file sharing is extremely crucial. Below you can find a couple ways to share files in Unity.
3.1. Physical with USB
The simplest way to share files with group members is to transfer projects onto a USB stick and physically store the project.
· Wiki: https://discussions.unity.com/t/save-to-flash-drive/38346
· YouTube Tutorial: https://www.youtube.com/watch?v=ozVkcEfnlwI&t=3s&ab_channel=WasayTechTips
3.2. Digitally with GitHub
GitHub is a tool used to allow collaboration between people working on the same project. In this section, some resources on Cloud Sharing and GitHub repositories can be found.
3.2.1. Setup
· Info: https://unityatscale.com/unity-version-control-guide/how-to-setup-unity-project-on-github/
· Unity and GitHub Repository Setup: https://www.youtube.com/watch?v=tTIlDb71t2s&ab_channel=Garnet
· GitHub desktop app: GitHub Desktop | Simple collaboration from your desktop
4. More!
· Free Course: https://academy.zenva.com/product/unity-101-game-engine-foundations/
· Best Practices for UI in VR: https://learn.unity.com/tutorial/best-practices-for-user-interfaces-ui-in-vr-with-the-xr-interaction-toolkit