如何减少VR游戏的时滞 [英] How to reduce the lag in VR games in unity

查看:113
本文介绍了如何减少VR游戏的时滞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用Unity3d为VR开发游戏.它只有低多边形模型,文件大小还不到40 mb,但在移动设备上玩游戏仍然会滞后..请提出如何提高性能的建议.

I have been building a game for VR using Unity3d. It has only low poly models and the file size is less then 40 mb still the game lags when played on mobile.. Please suggest how to improve the performance..

先谢谢您.

推荐答案

从开发和发布虚拟现实游戏中发现的一些问题如下

What I found from developing and launching a vr game is some of the issues below

  • 即使模型是低多边形的,通常也要首先检查多边形的数量.例如,我查看了统一商店中的Synty模型,其中一些模型的袋子价格超过1k,角色模型的价格超过7k.如果您希望将每只眼睛的最大目标数量定为50000,则可以大大减少对象的数量.

对于某些模型,您可以使用Blender和抽取工具轻松地减少多边形数量.从那里,我将使用LOD来根据距离进一步减少它们的数量.

With some models, you can use blender and the decimate tool to reduce the polygon count pretty easily. From there I would use LOD's to reduce their count further based on distance.

  • 使用遮挡剔除(仅限专业版)
  • 将您的相机距离设置为100而不是默认值
  • 使用移动着色器,并谨慎使用一些标准着色器,因为它们很昂贵.透明的着色器也会因为过度绘制而变得昂贵.
  • 对纹理进行批处理,并在可能的情况下使其变为静态
  • 不要在照明上使用动态阴影,而要烘烤灯光
  • 尝试避免使用物理学,因为这会变得昂贵,而要通过射线广播来触发事件或射击武器.
  • 经常运行Profiler并检查是否有瓶颈(仅适用于专业版)
  • 减少粒子"效果的数量及其值
  • 字符骨头也会引起问题,因此请尽可能多地移除
  • 还有Manujamming提到的代码要查看
  • 在检查器中将质量设置设置为低以获取最佳性能.
  • Use occlusion culling (pro version only)
  • Set your camera distance to maybe a 100 instead of the default
  • Use mobile shaders and careful using some of the standard shaders as they are expensive. Also transparent shaders will becomes expensive cause overdraw.
  • Batch your textures and make them static if possible
  • Don't use dynamic shadows on lighting but instead bake your lights
  • Try to avoid using physics as this becomes expensive and instead raycast to trigger events or shooting weapons.
  • Run profiler often and check for any bottlenecks (pro version only)
  • Reduce the count of Particles effects and their values
  • Character bones can also cause issue so remove as many as possible
  • There is also your code to look at as mentioned by Manujamming
  • Set quality setting to low in the inspector to gain best performance.

您能提供游戏场景的屏幕截图吗?

Could you provide a screenshot of your game scene?

我希望这是有道理的. 祝你好运!

I hope this makes sense. Best of luck!

这篇关于如何减少VR游戏的时滞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆