430 likes | 574 Views
Maximizing the User Experience A comprehensive suite of level-of-detail (LOD) techniques for modern high-end F2P games 最优化用户体验 整套细节级别( LOD )技术全面运用于现代高端 F2P 游戏中. Speaker Introduction. Christopher Pfeiffer Balanced Worlds, CEO 14 years in the games industry
E N D
Maximizing the User Experience A comprehensive suite of level-of-detail (LOD) techniques for modern high-end F2P games 最优化用户体验整套细节级别(LOD)技术全面运用于现代高端F2P游戏中
Speaker Introduction Christopher Pfeiffer • Balanced Worlds, CEO • 14 years in the games industry • University of Michigan, BSE in Computer Engineering 主讲人介绍 费浩然 • 和谐世界(北京)软件科技有限公司,首席执行官 • 十四年游戏行业从业经验 • 密歇根大学,计算机工程学位
What is LOD? Level of Detail • The goal is to make highly interactive experiences while using less resources • The reduction in complexity comes from graphical reductions, algorithmic simplifications, and heuristic process culling 何为LOD? 细节级别 • 旨在用更少的资源获得更佳的互动体验效果 • 复杂程度的降低源自图形的减少,算法的简化,以及探索法流程的筛选
Why is LOD important? One reason: Quality • The same game will provide completely different player experiences depending on whether its running at 15, 30, or 60 FPS • Greater complexity results in more immersion • As a game developer, you will never be able to do everything that you want to do LOD为何重要? 一个原因:为了品质 • 同一款游戏,当采用15,30或60的不同帧速时,所带来用户体验效果会完全不同 • 更高的复杂性会更加的引人入胜 • 作为游戏开发人员,要实现所有想法几乎是不可能的
Performance • All team members must care about the frame rate • Games are entertainment; its ok to deceive the player 性能表现 • 所有项目成员都必须关注帧频 • 游戏是为了娱乐,“欺瞒”玩家也是可以的
Accountability • Accountability is critical • Good performance does not happen naturally • Everyone must know who is reasonable for making sure that the frame rate is good 责任承担 • 责任承担至关重要 • 良好的性能表现不会自然成就 • 每个人都应该清楚该怎样合理地确保帧频良好
Budgets Performance Budgets MUST be maintained • If you don’t know how much time a system is taking during a frame, you don’t know if it is complete • Need in-game profiling tools • Provide testers with tools • Target your game’s trouble spots 预算 必须满足性能预算要求 • 如果你不清楚系统在每一帧要花费的时间,你就无法知道它的完成状态 • 需要游戏中的剖析工具 • 为测试者提供工具 • 瞄准游戏的问题点
2 Common Issues Pops! Flip- Flop 两个常见问题 “突现” “正反复振”
Pops! Why avoid pops? • They distract players from the game experience Types of pops • Graphical • Simulation “突现” 为何要避免“突现” ? • 它们会分散玩家精力,降低游戏体验效果 “突现”分类 • 图像 • 模拟仿真
Flip-Flop Rapid switching between states causes many problems 2 Methods to resolve it • Use separate test criteria for entering and exiting a state • Smooth out the metric across frames “正反复振” 不同状态间的快速切换会带来很多问题 两个解决办法 • 针对某种状态的“进入”和“退出”采用不同的测试标准 • 平滑各帧间的进制
LOD Selection How does the game decide which LOD to use? Static methods • Algorithm selection and fixed parameter values Adaptive methods • Reactive and predictive LOD选择 游戏是如何确定该用哪个LOD的呢? 静态方法 • 算法选择及参数值处理 适配办法 • 应对及预测
Perception Based LOD Trigger LOD changes based on the objects state on screen • Distance squared • 2d relative speed on screen • 2d distance from players’ focal point (the reticule) • 3d depth order • Drawn or not drawn 基于认知的LOD 根据屏幕出现物体来触发LOD变化 • 距离的平方 • 屏幕上二维相对速度 • 玩家焦点(分度线)的二维距离 • 三维纵深顺序 • 绘入还是不绘
Performance Based LOD Metrics • Simple metrics • More complex • The point is that there lot of options available 基于性能的LOD 度量体系 • 简单度量 • 稍复杂 • 观点就是有很多可选方案
User Selected LOD Game players want control • Users often have divergent desires • Still need to group options to make them intuitive 基于用户选择的LOD 游戏玩家希望能够控制 • 玩家通常会有很多不同的欲望 • 仍然需要分组选项来实现直观性
Specific LOD Types • Graphical LOD • Skeletal LOD • Simulation LOD • AI LOD 特定的LOD类型 • 图形LOD • 骨骼LOD • 模拟仿真LOD • 人工智能LOD
Resolution Resolution can be thought of a static LOD • Pixel fill rate • LOD’ing one feature sometimes affects other features’ LOD requirements 分辨率 分辨率可以想象为一种静态的LOD • 像素填充频率 • 对某一特性运用LOD有时会影响其他特性的LOD需求
Shaders Shaders • Pixel pop • Shader swap often done at model swap time • Depending on your requirements, there are a myriad of possible LOD options 材质球 材质球 • 像素突现 • 材质球的替换经常发生在模型替换时 • 根据需求不同,有许多LOD的可能选择
Model Swapping Method • Assign each LOD of a model a distance range • Calculate distance from the camera and select the LOD Improvements • LOD distances per mesh • Cross-fade technique 模型替换 方法 • 对每一模型的LOD确定其对应的距离范围 • 从镜头处计算距离并选择适当的LOD 改进方案 • 根据每一网格确定LOD距离 • 同时淡出淡入的软切换技术
Model Swapping Production • Artists need to make all of the LOD models for each asset • Artists must adjust both shader and model LODs together in-game 模型替换 生产过程 • 美工需要对每一资产进行全套LOD模型的制作 • 美工必须在游戏中同时调整材质球和模型的LOD
Precomputed Lighting 3 Stage Example • Highest detail-level stores global illumination information • Medium detail-level just stores a color per texel • Low detail-level is vertex lit faces without a texture 预计算光照 三个级别举例 • 最高细节级别包含有全局照明信息 • 中等细节级别只保存每个材素点的颜色信息 • 低细节级别是不包括材质的顶点照亮面
Precomputed Lighting To enable blending actually requires 5 shaders! • Blend between high and medium • Blend between medium and low 预计算光照 实际需要五个材质球才能完成混和! • 高级和中级之间的混和 • 中级和低级之间的混和
View-dependant Dynamic Mesh LOD Can be used for continuous terrains and other models • Implementing this type of technology represents a serious development risk and commitment • Morphing looks better than switching LOD levels instantly • Obscure it 视角决定动态网格的LOD 能被运用于连续地域和其他模型中 • 运用此类技术意味着严重的开发风险和投入 • 变形比突然切换LOD级别看起来好很多 • 要掩盖它
Visual Effects LOD Visual effects rely on particles and alpha blending • Effects have an interesting cost function • Which LOD method is best to use depends heavily on the type of special effect • Very time consuming to get it right 视觉特效LOD 视觉效果依靠的是粒子和alpha的混和 • 效果有着有趣的价值函数 • 何种LOD方法才是最佳方案很大程度上取决于特效的类型 • 要想做出正确选择是非常耗费时间的
Skeletal LOD 3 types of bones • Bones that are manipulated or queried in the AI • Bones that animate a collision model • Bones that skin the rendered geometry 骨骼LOD 三种类型的骨骼 • 被控或在人工智能里问讯到的骨骼 • 用于碰撞模型动画的骨骼 • 几何渲染时的蒙皮骨骼
Skeletal LOD Sample Update Loop • Determine the desired movement for all objects • Compute the actual movements based on collision • Animate based on actual movement results • Update physics objects within the scene • Do post-physics update on each object 骨骼LOD 样本升级循环 • 确定所有物体所期望实现的运动 • 根据碰撞计算实际的运动 • 根据实际运动结果作出动画 • 在场面中更新物理物体 • 对每一物体进行后物理更新
Skeletal LOD Production • Effects model construction • Limits model fidelity • Requires testing to verify utilization 骨骼LOD 生产过程 • 效果模型的建造 • 极限模型的逼真 • 需要测试来验证效用
Physics Often physics isn’t necessary • Most physics in games is used for graphical flourish • Simulation fidelity needs to vary by distance, view, and the complexity of the scene • Carefully determine what actually matters 物理 通常物理不是必须的 • 多数游戏中的物理都是用于营造图形的夸张效果 • 模拟仿真的逼真度需要根据距离,视角和场面的复杂程度来变化 • 仔细确定出真正重要的部分
AI LOD AI has many features which can individually LOD • Decision making • Movement & Simulation 人工智能LOD 人工智能有很多特性能个别地做LOD • 作出决策 • 运动和模拟仿真
LOD What Actually Matters Worst case scenarios • LOD techniques can’t account for all situations • Focus on your worst case scenarios and make them perform well LOD确实重要 最糟情况 • LOD技术不能说明所有情况 • 关注你遇到的最糟情况并改善其性能表现
Real-time Visualization In-game real-time visualization is a must • Rapid iteration is needed to achieve the best results • Tweaking is time consuming • Artists must be empowered to independently improve the frame rate 实时影像 游戏中实时影像的呈现已成必然 • 要达到最好效果需要做好快速迭代 • 调整是耗费时间的 • 所有美工必须要有独立改善帧频的能力
Double Check Assumptions Problems are not always what they seem • Double-check architectural decisions • Make sure to properly identify the performance issue 复查假设 问题不总是它们看起来的样子 • 重复检查所做有关建筑的决定 • 确保正确辨识出性能问题
References & Useful Links参考文献及链接 LOD Book: • http://lodbook.com/ Great collection of papers: • http://debian.fmi.uni-sofia.bg/~sergei/cgsr/all.htm Insomniac Games: • http://www.insomniacgames.com/tech/techpage.php Gamasutra: • http://www.gamasutra.com Wikipedia: • http://en.wikipedia.org/wiki/Level_of_detail