dae格式比较开放,不同软件导出的格式可能有所不同,但原理应当是一样的。以Blender导出的为例。
首先看骨骼部分,随便做了一个模型,先看节选的library_controller部分。
<library_controllers>
<controller id="boness_plane-skin" name="boness">
<skin source="#plane002-mesh">
<bind_shape_matrix>
</bind_shape_matrix>
<source id="boness_plane-skin-joints"></source>
<source id="boness_plane-skin-bind_poses"></source>
<source id="boness_plane-skin-weights"></source>
<joints>
<input semantic="JOINT" source="#boness_plane-skin-joints"/>
<input semantic="INV_BIND_MATRIX" source="#boness_plane-skin-bind_poses"/>
</joints>
<vertex_weights count="212">
<input semantic="JOINT" source="#boness_plane-skin-joints" offset="0"/>
<input semantic="WEIGHT" source="#boness_plane-skin-weights" offset="1"/>
<vcount></vcount>
<v></v></vertex_weights></skin></controller></library_

本文探讨了DAE文件格式,特别是针对Blender导出的模型。内容涉及骨骼部分,包括皮肤关节数量和骨骼矩阵,以及蒙皮权重数组。通过解析vcount和v数据,可以获取每个顶点的蒙皮权重和骨骼信息。
最低0.47元/天 解锁文章
1451

被折叠的 条评论
为什么被折叠?



