===================2017.9.16
I’v tryed to combine the skinned meshes today.
I can combine all the skinned meshes to one now.And they looks like at the right position and with the right uvs. However , It’s just a static mesh,it can not do any animation.I checked the API of Unity, I found that ,mybe it is not possible to combine all meshes with animation. The reseaon is here:
- Every mesh has huge vertices and boneWeights , one boneWeight per one vertex.The boneWeight contains up to 4 indexes and weights relative to the bindPose list.
- The bindPose list is a array of Matrixes , every Matrix means a trasformation relative to the skinned-mesh’s rootBone.
- The boneWeights are just used as weight-calculation of up to 4 bindPose matrixes , the result is one average matrix relative to the skinned-mesh’s rootBone.
At last , we can think out the calculation process o
【Unity 优化】Skinned-Mesh 能动态合并嘛?
最新推荐文章于 2024-07-27 10:16:19 发布
本文探讨了Unity中Skinned-Mesh的动态合并问题。最初尝试将所有Skinned-Mesh合并为一个静态网格,但发现无法进行动画。通过深入研究,作者发现了关键点:1) 不需要关注rootBone;2) 所有顶点相对于骨头计算,Unity的组合功能可以将所有骨头合并;3) 需要收集原始Skinned-Mesh的所有骨头并设置到新的Skinned-Mesh;4) 在合并前,确保Skinned-Mesh处于标准状态,并将动画节点移至世界中心,完成后恢复原状。经过这些步骤,作者成功实现了Skinned-Mesh的动态合并,并计划更新插件。
摘要由CSDN通过智能技术生成