动画实例化– SkinnedMeshRenderer的实例化

As developers, we’re always aware of performance, both in terms of CPU and GPU. Maintaining good performance gets more challenging as scenes get larger and more complex, especially as we add more and more characters. Me and my colleague in Shanghai come across this problem often when helping customers, so we decided to dedicate a few weeks to a project aimed to improve performance when instancing characters. We call the resulting technique Animation Instancing.

作为开发人员,我们始终了解CPU和GPU的性能。 随着场景变得越来越大,越来越复杂,保持良好的性能变得越来越具有挑战性,尤其是当我们添加越来越多的角色时。 我和我在上海的同事在帮助客户时经常会遇到这个问题,因此我们决定花几个星期的时间致力于提高实例化字符的性能。 我们称这种技术为动画实例化。

We often implement outdoors scenes with GPU Instancing, such as grasses and trees. But for SkinnedMeshRenderer (for example characters), we can’t use instancing, because the skinning is calculated on the CPU, and submitted to the GPU one by one. In general, we can’t draw all characters through one submission. When there are lots of SkinnedMeshRenderers in the scene, this results in lots of draw calls and animation calculations.

我们经常使用 GPU Instancing 实现户外场景 ,例如草木。 但是对于 SkinnedMeshRenderer (例如字符),我们不能使用实例化, 因为皮肤是在CPU上计算的,并一一提交给GPU。 通常,我们无法一次提交所有字符。 当场景中有很多SkinnedMeshRenderers时,这将导致大量绘制调用和动画计算。

We have found a way to reduce CPU cost and supplement GPU Instancing in Unity with Animation Instancing. You can get our code on GitHub. Be aware that this is custom experimental solution, we’ve only shared it with a few of our enterprise support customers until recently. Now we’re ready for more feedback – please let us know what you think directly in the project comments!

我们找到了一种方法来降低CPU成本,并通过动画实例化补充Unity中的GPU实例化。 您可以 在GitHub上获取我们的代码 。 请注意,这是定制的实验性解决方案,直到最近我们才与一些企业支持客户共享它。 现在,我们已经准备好 征求 更多反馈– 请

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值