Results 1 to 2 of 2

Thread: Problems inserting .dae objects on Google Earth

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    3

    Problems inserting .dae objects on Google Earth

    I noticed that a lot of tags of .dae don't work on Google Earth,like <polygon> and <polylist>.
    I am drawing everything with triangles to solve this problem. But now a have a major problem. The tag <geographic location> doesnt work.
    Here comes the example:
    I am just trying to draw a wall with 20 meters height beetween this 2 points:
    (This coordinates are in WGS84 projection, the same as google earth)
    p1 : -43.9537875545231 -19.8921859968038
    p2 : -43.9537043370875,-19.8921803583847


    <code>
    <?xml version="1.0" encoding="utf-8"?>
    <COLLADA xmlns="http://www.collada.org/2008/03/COLLADASchema" version="1.5.0">
    <asset>
    <coverage>
    <geographic_location>
    <longitude>-43.9537875545231</longitude>
    <latitude>-19.8921859968038</latitude>
    <altitude mode="relativeToGround">0</altitude>
    </geographic_location>
    </coverage>

    </asset>
    <library_images>
    <image id="material0-image">
    <init_from>tijolo.jpg</init_from>
    </image>
    </library_images>
    <library_materials>
    <material id="material0ID">
    <instance_effect url="#material0-effect"/>
    </library_materials>
    <library_effects>
    <effect id="material0-effect">
    <profile_COMMON>
    <newparam sid="material0-image-surface">
    <surface type="2D">
    <init_from>material0-image</init_from>
    </surface>
    </newparam>
    <newparam sid="material0-image-sampler">
    <sampler2D>
    <source>material0-image-surface</source>
    </sampler2D>
    </newparam>
    <technique sid="COMMON">
    <phong>
    <diffuse>
    <texture texture="material0-image-sampler" texcoord="UVSET0"/>
    </diffuse>
    </phong>
    </technique>
    <extra>
    <technique profile="GOOGLEEARTH">
    <double_sided>1</double_sided>
    </technique>
    </extra>
    </profile_COMMON>
    </effect>
    </library_effects>
    <library_geometries>
    <geometry id="mesh1-geometry">
    <mesh>
    <source id="mesh1-geometry-position">
    <float_array id="mesh1-geometry-position-array" count="12">
    -43.9537875545231 -19.8921859968038 0
    -43.9537043370875 -19.8921803583847 0
    -43.9537043370875 -19.8921803583847 20
    -43.9537875545231 -19.8921859968038 20
    </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-uv">
    <float_array id="mesh1-geometry-uv-array" count="8">0 1 1 1 0 0 1 0 </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="material0" count="2">
    <input semantic="VERTEX" source="#mesh1-geometry-vertex" offset="0"/>
    <input semantic="TEXCOORD" source="#mesh1-geometry-uv" offset="1"/>



    0 2 1 3 2 1
    0 2 2 1 3 0
    </p>
    </triangles>
    </mesh>
    </geometry>
    </library_geometries>
    <library_visual_scenes>
    <visual_scene id="Cena">
    <node id="mesh1">
    <instance_geometry url="#mesh1-geometry">
    <bind_material>
    <technique_common>
    <instance_material symbol="material0" target="#material0ID">
    <bind_vertex_input semantic="UVSET0" input_semantic="TEXCOORD" input_set="0"/>
    </instance_material>
    </technique_common>
    </bind_material>
    </instance_geometry>
    </node>
    </visual_scene>
    </library_visual_scenes>
    <scene>
    <instance_visual_scene url="#Cena"/>
    </scene>
    </COLLADA>
    </code>

    When i remove the tags in red, it's works, but of course not in the correct geographical space.

  2. #2
    Junior Member
    Join Date
    Mar 2009
    Posts
    3

    Re: Problems inserting .dae objects on Google Earth

    Hi There

    Google Earth doesn't yet support the 1.5 spec. Currently it supports the 1.4.1 spec which doesn't include the geo-location tag. If you want to correctly locate a model you can wrap it in a kmz file (http://code.google.com/apis/kml/documen ... hives.html).

    Best Regards
    Bryce Stout
    Product Manger
    Google

Posting Permissions

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