利用GPU实现大规模动画角色的渲染

方案一:去除Animation将动画变成顶点动画 +  GPU Instancing

https://indienova.com/indie-game-development/using-the-gpu-to-achieve-large-scale-animation-character-rendering/  (有demo实现)

https://catlikecoding.com/unity/tutorials/custom-srp/draw-calls/#2.3

 

方案二:保存骨骼数据使用 DrawMeshInstanced绘制 (GPUSkin)

https://zhuanlan.zhihu.com/p/403885438

https://blog.csdn.net/leonwei/article/details/77387357

demo实现

https://github.com/chengkehan/GPUSkinning

https://github.com/sllllz/GraphicsInstancing

之前的文章

https://www.cnblogs.com/sanyejun/p/14667148.html

 

类似草地插件

https://assetstore.unity.com/packages/tools/painting/lch-grasses-mobile-229227

https://assetstore.unity.com/packages/tools/utilities/gpu-instancer-117566

 

Demo:GPUSKinning  GPUInstance   RVO

https://files-cdn.cnblogs.com/files/sanyejun/GPUInstance-GPUSkinning-RVO.7z?t=1677394168

GPUSkinning是为了解决SkinMeshRender的消耗过大问题,转而用MeshRender进行动画的播放

GPUInstance是为了解决多个相同物体虽然他们是相同的Mesh,但是需要通知GPU进行多次绘制,使用 Graphics.DrawMeshInstanced接口一次性绘制完,从而减少CPU的压力

使用这种技术,我们的表现和碰撞,物体的坐标是需要做分离处理的

RVO避障算法

这里面如果我们采用DOTS,性能还能进一步的提升

posted @ 2022-08-31 09:51  三页菌  阅读(261)  评论(0编辑  收藏  举报