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_