【Unity 优化】Skinned-Mesh 能动态合并嘛?

本文探讨了Unity中Skinned-Mesh的动态合并问题。最初尝试将所有Skinned-Mesh合并为一个静态网格,但发现无法进行动画。通过深入研究,作者发现了关键点:1) 不需要关注rootBone;2) 所有顶点相对于骨头计算,Unity的组合功能可以将所有骨头合并;3) 需要收集原始Skinned-Mesh的所有骨头并设置到新的Skinned-Mesh;4) 在合并前,确保Skinned-Mesh处于标准状态,并将动画节点移至世界中心,完成后恢复原状。经过这些步骤,作者成功实现了Skinned-Mesh的动态合并,并计划更新插件。
摘要由CSDN通过智能技术生成

===================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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值