SlideShare a Scribd company logo
1 of 35
Download to read offline
将桌面级VR通过Vulkan和
UE4移植到移动平台
总概
• 项目目的
• 平台差距
• 测试Vulkan
• 介绍Vulkan
• 准备工作
• 执行优化
• 遇到的困难
项目目的
• 探索移动平台VR效果的极限
• 探索UE4下移动端,Vulkan+VR流程/当前问题
THE “SHOWDOWN” DEMO
平台的差距
3840 x 2160? (1920 x 1080)
60 fps
Adreno 530
Multi-view?
Mobile Forward Renderer
Vulkan?
2160 x 1200
90 fps
GTX 970
Instanced Stereo
Deferred Renderer
DX11
关于Vulkan
• Vulkan是用来替代OpenGL和OpenGL ES的下一代图形API
• 由Khronos领头,整个行业共同参与打造
• 开放,跨平台,支持PC、主机和移动设备
• 提供更底层轻度的,更高效的接口
• 考虑了现代图形硬件而设计
• 以SPIR-V格式作为shader预编译的中间格式
ES2/3.2 vs Vulkan
OpenGL:
如果compile出错,在运行时会crash
做绘制调用的时候会有hitch,驱动只在第一次绘制时才真的编译
Vulkan:
可离线编译shader
在开发时可编译成SPIR-V二进制数据
所有shader的验证都在离线时完成
所有上层的shader优化都在离线时完成
ES2/3.2 vs Vulkan
OpenGL:
Set vertex and pixel shaders
Shader uniform parameters
Bound textures
Set blending states
Set depth states
Set rasterizer states
Etc…
Vulkan:
把这些属性和状态都封装在一个对象中
切换不同的状态相当高效!
ES2/3.2 vs Vulkan
Vulkan有显式的RenderPass
vkBeginRenderPass(...)
vkEndRenderPass(...)
每个render pass可以指定哪些数据需要load到tile
memory里,哪些数据需要存回framebuffer
准备工作
硬件:Galaxy S7(latest rom), Nexus 6P(Android N)?
SDK:Vulkan, ndk
UE4: 4.13
当前数据:
800+ drawcall
120w+ triangles
准备工作
简单定位瓶颈:
1. stat unit – gpu
降低渲染分辨率:MobileContentScaleFactor = 1.0 (1080p) / 0.8 (720p)
快速用工具减面做测试
用mip setting降低贴图尺寸,降低gpu带宽占用
2. stat dumpave –ms=1 || stat startfile/stop file
发现game线程时间过长,profile确定render thread没开
3. RenderThread瓶颈
合并和简化场景mesh
执行优化
内容优化
• 面数太多;
• 物件太多;
• 材质太多;
• 材质太复杂;
• 贴图太大,
• 渲染品质参数太高
Statistics
烘培合并材质
烘培合并材质
烘培合并材质
减面Simplygon
Instancing Staticmeshes(Batch Staticmeshes)
选择需要合并的Actors
优化材质/大范围
优化材质/复杂
材质优化/透明
材质优化/粒子特效
优化材质/删除不必要的视觉元素
减少贴图sampler
去除后期材质和灯光function
使用简单方式替代
检查清理地图警告
设置合理目标平台Profile,记得保存!
• 调整合理的渲染品质参数
• 合理的贴图大小
• 分辨率
三角面
Drawcall
Q&A
将桌面级VR通过Vulkan和 UE4移植到移动平台

More Related Content

Similar to 将桌面级VR通过Vulkan和 UE4移植到移动平台

GDC Taipei Summit review 2012
GDC Taipei Summit review 2012GDC Taipei Summit review 2012
GDC Taipei Summit review 2012Victor Lee
 
20130823 優網通產品發表會-hisb介紹
20130823 優網通產品發表會-hisb介紹20130823 優網通產品發表會-hisb介紹
20130823 優網通產品發表會-hisb介紹HermesDDS
 
Windows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for DevelopersWindows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for DevelopersJeff Chu
 
讓軟體開發與應用更自由 - 使用 Docker 技術
讓軟體開發與應用更自由 - 使用 Docker 技術讓軟體開發與應用更自由 - 使用 Docker 技術
讓軟體開發與應用更自由 - 使用 Docker 技術Yu Lung Shao
 
Gentek应用介绍20111123
Gentek应用介绍20111123Gentek应用介绍20111123
Gentek应用介绍20111123oemgame
 
什么手机适配 Mobile application adaptation
什么手机适配   Mobile application adaptation 什么手机适配   Mobile application adaptation
什么手机适配 Mobile application adaptation xj8848
 
docker intro
docker introdocker intro
docker introkoji lin
 
ZTE Video conferconce Product introduction
ZTE  Video conferconce Product introductionZTE  Video conferconce Product introduction
ZTE Video conferconce Product introductionssuser220dc6
 
Build desktop app_by_xulrunner
Build desktop app_by_xulrunnerBuild desktop app_by_xulrunner
Build desktop app_by_xulrunnerRack Lin
 
Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質
Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質
Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質Cheer Chain Enterprise Co., Ltd.
 
Ezilla
EzillaEzilla
Ezillahs1250
 
GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享
GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享
GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享NVIDIA Taiwan
 
Windows Phone 7 in azure
Windows Phone 7 in azureWindows Phone 7 in azure
Windows Phone 7 in azureTao Wang
 
初探 Windows 市集 App 開發
初探 Windows 市集 App 開發初探 Windows 市集 App 開發
初探 Windows 市集 App 開發Ouch Liu
 
HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門Chen Yu Pao
 
DRBL-live-hadoop at TSLC
DRBL-live-hadoop at TSLCDRBL-live-hadoop at TSLC
DRBL-live-hadoop at TSLCYu-Chin Tsai
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩Wen-Tien Chang
 

Similar to 将桌面级VR通过Vulkan和 UE4移植到移动平台 (20)

Double take 6.0 實機體驗營
Double take 6.0 實機體驗營Double take 6.0 實機體驗營
Double take 6.0 實機體驗營
 
GDC Taipei Summit review 2012
GDC Taipei Summit review 2012GDC Taipei Summit review 2012
GDC Taipei Summit review 2012
 
20130823 優網通產品發表會-hisb介紹
20130823 優網通產品發表會-hisb介紹20130823 優網通產品發表會-hisb介紹
20130823 優網通產品發表會-hisb介紹
 
Windows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for DevelopersWindows Azure Virtual Machine Services for Developers
Windows Azure Virtual Machine Services for Developers
 
讓軟體開發與應用更自由 - 使用 Docker 技術
讓軟體開發與應用更自由 - 使用 Docker 技術讓軟體開發與應用更自由 - 使用 Docker 技術
讓軟體開發與應用更自由 - 使用 Docker 技術
 
Gentek应用介绍20111123
Gentek应用介绍20111123Gentek应用介绍20111123
Gentek应用介绍20111123
 
什么手机适配 Mobile application adaptation
什么手机适配   Mobile application adaptation 什么手机适配   Mobile application adaptation
什么手机适配 Mobile application adaptation
 
docker intro
docker introdocker intro
docker intro
 
ZTE Video conferconce Product introduction
ZTE  Video conferconce Product introductionZTE  Video conferconce Product introduction
ZTE Video conferconce Product introduction
 
LinkIt 7697 IoT tutorial
LinkIt 7697 IoT tutorialLinkIt 7697 IoT tutorial
LinkIt 7697 IoT tutorial
 
Build desktop app_by_xulrunner
Build desktop app_by_xulrunnerBuild desktop app_by_xulrunner
Build desktop app_by_xulrunner
 
Docker基礎
Docker基礎Docker基礎
Docker基礎
 
Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質
Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質
Intel® Media Server Studio 2016 開發企業級媒體解決方案,提供高效能和高品質
 
Ezilla
EzillaEzilla
Ezilla
 
GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享
GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享
GTC Taiwan 2017 NVIDIA Holodeck 與 Isaac VR 技術分享
 
Windows Phone 7 in azure
Windows Phone 7 in azureWindows Phone 7 in azure
Windows Phone 7 in azure
 
初探 Windows 市集 App 開發
初探 Windows 市集 App 開發初探 Windows 市集 App 開發
初探 Windows 市集 App 開發
 
HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門HoloLens 2的 MR(Mixed Reality)開發入門
HoloLens 2的 MR(Mixed Reality)開發入門
 
DRBL-live-hadoop at TSLC
DRBL-live-hadoop at TSLCDRBL-live-hadoop at TSLC
DRBL-live-hadoop at TSLC
 
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
 

More from Epic Games China

Unreal Open Day 2017_Unreal Engine 4 Animation
Unreal Open Day 2017_Unreal Engine 4 AnimationUnreal Open Day 2017_Unreal Engine 4 Animation
Unreal Open Day 2017_Unreal Engine 4 AnimationEpic Games China
 
Unreal Open Day 2017 Unreal Engine Education & Training
Unreal Open Day 2017 Unreal Engine Education & TrainingUnreal Open Day 2017 Unreal Engine Education & Training
Unreal Open Day 2017 Unreal Engine Education & TrainingEpic Games China
 
Unreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UIUnreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UIEpic Games China
 
Unreal Open Day 2017 Bringing Paragon Characters to Life
Unreal Open Day 2017 Bringing Paragon Characters to LifeUnreal Open Day 2017 Bringing Paragon Characters to Life
Unreal Open Day 2017 Bringing Paragon Characters to LifeEpic Games China
 
Unreal Open Day 2017 The Art of Robo Recall
Unreal Open Day 2017 The Art of Robo RecallUnreal Open Day 2017 The Art of Robo Recall
Unreal Open Day 2017 The Art of Robo RecallEpic Games China
 
Unreal Open Day 2017 Project Raven
Unreal Open Day 2017 Project RavenUnreal Open Day 2017 Project Raven
Unreal Open Day 2017 Project RavenEpic Games China
 
Unreal Open Day 2017 Review of Typical issues
Unreal Open Day 2017 Review of Typical issuesUnreal Open Day 2017 Review of Typical issues
Unreal Open Day 2017 Review of Typical issuesEpic Games China
 
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesUnreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesEpic Games China
 
Unreal Open Day 2017 Designing Robo Recall
Unreal Open Day 2017 Designing Robo RecallUnreal Open Day 2017 Designing Robo Recall
Unreal Open Day 2017 Designing Robo RecallEpic Games China
 
实时渲染动画时代的来临
实时渲染动画时代的来临实时渲染动画时代的来临
实时渲染动画时代的来临Epic Games China
 

More from Epic Games China (11)

Unreal Open Day 2017_Unreal Engine 4 Animation
Unreal Open Day 2017_Unreal Engine 4 AnimationUnreal Open Day 2017_Unreal Engine 4 Animation
Unreal Open Day 2017_Unreal Engine 4 Animation
 
Unreal Open Day 2017 Unreal Engine Education & Training
Unreal Open Day 2017 Unreal Engine Education & TrainingUnreal Open Day 2017 Unreal Engine Education & Training
Unreal Open Day 2017 Unreal Engine Education & Training
 
Unreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UIUnreal Open Day 2017 Optimize in Mobile UI
Unreal Open Day 2017 Optimize in Mobile UI
 
Unreal Open Day 2017 Bringing Paragon Characters to Life
Unreal Open Day 2017 Bringing Paragon Characters to LifeUnreal Open Day 2017 Bringing Paragon Characters to Life
Unreal Open Day 2017 Bringing Paragon Characters to Life
 
Unreal Open Day 2017 The Art of Robo Recall
Unreal Open Day 2017 The Art of Robo RecallUnreal Open Day 2017 The Art of Robo Recall
Unreal Open Day 2017 The Art of Robo Recall
 
Unreal Open Day 2017 Project Raven
Unreal Open Day 2017 Project RavenUnreal Open Day 2017 Project Raven
Unreal Open Day 2017 Project Raven
 
Unreal Open Day 2017 Review of Typical issues
Unreal Open Day 2017 Review of Typical issuesUnreal Open Day 2017 Review of Typical issues
Unreal Open Day 2017 Review of Typical issues
 
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile GamesUnreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
Unreal Open Day 2017 UE4 for Mobile: The Future of High Quality Mobile Games
 
Unreal Open Day 2017 Designing Robo Recall
Unreal Open Day 2017 Designing Robo RecallUnreal Open Day 2017 Designing Robo Recall
Unreal Open Day 2017 Designing Robo Recall
 
Building Paragon in UE4
Building Paragon in UE4Building Paragon in UE4
Building Paragon in UE4
 
实时渲染动画时代的来临
实时渲染动画时代的来临实时渲染动画时代的来临
实时渲染动画时代的来临
 

将桌面级VR通过Vulkan和 UE4移植到移动平台