Unity3D优化之Optimizing Physics Performance

8 篇文章 0 订阅
5 篇文章 0 订阅

Optimizing Physics Performance    优化物理性能

 

The NVIDIA PhysX physics engine used by Unity is available on iOS but the performance limits of the hardware will be reached more easily on mobile platforms than desktops.

Unity所用的NVIDIA PhysX物理引擎目前可用于iOS系统上,但是在移动平台比台式机上更容易达到硬件的性能极限。

Here are some tips for tuning physics to get better performance on iOS:-

下面是一些提示,用来优化物理,让其在iOS上得到更好的性能:

 

 You can adjust the Fixed Timestep setting (in theTime manager) to reduce the time spent on physics updates. Increasing the timestep will reduce the CPU overhead at the expense of the accuracy of the physics. Often, lower accuracy is an acceptable tradeoff for increased speed. 您可以调整的固定的时间步长设置(在时间管理器内)来减少物理更新上花费的时间。增加时间步长将减少花费在物理准确性上的CPU开销。通常,较低的精度是提高速度的、可接受的折中办法。

   

 Set theMaximum Allowed Timestep in theTime manager in the 8-10fps range to cap the time spent on physics in the worst case scenario.

在时间管理器重设置最大允许的时间步长为8-10fps,来限定最坏情况下的物理花费时间。

  

Mesh colliders have a much higher performance overhead than primitive colliders, so use them sparingly. It is often possible to approximate the shape of a mesh by using child objects with primitive colliders. The child colliders will be controlled collectively as a single compound collider by the rigidbody on the parent.

 网格碰撞器比原始碰撞器具有更高的性能开销,所以尽量少用。通常是在子网格上使用原始碰撞器来模拟一个网格的近似形状。子网格的碰撞器将被母网格的刚体部分集合成为一个复合的碰撞器。

 

While wheel colliders are not strictly colliders in the sense of solid objects, they nonetheless have a high CPU overhead.

虽然轮碰撞器不是严格意义上的实体对象碰撞器,但是它们仍然有着很高的CPU开销。

    

The total amount of physics calculation depends on the number of non-sleeping rigid bodies and colliders in the scene and the complexity of the colliders. You can keep track of how many physics objects there are in the scene using the internal profiler.

物理计算总量取决于非休眠刚体数目、场景中碰撞器的数目和碰撞器的复杂性。您可以使用内部Profiler来检测场景中一共使用了多少物理对象。

 

备注:最近一直在研究Unity3D的性能优化问题,这段时间可能会多翻译这方面的文章,如有翻译不当之处还请多多指出。

原文地址:http://unity3d.com/support/documentation/Manual/iphone-Optimizing-Physics.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值