SlideShare a Scribd company logo
EnhancingYour Unity MobileVR
Experience
Roberto Lopez Mendez
Senior Software Engineer,ARM
DevGAMM – Minsk
10/12/2015
© ARM 20152
 Ice Cave Demo
 Optimized effects: Notes about the ARM Guide For Unity Developers
 Porting Ice Cave Demo to Samsung GearVR
 The changes required forVR
 ImprovingVR performance, dynamic shadows based on local cubemaps
Agenda
© ARM 20153
Demo Ice Cave
© ARM 20154
 First released at Unite Seattle 2014
 Initial idea: write about the experience of learning Unity from scratch
 Available for free at MaliDeveloper.arm.com
 V1.0
 Optimizing applications, quality settings in Unity (Chapter 2)
 Profiling applications with the Unity Profiler (Chapter 3)
 Optimizations:Application, GPU and Assets (Chapter 4)
 V2.0
 Enlighten (Chapter 5) and advanced graphics techniques (Chapter 6)
 V3.0
 More advanced graphics techniques (Chapter 6)
ARM Guide for Unity Developers: Optimizing Mobile Gaming
Graphics
Download the ARM Guide for Unity Developers at MaliDeveloper.arm.com
© ARM 20155
Porting Ice Cave Demo to Samsung GearVR
© ARM 20156
UnityVR Support
VR
Unity 5.1VR
Native Support
VR Plugin support limitations
• EachVR device has a different plugin
• Plugins may conflict with each other
• Each release of newerVR SDKs /
Runtimes can break older games
• Lower level engine optimizations are
not possible with plugin approach of
two separate cameras
© ARM 20157
Samsung GearVR
• Sensors:Accelerator, Gyrometer,
Geomagnetic, Proximity
• Motion to Photon Latency < 20ms
• Manual Focal Adjustment
• Main Physical UI:TouchPad
• Available for Samsung Galaxy S6 and
Samsung Galaxy Note 4
• Oculus’s AsynchronousTimeWarp
technology
© ARM 20158
Porting Ice Cave for Samsung GearVR
Plugin or
Native?
Acquire
device ID
Place in Assets/
Plugins/Android/assets
Native
Enabling GearVR developer mode:
• Go to your device Settings Application
Manager GearVR Service
• Tap on "Manage storage"
• Tap on the "VR ServiceVersion" six times
• Wait for scan process to complete and you
should now see the Developer Mode toggle
Developer mode allows you to launch the
application without the headset and also dock the
headset at any time without having Home launch.
© ARM 20159
 Removed existing UI as it was unsuitable forVR
 Added very simple UI through GearVR touchpad:
 Press and hold: camera moves in the direction the user is looking
 Release: camera stops
 Double tap: camera resets to initial position
ConsideringVR Specifics: UI
© ARM 201510
 Removed camera animation
 Users experienced motion sickness, particularly when going backwards
 Carefully set the camera speed after many tests with different users
 Users experienced motion sickness when the camera moved just a little too fast
 Ice Cave was designed on a large scale
 Users don’t feel claustrophobic and can explore different areas of the cave
ConsideringVR Specifics: Motion Sickness
© ARM 201511
 Removed dirty lens effect
 Doesn’t translate well toVR
 Added camera collision and sliding
 BadVR experience when going through
geometry
ConsideringVR Specifics: Application Features
© ARM 201512
 Added streaming to another device to show what the user is actually
experiencing (camera position and orientation)
Ice CaveVR Extras
© ARM 201513
 Added an alternative UI by means of a mini Bluetooth controller
Ice CaveVR Extras
© ARM 201514
Dynamic Soft Shadows Based on Local Cubemaps
Performance forVR
© ARM 201515
Dynamic Soft Shadows Based on Local Cubemaps
Generation stage
X
Y
Z
Front
-Z
Left –X
Back
+Z
Right
+X
Top
+Y
Bottom
-Y
Opaque geometry is rendered
with alpha = 1.
Semi-transparent geometry is
rendered with alpha <1.
Fully transparent geometry is
rendered with alpha 0.
Render the
transparency of
the scene in the
alpha channel
We have a map of the
zones where light rays
can potentially come
from and reach the
geometry.
No light information is
processed at this stage.
© ARM 201516
L
pi
C
P
pk
Q
• Create a vertex to light source L vector in the vertex
shader.
• Pass this vector to the fragment shader to obtain the
vector from the pixel to the light position piL.
• Find the intersection of the vector piL with the bounding
box.
• Build the vector CP from the cubemap position C to the
intersection point P.
• Use the new vector CP to fetch the texture from the
cubemap.
float texShadow = texCUBE(_CubeShadows, CP).a;
Bounding Box
lit pixel
shadowed
pixel
cubemap
Dynamic Soft Shadows Based on Local Cubemaps
Runtime stage
Source code in the ARM Guide for Unity Developers at MaliDeveloper.arm.com
© ARM 201517
Dynamic Soft Shadows Based on Local Cubemaps
Why dynamic?
If the position of the light source
changes, the shadows are generated
correctly using the same cubemap.
This technique works for any
number of lights and for any light
position outside of the volume
delimited by the bounding box.
© ARM 201518
Dynamic Shadows
© ARM 201519
Dynamic Soft Shadows Based on Local Cubemaps
Why Soft?
© ARM 201520
Dynamic Soft Shadows Based on Local Cubemaps
Why soft?
L
pi
C
P
pk
Q
float texShadow = texCUBE(_CubeShadows, CP).a;
float4 newVec = float4(CP, factor * length(piP))
float texShadow = texCUBElod(_CubeShadows, newVec ).a;
Bounding Box
lit pixel
shadowed
pixel
cubemap
Source code in the ARM Guide for Unity Developers at MaliDeveloper.arm.com
© ARM 201521
Dynamic Soft Shadows Based on Local Cubemaps
© ARM 201522
 Unity has made a great contribution toVR democratization.
 VR is a new boost to mobile games, the user experience is no longer
limited to the mobile screen, the user is now embedded in a virtual world.
 It is possible to run high qualityVR and non-VR content in mobile devices
using optimized rendering techniques.
 Check out the ARM Guide for Unity Developers for optimizations tips,
recommendations and very efficient rendering techniques to make the
most out of Unity when developing mobile games.
Wrap Up
© ARM 201523
For more information visit the Mali Developer
Centre: http://malideveloper.arm.com
• Download tools and resources
• Find out more about techniques based on local
cubemaps at:
• http://malideveloper.arm.com/documentation/developer-guides/arm-
guide-unity-enhancing-mobile-games/
• http://community.arm.com/groups/arm-mali-
graphics/blog/2015/04/13/dynamic-soft-shadows-based-on-local-
cubemap
• http://community.arm.com/groups/arm-mali-
graphics/blog/2014/08/07/reflections-based-on-local-cubemaps
• http://community.arm.com/groups/arm-mali-
graphics/blog/2015/04/13/refraction-based-on-local-cubemaps
• http://community.arm.com/groups/arm-mali-
graphics/blog/2015/05/21/the-power-of-local-cubemaps-at-unite-apac-
and-the-taoyuan-effect
The trademarks featured in this presentation are registered and/or unregistered trademarks of ARM Limited (or its
subsidiaries) in the EU and/or elsewhere. All rights reserved. All other marks featured may be trademarks of their
respective owners.
Copyright © 2015 ARM Limited
Thank you
Questions

More Related Content

What's hot

Adobe AIR - Mobile Performance – Tips & Tricks
Adobe AIR - Mobile Performance – Tips & TricksAdobe AIR - Mobile Performance – Tips & Tricks
Adobe AIR - Mobile Performance – Tips & Tricks
Mihai Corlan
 
Deferred Rendering in Killzone 2
Deferred Rendering in Killzone 2Deferred Rendering in Killzone 2
Deferred Rendering in Killzone 2
ozlael ozlael
 

What's hot (13)

CE-4117, HSA Optimizations and Impact on end User Experiences for AfterShot P...
CE-4117, HSA Optimizations and Impact on end User Experiences for AfterShot P...CE-4117, HSA Optimizations and Impact on end User Experiences for AfterShot P...
CE-4117, HSA Optimizations and Impact on end User Experiences for AfterShot P...
 
SIMCLOUD: Running Operational Simulators in the Cloud
SIMCLOUD: Running Operational Simulators in the CloudSIMCLOUD: Running Operational Simulators in the Cloud
SIMCLOUD: Running Operational Simulators in the Cloud
 
Stochastic Screen-Space Reflections
Stochastic Screen-Space ReflectionsStochastic Screen-Space Reflections
Stochastic Screen-Space Reflections
 
Bending the Graphics Pipeline
Bending the Graphics PipelineBending the Graphics Pipeline
Bending the Graphics Pipeline
 
04. The Rendering Pipeline
04. The Rendering Pipeline04. The Rendering Pipeline
04. The Rendering Pipeline
 
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
 
“Introduction to Simultaneous Localization and Mapping (SLAM),” a Presentatio...
“Introduction to Simultaneous Localization and Mapping (SLAM),” a Presentatio...“Introduction to Simultaneous Localization and Mapping (SLAM),” a Presentatio...
“Introduction to Simultaneous Localization and Mapping (SLAM),” a Presentatio...
 
Adobe AIR - Mobile Performance – Tips & Tricks
Adobe AIR - Mobile Performance – Tips & TricksAdobe AIR - Mobile Performance – Tips & Tricks
Adobe AIR - Mobile Performance – Tips & Tricks
 
Deferred Rendering in Killzone 2
Deferred Rendering in Killzone 2Deferred Rendering in Killzone 2
Deferred Rendering in Killzone 2
 
A Detailed Look at Cairo's OpenGL Spans Compositor Performance
A Detailed Look at Cairo's OpenGL Spans Compositor PerformanceA Detailed Look at Cairo's OpenGL Spans Compositor Performance
A Detailed Look at Cairo's OpenGL Spans Compositor Performance
 
Point Clouds: The Power of Components
Point Clouds: The Power of ComponentsPoint Clouds: The Power of Components
Point Clouds: The Power of Components
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
 
Filmic Tonemapping - EA 2006
Filmic Tonemapping - EA 2006Filmic Tonemapping - EA 2006
Filmic Tonemapping - EA 2006
 

Similar to ARM: Enhancing your Unity mobile VR experience

sdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_publicsdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_public
Rick Lau
 
“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...
“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...
“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...
Edge AI and Vision Alliance
 
Final Project Presentation
Final Project PresentationFinal Project Presentation
Final Project Presentation
Indrit Vogli
 

Similar to ARM: Enhancing your Unity mobile VR experience (20)

sdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_publicsdc-2016-gvrf-and-io_public
sdc-2016-gvrf-and-io_public
 
Making VR with Unreal Engine Luis Cataldi
Making VR with Unreal Engine  Luis CataldiMaking VR with Unreal Engine  Luis Cataldi
Making VR with Unreal Engine Luis Cataldi
 
MOBILE REMOTE SURVEILLANCE TOWER
MOBILE REMOTE SURVEILLANCE TOWERMOBILE REMOTE SURVEILLANCE TOWER
MOBILE REMOTE SURVEILLANCE TOWER
 
"Snapdragon Hybrid Computer Vision/Deep Learning Architecture for Imaging App...
"Snapdragon Hybrid Computer Vision/Deep Learning Architecture for Imaging App..."Snapdragon Hybrid Computer Vision/Deep Learning Architecture for Imaging App...
"Snapdragon Hybrid Computer Vision/Deep Learning Architecture for Imaging App...
 
Android 5.0 Camera2 APIs
Android 5.0 Camera2 APIsAndroid 5.0 Camera2 APIs
Android 5.0 Camera2 APIs
 
Luis cataldi-ue4-vr-best-practices2
Luis cataldi-ue4-vr-best-practices2Luis cataldi-ue4-vr-best-practices2
Luis cataldi-ue4-vr-best-practices2
 
On-device Motion Tracking for Immersive VR
On-device Motion Tracking for Immersive VROn-device Motion Tracking for Immersive VR
On-device Motion Tracking for Immersive VR
 
Philipp Nagele (Wikitude): Context Is for Kings: Putting Context in the Hands...
Philipp Nagele (Wikitude): Context Is for Kings: Putting Context in the Hands...Philipp Nagele (Wikitude): Context Is for Kings: Putting Context in the Hands...
Philipp Nagele (Wikitude): Context Is for Kings: Putting Context in the Hands...
 
AWS_Re_invent_22_VNova.pdf
AWS_Re_invent_22_VNova.pdfAWS_Re_invent_22_VNova.pdf
AWS_Re_invent_22_VNova.pdf
 
GTCx Korea 2016 Cloud-based 360 video player by Entrix
GTCx Korea 2016 Cloud-based 360 video player by EntrixGTCx Korea 2016 Cloud-based 360 video player by Entrix
GTCx Korea 2016 Cloud-based 360 video player by Entrix
 
Hidden Camera 3 APIs in Android 4.4 (KitKat)
Hidden Camera 3 APIs in Android 4.4 (KitKat)Hidden Camera 3 APIs in Android 4.4 (KitKat)
Hidden Camera 3 APIs in Android 4.4 (KitKat)
 
“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...
“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...
“Tools for Creating Next-Gen Computer Vision Apps on Snapdragon,” a Presentat...
 
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio..."3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
"3D from 2D: Theory, Implementation, and Applications of Structure from Motio...
 
Final Project Presentation
Final Project PresentationFinal Project Presentation
Final Project Presentation
 
Surveon End-to-End Megapixel Solutions Overview
Surveon End-to-End Megapixel Solutions OverviewSurveon End-to-End Megapixel Solutions Overview
Surveon End-to-End Megapixel Solutions Overview
 
Dreambox caMip
Dreambox caMipDreambox caMip
Dreambox caMip
 
Building Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKBuilding Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDK
 
Duel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & SkiaDuel of Two Libraries: Cairo & Skia
Duel of Two Libraries: Cairo & Skia
 
Raheel Khalid (Envrmnt by Verizon): Cloud XR Experience on 5G with Mobile Edg...
Raheel Khalid (Envrmnt by Verizon): Cloud XR Experience on 5G with Mobile Edg...Raheel Khalid (Envrmnt by Verizon): Cloud XR Experience on 5G with Mobile Edg...
Raheel Khalid (Envrmnt by Verizon): Cloud XR Experience on 5G with Mobile Edg...
 
Remote Android Rendering
Remote Android RenderingRemote Android Rendering
Remote Android Rendering
 

More from DevGAMM Conference

More from DevGAMM Conference (20)

The art of small steps, or how to make sound for games in conditions of war /...
The art of small steps, or how to make sound for games in conditions of war /...The art of small steps, or how to make sound for games in conditions of war /...
The art of small steps, or how to make sound for games in conditions of war /...
 
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
 
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
 
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
 
AI / ML for Indies / Tyler Coleman (Retora Games)
AI / ML for Indies / Tyler Coleman (Retora Games)AI / ML for Indies / Tyler Coleman (Retora Games)
AI / ML for Indies / Tyler Coleman (Retora Games)
 
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
 
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
 
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
 
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
 
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
 
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
 
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
 
How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...
 
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
 
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
 
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
 
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
 
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
 
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
 
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
 

Recently uploaded

Recently uploaded (20)

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

ARM: Enhancing your Unity mobile VR experience

  • 1. EnhancingYour Unity MobileVR Experience Roberto Lopez Mendez Senior Software Engineer,ARM DevGAMM – Minsk 10/12/2015
  • 2. © ARM 20152  Ice Cave Demo  Optimized effects: Notes about the ARM Guide For Unity Developers  Porting Ice Cave Demo to Samsung GearVR  The changes required forVR  ImprovingVR performance, dynamic shadows based on local cubemaps Agenda
  • 3. © ARM 20153 Demo Ice Cave
  • 4. © ARM 20154  First released at Unite Seattle 2014  Initial idea: write about the experience of learning Unity from scratch  Available for free at MaliDeveloper.arm.com  V1.0  Optimizing applications, quality settings in Unity (Chapter 2)  Profiling applications with the Unity Profiler (Chapter 3)  Optimizations:Application, GPU and Assets (Chapter 4)  V2.0  Enlighten (Chapter 5) and advanced graphics techniques (Chapter 6)  V3.0  More advanced graphics techniques (Chapter 6) ARM Guide for Unity Developers: Optimizing Mobile Gaming Graphics Download the ARM Guide for Unity Developers at MaliDeveloper.arm.com
  • 5. © ARM 20155 Porting Ice Cave Demo to Samsung GearVR
  • 6. © ARM 20156 UnityVR Support VR Unity 5.1VR Native Support VR Plugin support limitations • EachVR device has a different plugin • Plugins may conflict with each other • Each release of newerVR SDKs / Runtimes can break older games • Lower level engine optimizations are not possible with plugin approach of two separate cameras
  • 7. © ARM 20157 Samsung GearVR • Sensors:Accelerator, Gyrometer, Geomagnetic, Proximity • Motion to Photon Latency < 20ms • Manual Focal Adjustment • Main Physical UI:TouchPad • Available for Samsung Galaxy S6 and Samsung Galaxy Note 4 • Oculus’s AsynchronousTimeWarp technology
  • 8. © ARM 20158 Porting Ice Cave for Samsung GearVR Plugin or Native? Acquire device ID Place in Assets/ Plugins/Android/assets Native Enabling GearVR developer mode: • Go to your device Settings Application Manager GearVR Service • Tap on "Manage storage" • Tap on the "VR ServiceVersion" six times • Wait for scan process to complete and you should now see the Developer Mode toggle Developer mode allows you to launch the application without the headset and also dock the headset at any time without having Home launch.
  • 9. © ARM 20159  Removed existing UI as it was unsuitable forVR  Added very simple UI through GearVR touchpad:  Press and hold: camera moves in the direction the user is looking  Release: camera stops  Double tap: camera resets to initial position ConsideringVR Specifics: UI
  • 10. © ARM 201510  Removed camera animation  Users experienced motion sickness, particularly when going backwards  Carefully set the camera speed after many tests with different users  Users experienced motion sickness when the camera moved just a little too fast  Ice Cave was designed on a large scale  Users don’t feel claustrophobic and can explore different areas of the cave ConsideringVR Specifics: Motion Sickness
  • 11. © ARM 201511  Removed dirty lens effect  Doesn’t translate well toVR  Added camera collision and sliding  BadVR experience when going through geometry ConsideringVR Specifics: Application Features
  • 12. © ARM 201512  Added streaming to another device to show what the user is actually experiencing (camera position and orientation) Ice CaveVR Extras
  • 13. © ARM 201513  Added an alternative UI by means of a mini Bluetooth controller Ice CaveVR Extras
  • 14. © ARM 201514 Dynamic Soft Shadows Based on Local Cubemaps Performance forVR
  • 15. © ARM 201515 Dynamic Soft Shadows Based on Local Cubemaps Generation stage X Y Z Front -Z Left –X Back +Z Right +X Top +Y Bottom -Y Opaque geometry is rendered with alpha = 1. Semi-transparent geometry is rendered with alpha <1. Fully transparent geometry is rendered with alpha 0. Render the transparency of the scene in the alpha channel We have a map of the zones where light rays can potentially come from and reach the geometry. No light information is processed at this stage.
  • 16. © ARM 201516 L pi C P pk Q • Create a vertex to light source L vector in the vertex shader. • Pass this vector to the fragment shader to obtain the vector from the pixel to the light position piL. • Find the intersection of the vector piL with the bounding box. • Build the vector CP from the cubemap position C to the intersection point P. • Use the new vector CP to fetch the texture from the cubemap. float texShadow = texCUBE(_CubeShadows, CP).a; Bounding Box lit pixel shadowed pixel cubemap Dynamic Soft Shadows Based on Local Cubemaps Runtime stage Source code in the ARM Guide for Unity Developers at MaliDeveloper.arm.com
  • 17. © ARM 201517 Dynamic Soft Shadows Based on Local Cubemaps Why dynamic? If the position of the light source changes, the shadows are generated correctly using the same cubemap. This technique works for any number of lights and for any light position outside of the volume delimited by the bounding box.
  • 19. © ARM 201519 Dynamic Soft Shadows Based on Local Cubemaps Why Soft?
  • 20. © ARM 201520 Dynamic Soft Shadows Based on Local Cubemaps Why soft? L pi C P pk Q float texShadow = texCUBE(_CubeShadows, CP).a; float4 newVec = float4(CP, factor * length(piP)) float texShadow = texCUBElod(_CubeShadows, newVec ).a; Bounding Box lit pixel shadowed pixel cubemap Source code in the ARM Guide for Unity Developers at MaliDeveloper.arm.com
  • 21. © ARM 201521 Dynamic Soft Shadows Based on Local Cubemaps
  • 22. © ARM 201522  Unity has made a great contribution toVR democratization.  VR is a new boost to mobile games, the user experience is no longer limited to the mobile screen, the user is now embedded in a virtual world.  It is possible to run high qualityVR and non-VR content in mobile devices using optimized rendering techniques.  Check out the ARM Guide for Unity Developers for optimizations tips, recommendations and very efficient rendering techniques to make the most out of Unity when developing mobile games. Wrap Up
  • 23. © ARM 201523 For more information visit the Mali Developer Centre: http://malideveloper.arm.com • Download tools and resources • Find out more about techniques based on local cubemaps at: • http://malideveloper.arm.com/documentation/developer-guides/arm- guide-unity-enhancing-mobile-games/ • http://community.arm.com/groups/arm-mali- graphics/blog/2015/04/13/dynamic-soft-shadows-based-on-local- cubemap • http://community.arm.com/groups/arm-mali- graphics/blog/2014/08/07/reflections-based-on-local-cubemaps • http://community.arm.com/groups/arm-mali- graphics/blog/2015/04/13/refraction-based-on-local-cubemaps • http://community.arm.com/groups/arm-mali- graphics/blog/2015/05/21/the-power-of-local-cubemaps-at-unite-apac- and-the-taoyuan-effect
  • 24. The trademarks featured in this presentation are registered and/or unregistered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. All other marks featured may be trademarks of their respective owners. Copyright © 2015 ARM Limited Thank you Questions