Results 1 to 4 of 4

Thread: export .dae file in SketchUp6

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    8

    export .dae file in SketchUp6

    Hi,

    i'm new to SketchUp. And i want to buld 3D models in SketchUp and
    export it's model datas in .dae format. And then i can use these datas
    in OpenGL. For example, i draw a simple plan.

    Code :
      <?xml version="1.0" encoding="utf-8" ?> 
    - <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" 
    version="1.4.1"> 
    - <asset> 
    - <contributor> 
      <authoring_tool>Google SketchUp 6.4.112</authoring_tool> 
      </contributor> 
      <created>2008-09-27T12:36:47Z</created> 
      <modified>2008-09-27T12:36:47Z</modified> 
      <unit name="inches" meter="0.0254" /> 
      <up_axis>Z_UP</up_axis> 
      </asset> 
    - <library_materials> 
    - <material id="FrontColorID" name="FrontColor"> 
      <instance_effect url="#FrontColor-effect" /> 
      </material> 
    - <material id="BackColorID" name="BackColor"> 
      <instance_effect url="#BackColor-effect" /> 
      </material> 
    - <material id="ForegroundColorID" name="ForegroundColor"> 
      <instance_effect url="#ForegroundColor-effect" /> 
      </material> 
      </library_materials> 
    - <library_effects> 
    - <effect id="FrontColor-effect" name="FrontColor-effect"> 
    - <profile_COMMON> 
    - <technique sid="COMMON"> 
    - <phong> 
    - <emission> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </emission> 
    - <ambient> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </ambient> 
    - <diffuse> 
      <color>0.882353 0.882353 0.784314 1</color> 
      </diffuse> 
    - <specular> 
      <color>0.330000 0.330000 0.330000 1</color> 
      </specular> 
    - <shininess> 
      <float>20.000000</float> 
      </shininess> 
    - <reflectivity> 
      <float>0.100000</float> 
      </reflectivity> 
    - <transparent> 
      <color>1 1 1 1</color> 
      </transparent> 
    - <transparency> 
      <float>0.000000</float> 
      </transparency> 
      </phong> 
      </technique> 
      </profile_COMMON> 
      </effect> 
    - <effect id="BackColor-effect" name="BackColor-effect"> 
    - <profile_COMMON> 
    - <technique sid="COMMON"> 
    - <phong> 
    - <emission> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </emission> 
    - <ambient> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </ambient> 
    - <diffuse> 
      <color>0.501961 0.501961 0.784314 1</color> 
      </diffuse> 
    - <specular> 
      <color>0.330000 0.330000 0.330000 1</color> 
      </specular> 
    - <shininess> 
      <float>20.000000</float> 
      </shininess> 
    - <reflectivity> 
      <float>0.100000</float> 
      </reflectivity> 
    - <transparent> 
      <color>1 1 1 1</color> 
      </transparent> 
    - <transparency> 
      <float>0.000000</float> 
      </transparency> 
      </phong> 
      </technique> 
      </profile_COMMON> 
      </effect> 
    - <effect id="ForegroundColor-effect" name="ForegroundColor-effect"> 
    - <profile_COMMON> 
    - <technique sid="COMMON"> 
    - <phong> 
    - <emission> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </emission> 
    - <ambient> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </ambient> 
    - <diffuse> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </diffuse> 
    - <specular> 
      <color>0.330000 0.330000 0.330000 1</color> 
      </specular> 
    - <shininess> 
      <float>20.000000</float> 
      </shininess> 
    - <reflectivity> 
      <float>0.100000</float> 
      </reflectivity> 
    - <transparent> 
      <color>1 1 1 1</color> 
      </transparent> 
    - <transparency> 
      <float>0.000000</float> 
      </transparency> 
      </phong> 
      </technique> 
    - <extra> 
    - <technique profile="GOOGLEEARTH"> 
      <double_sided>1</double_sided> 
      </technique> 
      </extra> 
      </profile_COMMON> 
      </effect> 
      </library_effects> 
    - <library_geometries> 
    - <geometry id="mesh1-geometry" name="mesh1-geometry"> 
    - <mesh> 
    - <source id="mesh1-geometry-position"> 
      <float_array id="mesh1-geometry-position-array" count="12">22.234829 
    23.565564 0.000000 -19.765171 -18.434436 0.000000 -19.765171 23.565564 
    0.000000 22.234829 -18.434436 0.000000</float_array> 
    - <technique_common> 
    - <accessor source="#mesh1-geometry-position-array" count="4" 
    stride="3"> 
      <param name="X" type="float" /> 
      <param name="Y" type="float" /> 
      <param name="Z" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <source id="mesh1-geometry-normal"> 
      <float_array id="mesh1-geometry-normal-array" count="6">0.000000 
    0.000000 -1.000000 0.000000 0.000000 1.000000</float_array> 
    - <technique_common> 
    - <accessor source="#mesh1-geometry-normal-array" count="2" 
    stride="3"> 
      <param name="X" type="float" /> 
      <param name="Y" type="float" /> 
      <param name="Z" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <source id="mesh1-geometry-uv"> 
      <float_array id="mesh1-geometry-uv-array" count="8">-22.234829 
    23.565564 19.765171 -18.434436 19.765171 23.565564 -22.234829 
    -18.434436</float_array> 
    - <technique_common> 
    - <accessor source="#mesh1-geometry-uv-array" count="4" stride="2"> 
      <param name="S" type="float" /> 
      <param name="T" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <vertices id="mesh1-geometry-vertex"> 
      <input semantic="POSITION" source="#mesh1-geometry-position" /> 
      </vertices> 
    - <triangles material="FrontColor" count="2"> 
      <input semantic="VERTEX" source="#mesh1-geometry-vertex" offset="0" / 
     
     
     
     
      <input semantic="NORMAL" source="#mesh1-geometry-normal" offset="1" / 
     
     
     
      <input semantic="TEXCOORD" source="#mesh1-geometry-uv" offset="2" 
    set="0" /> 
     
     
    0 0 0 1 0 1 2 0 2 1 0 1 0 0 0 3 0 3</p> 
      </triangles> 
    - <triangles material="BackColor" count="2"> 
      <input semantic="VERTEX" source="#mesh1-geometry-vertex" offset="0" / 
     
     
     
      <input semantic="NORMAL" source="#mesh1-geometry-normal" offset="1" / 
     
     
     
      <input semantic="TEXCOORD" source="#mesh1-geometry-uv" offset="2" 
    set="0" /> 
     
     
    2 1 2 1 1 1 0 1 0 3 1 3 0 1 0 1 1 1</p> 
      </triangles> 
      </mesh> 
      </geometry> 
    - <geometry id="mesh2-geometry" name="mesh2-geometry"> 
    - <mesh> 
    - <source id="mesh2-geometry-position"> 
      <float_array id="mesh2-geometry-position-array" 
    count="12">-19.765171 -18.434436 0.000000 -19.765171 23.565564 
    0.000000 22.234829 -18.434436 0.000000 22.234829 23.565564 0.000000</ 
    float_array> 
    - <technique_common> 
    - <accessor source="#mesh2-geometry-position-array" count="4" 
    stride="3"> 
      <param name="X" type="float" /> 
      <param name="Y" type="float" /> 
      <param name="Z" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <vertices id="mesh2-geometry-vertex"> 
      <input semantic="POSITION" source="#mesh2-geometry-position" /> 
      </vertices> 
    - <lines material="ForegroundColor" count="4"> 
      <input semantic="VERTEX" source="#mesh2-geometry-vertex" offset="0" / 
     
     
     
     
     
    0 1 2 0 3 2 1 3</p> 
      </lines> 
      </mesh> 
      </geometry> 
      </library_geometries> 
    - <library_cameras> 
    - <camera id="Camera-camera" name="Camera-camera"> 
    - <optics> 
    - <technique_common> 
    - <perspective> 
      <xfov>40.000000</xfov> 
      <yfov>30.000000</yfov> 
      <znear>1.000000</znear> 
      <zfar>1000.000000</zfar> 
      </perspective> 
      </technique_common> 
      </optics> 
      </camera> 
      </library_cameras> 
    - <library_visual_scenes> 
    - <visual_scene id="SketchUpScene" name="SketchUpScene"> 
    - <node id="Model" name="Model"> 
    - <node id="mesh1" name="mesh1"> 
    - <instance_geometry url="#mesh1-geometry"> 
    - <bind_material> 
    - <technique_common> 
      <instance_material symbol="FrontColor" target="#FrontColorID" /> 
      <instance_material symbol="BackColor" target="#BackColorID" /> 
      </technique_common> 
      </bind_material> 
      </instance_geometry> 
      </node> 
    - <node id="mesh2" name="mesh2"> 
    - <instance_geometry url="#mesh2-geometry"> 
    - <bind_material> 
    - <technique_common> 
      <instance_material symbol="ForegroundColor" 
    target="#ForegroundColorID" /> 
      </technique_common> 
      </bind_material> 
      </instance_geometry> 
      </node> 
      </node> 
    - <node id="Camera" name="Camera"> 
      <matrix>1.000000 0.000000 0.000000 1.234829 0.000000 1.000000 
    0.000000 2.565564 0.000000 0.000000 1.000000 500.008107 0.000000 
    0.000000 0.000000 1.000000</matrix> 
      <instance_camera url="#Camera-camera" /> 
      </node> 
      </visual_scene> 
      </library_visual_scenes> 
    - <scene> 
      <instance_visual_scene url="#SketchUpScene" /> 
      </scene> 
      </COLLADA>

    (1) i just draw one plan that is divided into two triangles. i think
    the two triangles are indicated completely by mesh1, so what is mesh2?
    i found that mesh2 refers some lines called foreground colr. why do we
    need these lines?
    (2) there are two different triangle materials in mesh1 frontcolor and
    backcolor respectively. i guess they are the same plan but been saw in
    different direction. Why need this?
    (3) what do mesh1-geometry-uv-array mean? i didn't use any texture
    map, why there is UV? how can i use these datas?
    (4) why all the geometries are name in color? it seems strange.


    I'm really puzzled by these problems for many days, Could anyone can
    help me? Looking forward to fast replying.Thank you.


    Mia

  2. #2
    Hi Mia

    I'll see if I can get some of the Sketchup engineers to have a look at this. It would be helpful if you could post both the .dae file and the original sketchup files (as attachments) here so we can try loading them into our test programs.

    Greg

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Posts
    4

    Re: export .dae file in SketchUp6

    Could you post the skp file that generated your dae file? Could you also describe the export options you used? Thanks.
    Quote Originally Posted by freesui1984
    Hi,

    i'm new to SketchUp. And i want to buld 3D models in SketchUp and
    export it's model datas in .dae format. And then i can use these datas
    in OpenGL. For example, i draw a simple plan.

    Code :
      <?xml version="1.0" encoding="utf-8" ?> 
    - <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" 
    version="1.4.1"> 
    - <asset> 
    - <contributor> 
      <authoring_tool>Google SketchUp 6.4.112</authoring_tool> 
      </contributor> 
      <created>2008-09-27T12:36:47Z</created> 
      <modified>2008-09-27T12:36:47Z</modified> 
      <unit name="inches" meter="0.0254" /> 
      <up_axis>Z_UP</up_axis> 
      </asset> 
    - <library_materials> 
    - <material id="FrontColorID" name="FrontColor"> 
      <instance_effect url="#FrontColor-effect" /> 
      </material> 
    - <material id="BackColorID" name="BackColor"> 
      <instance_effect url="#BackColor-effect" /> 
      </material> 
    - <material id="ForegroundColorID" name="ForegroundColor"> 
      <instance_effect url="#ForegroundColor-effect" /> 
      </material> 
      </library_materials> 
    - <library_effects> 
    - <effect id="FrontColor-effect" name="FrontColor-effect"> 
    - <profile_COMMON> 
    - <technique sid="COMMON"> 
    - <phong> 
    - <emission> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </emission> 
    - <ambient> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </ambient> 
    - <diffuse> 
      <color>0.882353 0.882353 0.784314 1</color> 
      </diffuse> 
    - <specular> 
      <color>0.330000 0.330000 0.330000 1</color> 
      </specular> 
    - <shininess> 
      <float>20.000000</float> 
      </shininess> 
    - <reflectivity> 
      <float>0.100000</float> 
      </reflectivity> 
    - <transparent> 
      <color>1 1 1 1</color> 
      </transparent> 
    - <transparency> 
      <float>0.000000</float> 
      </transparency> 
      </phong> 
      </technique> 
      </profile_COMMON> 
      </effect> 
    - <effect id="BackColor-effect" name="BackColor-effect"> 
    - <profile_COMMON> 
    - <technique sid="COMMON"> 
    - <phong> 
    - <emission> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </emission> 
    - <ambient> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </ambient> 
    - <diffuse> 
      <color>0.501961 0.501961 0.784314 1</color> 
      </diffuse> 
    - <specular> 
      <color>0.330000 0.330000 0.330000 1</color> 
      </specular> 
    - <shininess> 
      <float>20.000000</float> 
      </shininess> 
    - <reflectivity> 
      <float>0.100000</float> 
      </reflectivity> 
    - <transparent> 
      <color>1 1 1 1</color> 
      </transparent> 
    - <transparency> 
      <float>0.000000</float> 
      </transparency> 
      </phong> 
      </technique> 
      </profile_COMMON> 
      </effect> 
    - <effect id="ForegroundColor-effect" name="ForegroundColor-effect"> 
    - <profile_COMMON> 
    - <technique sid="COMMON"> 
    - <phong> 
    - <emission> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </emission> 
    - <ambient> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </ambient> 
    - <diffuse> 
      <color>0.000000 0.000000 0.000000 1</color> 
      </diffuse> 
    - <specular> 
      <color>0.330000 0.330000 0.330000 1</color> 
      </specular> 
    - <shininess> 
      <float>20.000000</float> 
      </shininess> 
    - <reflectivity> 
      <float>0.100000</float> 
      </reflectivity> 
    - <transparent> 
      <color>1 1 1 1</color> 
      </transparent> 
    - <transparency> 
      <float>0.000000</float> 
      </transparency> 
      </phong> 
      </technique> 
    - <extra> 
    - <technique profile="GOOGLEEARTH"> 
      <double_sided>1</double_sided> 
      </technique> 
      </extra> 
      </profile_COMMON> 
      </effect> 
      </library_effects> 
    - <library_geometries> 
    - <geometry id="mesh1-geometry" name="mesh1-geometry"> 
    - <mesh> 
    - <source id="mesh1-geometry-position"> 
      <float_array id="mesh1-geometry-position-array" count="12">22.234829 
    23.565564 0.000000 -19.765171 -18.434436 0.000000 -19.765171 23.565564 
    0.000000 22.234829 -18.434436 0.000000</float_array> 
    - <technique_common> 
    - <accessor source="#mesh1-geometry-position-array" count="4" 
    stride="3"> 
      <param name="X" type="float" /> 
      <param name="Y" type="float" /> 
      <param name="Z" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <source id="mesh1-geometry-normal"> 
      <float_array id="mesh1-geometry-normal-array" count="6">0.000000 
    0.000000 -1.000000 0.000000 0.000000 1.000000</float_array> 
    - <technique_common> 
    - <accessor source="#mesh1-geometry-normal-array" count="2" 
    stride="3"> 
      <param name="X" type="float" /> 
      <param name="Y" type="float" /> 
      <param name="Z" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <source id="mesh1-geometry-uv"> 
      <float_array id="mesh1-geometry-uv-array" count="8">-22.234829 
    23.565564 19.765171 -18.434436 19.765171 23.565564 -22.234829 
    -18.434436</float_array> 
    - <technique_common> 
    - <accessor source="#mesh1-geometry-uv-array" count="4" stride="2"> 
      <param name="S" type="float" /> 
      <param name="T" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <vertices id="mesh1-geometry-vertex"> 
      <input semantic="POSITION" source="#mesh1-geometry-position" /> 
      </vertices> 
    - <triangles material="FrontColor" count="2"> 
      <input semantic="VERTEX" source="#mesh1-geometry-vertex" offset="0" / 
     
     
     
     
      <input semantic="NORMAL" source="#mesh1-geometry-normal" offset="1" / 
     
     
     
      <input semantic="TEXCOORD" source="#mesh1-geometry-uv" offset="2" 
    set="0" /> 
     
     
    0 0 0 1 0 1 2 0 2 1 0 1 0 0 0 3 0 3</p> 
      </triangles> 
    - <triangles material="BackColor" count="2"> 
      <input semantic="VERTEX" source="#mesh1-geometry-vertex" offset="0" / 
     
     
     
      <input semantic="NORMAL" source="#mesh1-geometry-normal" offset="1" / 
     
     
     
      <input semantic="TEXCOORD" source="#mesh1-geometry-uv" offset="2" 
    set="0" /> 
     
     
    2 1 2 1 1 1 0 1 0 3 1 3 0 1 0 1 1 1</p> 
      </triangles> 
      </mesh> 
      </geometry> 
    - <geometry id="mesh2-geometry" name="mesh2-geometry"> 
    - <mesh> 
    - <source id="mesh2-geometry-position"> 
      <float_array id="mesh2-geometry-position-array" 
    count="12">-19.765171 -18.434436 0.000000 -19.765171 23.565564 
    0.000000 22.234829 -18.434436 0.000000 22.234829 23.565564 0.000000</ 
    float_array> 
    - <technique_common> 
    - <accessor source="#mesh2-geometry-position-array" count="4" 
    stride="3"> 
      <param name="X" type="float" /> 
      <param name="Y" type="float" /> 
      <param name="Z" type="float" /> 
      </accessor> 
      </technique_common> 
      </source> 
    - <vertices id="mesh2-geometry-vertex"> 
      <input semantic="POSITION" source="#mesh2-geometry-position" /> 
      </vertices> 
    - <lines material="ForegroundColor" count="4"> 
      <input semantic="VERTEX" source="#mesh2-geometry-vertex" offset="0" / 
     
     
     
     
     
    0 1 2 0 3 2 1 3</p> 
      </lines> 
      </mesh> 
      </geometry> 
      </library_geometries> 
    - <library_cameras> 
    - <camera id="Camera-camera" name="Camera-camera"> 
    - <optics> 
    - <technique_common> 
    - <perspective> 
      <xfov>40.000000</xfov> 
      <yfov>30.000000</yfov> 
      <znear>1.000000</znear> 
      <zfar>1000.000000</zfar> 
      </perspective> 
      </technique_common> 
      </optics> 
      </camera> 
      </library_cameras> 
    - <library_visual_scenes> 
    - <visual_scene id="SketchUpScene" name="SketchUpScene"> 
    - <node id="Model" name="Model"> 
    - <node id="mesh1" name="mesh1"> 
    - <instance_geometry url="#mesh1-geometry"> 
    - <bind_material> 
    - <technique_common> 
      <instance_material symbol="FrontColor" target="#FrontColorID" /> 
      <instance_material symbol="BackColor" target="#BackColorID" /> 
      </technique_common> 
      </bind_material> 
      </instance_geometry> 
      </node> 
    - <node id="mesh2" name="mesh2"> 
    - <instance_geometry url="#mesh2-geometry"> 
    - <bind_material> 
    - <technique_common> 
      <instance_material symbol="ForegroundColor" 
    target="#ForegroundColorID" /> 
      </technique_common> 
      </bind_material> 
      </instance_geometry> 
      </node> 
      </node> 
    - <node id="Camera" name="Camera"> 
      <matrix>1.000000 0.000000 0.000000 1.234829 0.000000 1.000000 
    0.000000 2.565564 0.000000 0.000000 1.000000 500.008107 0.000000 
    0.000000 0.000000 1.000000</matrix> 
      <instance_camera url="#Camera-camera" /> 
      </node> 
      </visual_scene> 
      </library_visual_scenes> 
    - <scene> 
      <instance_visual_scene url="#SketchUpScene" /> 
      </scene> 
      </COLLADA>

    (1) i just draw one plan that is divided into two triangles. i think
    the two triangles are indicated completely by mesh1, so what is mesh2?
    i found that mesh2 refers some lines called foreground colr. why do we
    need these lines?
    (2) there are two different triangle materials in mesh1 frontcolor and
    backcolor respectively. i guess they are the same plan but been saw in
    different direction. Why need this?
    (3) what do mesh1-geometry-uv-array mean? i didn't use any texture
    map, why there is UV? how can i use these datas?
    (4) why all the geometries are name in color? it seems strange.


    I'm really puzzled by these problems for many days, Could anyone can
    help me? Looking forward to fast replying.Thank you.


    Mia

  4. #4
    Junior Member
    Join Date
    Sep 2008
    Posts
    8

    Re:

    Hi,

    i don't find any tool on this forum to attach my file. i upload the file on http://www.khronos.org/message_board...3&p=3578#p3578
    .Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •