加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

关于DAE格式的一个重要的案例

(2010-06-07 01:40:01)
标签:

杂谈

分类: 三维动画
dae文件结构:
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
    <contributor>
      <author>Administrator</author>
      <authoring_tool>Right Hemisphere Collada Interface v1536.36 with FCollada v3.05.</authoring_tool>
    </contributor>
    <created>2010-05-31T17:40:01Z</created>
    <modified>2010-05-31T17:40:07Z</modified>
    <up_axis>Z_UP</up_axis>
</asset>
 
<library_animations>
    <animation id="New_Scene_Animation"/>
</library_animations>
 
<library_images>
    <image id="_FF91900_x013A-img" name="_FF91900_x013A">
      <init_from>./5FF91900_x013A.DDS</init_from>
    </image>
    ……
</library_images>
   
<library_materials>
    <material id="Material013" name="Material013">
      <instance_effect url="#Material013-effect"/>
    </material>
    ……
</library_materials>   

<library_effects>     
    <effect id="Material013-effect" name="Material013">
      <profile_COMMON>
        <newparam sid="_FF91900_x013A-img-surface">
          <surface type="2D">
            <init_from>_FF91900_x013A-img</init_from>
            <format>A8R8G8B8</format>
          </surface>
        </newparam>
        <newparam sid="_FF91900_x013A-img-sampler">
          <sampler2D>
            <source>_FF91900_x013A-img-surface</source>
            <wrap_s>WRAP</wrap_s>
            <wrap_t>WRAP</wrap_t>
            <minfilter>NONE</minfilter>
            <magfilter>NONE</magfilter>
            <mipfilter>NONE</mipfilter>
          </sampler2D>
        </newparam>
        <technique sid="common">
          <phong>
            <emission>
              <color>0 0 0 0</color>
            </emission>
            <ambient>
              <color>0 0 0 0</color>
            </ambient>
            <diffuse>
              <texture texture="_FF91900_x013A-img-sampler" texcoord=""/>
            </diffuse>
            <specular>
              <color>0 0 0 0</color>
            </specular>
            <shininess>
              <float>0.5</float>
            </shininess>
            <transparent opaque="A_ONE">
              <color>0 0 0 1</color>
            </transparent>
            <transparency>
              <float>1</float>
            </transparency>
            <reflective>
            </reflective>
            <reflectivity>
            </reflectivity>
          </phong>
          <extra>
            <technique profile="FCOLLADA"/>
          </extra>
        </technique>
      </profile_COMMON>
    </effect>   
     
    ……
</library_effects>
   
</library_geometries>
  <library_controllers>
  <controller id="Mesh001-mesh-skin">
      <skin source="#Mesh001-mesh">
        <bind_shape_matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</bind_shape_matrix>
        <source id="Mesh001-mesh-skin-joints">
          <Name_array id="Mesh001-mesh-skin-joints-array" count="5">
            Bone018
            Bone037
            Bone040
            Bone038
            Bone041
          </Name_array>
          <technique_common>
            <accessor source="#Mesh001-mesh-skin-joints-array" count="5" stride="1">
              <param name="JOINT" type="Name"/>
            </accessor>
          </technique_common>
        </source>
        <source id="Mesh001-mesh-skin-bind_poses">
          <float_array id="Mesh001-mesh-skin-bind_poses-array" count="80">
            1 0 0 0 0 1 0 -0.796064567565918 0 0 1 -44.8114105224609 0 0 0 1
            1 0 0 0.924322986602783 0 1 0 1.74198894500732 0 0 1 -47.4328521728516 0 0 0 1
            1 0 0 -0.924322986602783 0 1 0 1.74198894500732 0 0 1 -47.4328521728516 0 0 0 1
            1 0 0 0.924322986602783 0 1 0 1.74198894500732 0 0 1 -47.4328521728516 0 0 0 1
            1 0 0 -0.924322986602783 0 1 0 1.74198894500732 0 0 1 -47.4328521728516 0 0 0 1
          </float_array>
          <technique_common>
            <accessor source="#Mesh001-mesh-skin-bind_poses-array" count="5" stride="16">
              <param name="TRANSFORM" type="float4x4"/>
            </accessor>
          </technique_common>
        </source>
        <source id="Mesh001-mesh-skin-weights">
          <float_array id="Mesh001-mesh-skin-weights-array" count="464">
            0 0.1647059 0.8352941 0
            0 0.08235294 0.9176471 0
            ……
            0 0 1 0
            0 0.09019608 0.9098039 0
            0 0 1 0
            0 0 1 0
            0 0 1 0
            0 0 1 0
            0 0 1 0
            0 0.1411765 0.8588235 0
          </float_array>
          <technique_common>
            <accessor source="#Mesh001-mesh-skin-weights-array" count="464" stride="1">
              <param name="WEIGHT" type="float"/>
            </accessor>
          </technique_common>
        </source>
        <joints>
          <input semantic="JOINT" source="#Mesh001-mesh-skin-joints"/>
          <input semantic="INV_BIND_MATRIX" source="#Mesh001-mesh-skin-bind_poses"/>
        </joints>
        <vertex_weights count="116">
          <input semantic="JOINT" source="#Mesh001-mesh-skin-joints" offset="0"/>
          <input semantic="WEIGHT" source="#Mesh001-mesh-skin-weights" offset="1"/>
          <vcount>
            4 4 4 4 4 4 4 4 4
            ……
            4 4 4 4 4 4
          </vcount>
          <v>
            0 0 1 1 0 2 0 3
            0 4 1 5 0 6 0 7
            ……
            0 460 2 461 0 462 0 463
          </v>
        </vertex_weights>
      </skin>
    </controller>
   
   
   
    <library_visual_scenes>
    <visual_scene id="new_scene" name="new_scene">
      <node id="Mesh001" name="Mesh001" type="NODE">
        <instance_geometry url="#Mesh001-lib">
          <bind_material>
            <technique_common>
              <instance_material symbol="Material007" target="#Material007"/>
            </technique_common>
          </bind_material>
        </instance_geometry>
      </node>

    </library_visual_scenes>
   
   
  <scene>
    <instance_visual_scene url="#new_scene"/>
  </scene>
 
 
</COLLADA>

   
http://s8/middle/5e308a5bx8860514f8967&690

http://s11/middle/5e308a5bx886052bc25ba&690


已经解决:
diffuse,specular,transparent,reflective共四层贴图
bone保留



尚有问题:
maya7不能识别reflective贴图
第五层贴图----detail mask/deltail map,如何在dae中使用?层材质?
ao map暂时作为specularhttp://s1/middle/5e308a5bx886081028f00&690


http://s16/middle/5e308a5bx886089e020af&690





0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有