SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Project:
Play 360 Videos in Unity
By Shanyuan Teng
https://github.com/tanyuan
http://tengshanyuan.com/
Basic Idea Sphere: 360 Video
Camera
Install Unity
Please note that different versions of Unity are not compatible. You should
export/import packages (.unitypackages) for cross versions. Export as packages
before updating your Unity.
For this example: 5.3.4f1 Personal
Create a project
Hierarchy
GameObjects
Inspector
GameObject
Components
Assets
Files
Unity is a 3D programming environment
Save the scene! (360Video.unity)
Unity might crash at any time so please Ctrl + S / Cmd + S frequently.
1. Place the main camera to the origin (0, 0, 0)
2. Create a big sphere called VideoSphere that
surrounds the camera
Unity default texture can only be seen
from outside, so we need a custom
shader to make inside texture visible.
A material contains a texture (what to render) and a shader
(how to render)
3. Create a folder Materials and create a material
(360Video)
Drag material 360Video to Inspector of VideoSphere
4. Create a folder Shaders and create a shader
(InsideVisible)
Double click to edit. Replace the code from the repo.
Drag InsideVisible to material of VideoSphere
5. Create a folder Videos, drag the video inside, and
drag it to the material as texture.
It might take a while importing videos to Assets. (even 10+ min)
Now we need to tell Unity to play the
video texture.
We use the built-in MovieTexture.
6. Create an empty GameObject and name it
VideoPlayback
Add a script VideoPlayback.cs to VideoPlayback
Add Component > Create a C Sharp script > Edit Script
Paste the code from the repo.
6. Drag VideoSphere to Sphere
Every public member will appear in Inspector.
7. Click play!
You can live adjust Main Camera Position and Rotation to find other Pokémon.
Any adjustment in Play mode will be lost.
Write down the value if you need to save for later use.
8. Play sound
Add Component > Audio Source > select Audio Clip as the same with the video
Stream from 360 camera
Ricoh Theta S as an example
1. Switch to LIVE mode on Theta S
While holding the camera icon button, press power button to go to LIVE stream
mode. Then connect it to computer via USB.
2. Install RICOH THETA UVC Blender (Mac, Win)
Richo Theta S captures dual fisheye views, while this driver can blend the two
views into a single equirectangular view.
即時串流應用程式 https://theta360.com/ct/support/download/
RICOH THETA S - Dual Fisheye (native) THETA UVC Blender - Equirectangular (with driver)
2. Add a script (WebCamStream) to VideoPlayback
Drag the VideoSphere and specify Camera Number.
Device 0: RICOH THETA S
Device 1: THETA UVC Blender
Device 2: FaceTime HD Camera
Play once and check Unity console:
Uncheck
Check
Note: 360 Video on mobile devices
Unity built-in MovieTexture does not support mobile platforms (iOS, Android).
AVPro Video plugin ($450) provides good support for mobile and high resolution
videos.

Contenu connexe

Tendances

【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作りUnite2017Tokyo
 
Xbox one development kit 2 copy
Xbox one development kit 2   copyXbox one development kit 2   copy
Xbox one development kit 2 copyrojizo frio
 
Xbox one development kit 2 copy
Xbox one development kit 2   copyXbox one development kit 2   copy
Xbox one development kit 2 copyrojizo frio
 
Narration ppt 2007
Narration ppt 2007Narration ppt 2007
Narration ppt 2007Khoa (K.A)
 
Ubuntu 10.04 Installation Guide
Ubuntu 10.04 Installation GuideUbuntu 10.04 Installation Guide
Ubuntu 10.04 Installation GuideRanjith Siji
 

Tendances (8)

【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
 
Xbox one development kit 2 copy
Xbox one development kit 2   copyXbox one development kit 2   copy
Xbox one development kit 2 copy
 
Xbox
XboxXbox
Xbox
 
Xbox one development kit 2 copy
Xbox one development kit 2   copyXbox one development kit 2   copy
Xbox one development kit 2 copy
 
Xboxppt
XboxpptXboxppt
Xboxppt
 
Sound effect 2 evidence
Sound effect 2 evidenceSound effect 2 evidence
Sound effect 2 evidence
 
Narration ppt 2007
Narration ppt 2007Narration ppt 2007
Narration ppt 2007
 
Ubuntu 10.04 Installation Guide
Ubuntu 10.04 Installation GuideUbuntu 10.04 Installation Guide
Ubuntu 10.04 Installation Guide
 

En vedette

RICOH THETA Meetup presentation Feb 28 2017
RICOH THETA Meetup presentation Feb 28 2017RICOH THETA Meetup presentation Feb 28 2017
RICOH THETA Meetup presentation Feb 28 2017THETA Unofficial Guide
 
InstaVR - RICOH THETA Meetup presentation Feb 28 2017
InstaVR - RICOH THETA Meetup presentation Feb 28 2017InstaVR - RICOH THETA Meetup presentation Feb 28 2017
InstaVR - RICOH THETA Meetup presentation Feb 28 2017THETA Unofficial Guide
 
Hdr Panoramic Photography
Hdr Panoramic PhotographyHdr Panoramic Photography
Hdr Panoramic PhotographyDavid Morris
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and CompressionMark Kilgard
 
An Introduction to Writing Custom Unity Shaders!
An Introduction to Writing  Custom Unity Shaders!An Introduction to Writing  Custom Unity Shaders!
An Introduction to Writing Custom Unity Shaders!DevGAMM Conference
 
Shader model 5 0 and compute shader
Shader model 5 0 and compute shaderShader model 5 0 and compute shader
Shader model 5 0 and compute shaderzaywalker
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With UnityMindstorm Studios
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupMark Kilgard
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - ShadersNick Pruehs
 
Shaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestShaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestBeMyApp
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Alexander Dolbilov
 
Vidéo 360°, nouvel outil d'engagement pour les marques ?
Vidéo 360°, nouvel outil d'engagement pour les marques ? Vidéo 360°, nouvel outil d'engagement pour les marques ?
Vidéo 360°, nouvel outil d'engagement pour les marques ? Vanksen
 
How to Podcast The Ultimate Guide to Podcasting by: John Lee Dumas
How to Podcast The Ultimate Guide to Podcasting by: John Lee DumasHow to Podcast The Ultimate Guide to Podcasting by: John Lee Dumas
How to Podcast The Ultimate Guide to Podcasting by: John Lee DumasJohn Dumas
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)contest-theta360
 
CSR and the new 2015 environment law in China (abstract) - Maverlinn
CSR and the new 2015 environment law in China (abstract) - MaverlinnCSR and the new 2015 environment law in China (abstract) - Maverlinn
CSR and the new 2015 environment law in China (abstract) - MaverlinnOlivier Coispeau
 
THETA S による身代わりテレビの実装(完結編)
THETA S による身代わりテレビの実装(完結編)THETA S による身代わりテレビの実装(完結編)
THETA S による身代わりテレビの実装(完結編)KatsuyaENDOH
 
Presentation to GPs at Yorkshire Clinic May 2016
Presentation to GPs at Yorkshire Clinic May 2016Presentation to GPs at Yorkshire Clinic May 2016
Presentation to GPs at Yorkshire Clinic May 2016Sanjay Verma
 

En vedette (20)

RICOH THETA Meetup presentation Feb 28 2017
RICOH THETA Meetup presentation Feb 28 2017RICOH THETA Meetup presentation Feb 28 2017
RICOH THETA Meetup presentation Feb 28 2017
 
InstaVR - RICOH THETA Meetup presentation Feb 28 2017
InstaVR - RICOH THETA Meetup presentation Feb 28 2017InstaVR - RICOH THETA Meetup presentation Feb 28 2017
InstaVR - RICOH THETA Meetup presentation Feb 28 2017
 
Hdr Panoramic Photography
Hdr Panoramic PhotographyHdr Panoramic Photography
Hdr Panoramic Photography
 
My theta experience
My theta experienceMy theta experience
My theta experience
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and Compression
 
An Introduction to Writing Custom Unity Shaders!
An Introduction to Writing  Custom Unity Shaders!An Introduction to Writing  Custom Unity Shaders!
An Introduction to Writing Custom Unity Shaders!
 
Shader model 5 0 and compute shader
Shader model 5 0 and compute shaderShader model 5 0 and compute shader
Shader model 5 0 and compute shader
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With Unity
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping Setup
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
 
Shaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestShaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the Best
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
 
Vidéo 360°, nouvel outil d'engagement pour les marques ?
Vidéo 360°, nouvel outil d'engagement pour les marques ? Vidéo 360°, nouvel outil d'engagement pour les marques ?
Vidéo 360°, nouvel outil d'engagement pour les marques ?
 
How to Podcast The Ultimate Guide to Podcasting by: John Lee Dumas
How to Podcast The Ultimate Guide to Podcasting by: John Lee DumasHow to Podcast The Ultimate Guide to Podcasting by: John Lee Dumas
How to Podcast The Ultimate Guide to Podcasting by: John Lee Dumas
 
Installations
InstallationsInstallations
Installations
 
Podcasting In Education
Podcasting In EducationPodcasting In Education
Podcasting In Education
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
 
CSR and the new 2015 environment law in China (abstract) - Maverlinn
CSR and the new 2015 environment law in China (abstract) - MaverlinnCSR and the new 2015 environment law in China (abstract) - Maverlinn
CSR and the new 2015 environment law in China (abstract) - Maverlinn
 
THETA S による身代わりテレビの実装(完結編)
THETA S による身代わりテレビの実装(完結編)THETA S による身代わりテレビの実装(完結編)
THETA S による身代わりテレビの実装(完結編)
 
Presentation to GPs at Yorkshire Clinic May 2016
Presentation to GPs at Yorkshire Clinic May 2016Presentation to GPs at Yorkshire Clinic May 2016
Presentation to GPs at Yorkshire Clinic May 2016
 

Similaire à Play 360 Videos in Unity

Qditor user guide for windows pc
Qditor user guide for windows pcQditor user guide for windows pc
Qditor user guide for windows pcQditor Video Editor
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - IntroductionFrancis Seriña
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineOrisysIndia
 
Free video editing software
Free video editing softwareFree video editing software
Free video editing softwareSmartPixel
 
Qditor pip user guide for windows pc
Qditor pip user guide for windows pcQditor pip user guide for windows pc
Qditor pip user guide for windows pcQditor Video Editor
 
Unity 3D
Unity 3DUnity 3D
Unity 3Dgema123
 
unity gaming programing basics for students ppt
unity gaming programing basics for students pptunity gaming programing basics for students ppt
unity gaming programing basics for students pptKathiriyaParthiv
 
Streaming Video into Second Life
Streaming Video into Second LifeStreaming Video into Second Life
Streaming Video into Second LifeVideoguy
 
Readmey
ReadmeyReadmey
ReadmeyKim Mi
 
Non interactive materials
Non interactive materialsNon interactive materials
Non interactive materialsu082929
 
Tenvis IPROBOT 3 English User Manual
Tenvis IPROBOT 3 English User ManualTenvis IPROBOT 3 English User Manual
Tenvis IPROBOT 3 English User ManualSecurityCameraTalk
 
adobe premiere pro.ppt
adobe premiere pro.pptadobe premiere pro.ppt
adobe premiere pro.pptVeronicGomez
 
【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...
【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...
【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...Unity Technologies Japan K.K.
 
Manual after effects us
Manual after effects usManual after effects us
Manual after effects usmiacademy
 
Windows Movie Maker 2010
Windows Movie Maker 2010Windows Movie Maker 2010
Windows Movie Maker 2010Ellery July
 
Moviemaker 09-22-2010 2
Moviemaker 09-22-2010 2Moviemaker 09-22-2010 2
Moviemaker 09-22-2010 2jose alvites
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game developmentJerel Hass
 

Similaire à Play 360 Videos in Unity (20)

Qditor user guide for windows pc
Qditor user guide for windows pcQditor user guide for windows pc
Qditor user guide for windows pc
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game Engine
 
Free video editing software
Free video editing softwareFree video editing software
Free video editing software
 
Qditor pip user guide for windows pc
Qditor pip user guide for windows pcQditor pip user guide for windows pc
Qditor pip user guide for windows pc
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Unity 3D
Unity 3DUnity 3D
Unity 3D
 
unity gaming programing basics for students ppt
unity gaming programing basics for students pptunity gaming programing basics for students ppt
unity gaming programing basics for students ppt
 
Streaming Video into Second Life
Streaming Video into Second LifeStreaming Video into Second Life
Streaming Video into Second Life
 
Readmey
ReadmeyReadmey
Readmey
 
Readme
ReadmeReadme
Readme
 
Non interactive materials
Non interactive materialsNon interactive materials
Non interactive materials
 
Tenvis IPROBOT 3 English User Manual
Tenvis IPROBOT 3 English User ManualTenvis IPROBOT 3 English User Manual
Tenvis IPROBOT 3 English User Manual
 
adobe premiere pro.ppt
adobe premiere pro.pptadobe premiere pro.ppt
adobe premiere pro.ppt
 
【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...
【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...
【Unite Tokyo 2018】“100 Must-see Assets for 2018” by Virtual YouTuber, Cyber G...
 
JS Days Mobile Meow
JS Days Mobile MeowJS Days Mobile Meow
JS Days Mobile Meow
 
Manual after effects us
Manual after effects usManual after effects us
Manual after effects us
 
Windows Movie Maker 2010
Windows Movie Maker 2010Windows Movie Maker 2010
Windows Movie Maker 2010
 
Moviemaker 09-22-2010 2
Moviemaker 09-22-2010 2Moviemaker 09-22-2010 2
Moviemaker 09-22-2010 2
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game development
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Dernier (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Play 360 Videos in Unity

  • 1. Project: Play 360 Videos in Unity By Shanyuan Teng https://github.com/tanyuan http://tengshanyuan.com/
  • 2. Basic Idea Sphere: 360 Video Camera
  • 3. Install Unity Please note that different versions of Unity are not compatible. You should export/import packages (.unitypackages) for cross versions. Export as packages before updating your Unity. For this example: 5.3.4f1 Personal
  • 6. Save the scene! (360Video.unity) Unity might crash at any time so please Ctrl + S / Cmd + S frequently.
  • 7. 1. Place the main camera to the origin (0, 0, 0)
  • 8. 2. Create a big sphere called VideoSphere that surrounds the camera
  • 9. Unity default texture can only be seen from outside, so we need a custom shader to make inside texture visible. A material contains a texture (what to render) and a shader (how to render)
  • 10. 3. Create a folder Materials and create a material (360Video)
  • 11. Drag material 360Video to Inspector of VideoSphere
  • 12. 4. Create a folder Shaders and create a shader (InsideVisible)
  • 13. Double click to edit. Replace the code from the repo.
  • 14. Drag InsideVisible to material of VideoSphere
  • 15. 5. Create a folder Videos, drag the video inside, and drag it to the material as texture. It might take a while importing videos to Assets. (even 10+ min)
  • 16. Now we need to tell Unity to play the video texture. We use the built-in MovieTexture.
  • 17. 6. Create an empty GameObject and name it VideoPlayback
  • 18. Add a script VideoPlayback.cs to VideoPlayback Add Component > Create a C Sharp script > Edit Script
  • 19. Paste the code from the repo.
  • 20. 6. Drag VideoSphere to Sphere Every public member will appear in Inspector.
  • 21. 7. Click play! You can live adjust Main Camera Position and Rotation to find other Pokémon.
  • 22. Any adjustment in Play mode will be lost. Write down the value if you need to save for later use.
  • 23. 8. Play sound Add Component > Audio Source > select Audio Clip as the same with the video
  • 24. Stream from 360 camera Ricoh Theta S as an example
  • 25. 1. Switch to LIVE mode on Theta S While holding the camera icon button, press power button to go to LIVE stream mode. Then connect it to computer via USB.
  • 26. 2. Install RICOH THETA UVC Blender (Mac, Win) Richo Theta S captures dual fisheye views, while this driver can blend the two views into a single equirectangular view. 即時串流應用程式 https://theta360.com/ct/support/download/ RICOH THETA S - Dual Fisheye (native) THETA UVC Blender - Equirectangular (with driver)
  • 27. 2. Add a script (WebCamStream) to VideoPlayback Drag the VideoSphere and specify Camera Number. Device 0: RICOH THETA S Device 1: THETA UVC Blender Device 2: FaceTime HD Camera Play once and check Unity console: Uncheck Check
  • 28. Note: 360 Video on mobile devices Unity built-in MovieTexture does not support mobile platforms (iOS, Android). AVPro Video plugin ($450) provides good support for mobile and high resolution videos.