Results 1 to 2 of 2

Thread: KML, COLLADA, Goolge Earth: using spline tag in COLLADA

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    3

    KML, COLLADA, Goolge Earth: using spline tag in COLLADA

    Hi,

    i am new in kml and Collada. I bought the book "COLLADA Sailing the Gulf of 3D Digital Content Creation" to learn how can i use COLLADA. I did try to use spline tag in my dae file (from Chapter4: Curve Interpolation) but i cannot see anything in Google Earth.
    Can you please help me? It would be nice of you.

    P.S.: please see my code below. I hope i am right here in this Forum.

    Thanks.
    Best regards.
    Sphere

    KML Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <kml xmlns="http://www.opengis.net/kml/2.2">
    <Folder>
    <name>LinearSpline</name>
    <description>An Example to try using Linear Spline</description>
    <LookAt>
    <latitude>36.08260761307279</latitude>
    <longitude>-112.2552505069063</longitude>
    <range>1500.0</range>
    </LookAt>
    <Style id="BackColor">
    <LineStyle>
    <color>7f00ff00</color>
    <width>1005</width>
    </LineStyle>
    </Style>
    <Placemark>
    <name>Model</name>
    <description><![CDATA[]]></description>
    <Style id='default'>
    <styleUrl>#BackColor</styleUrl>
    </Style>
    <Model>
    <altitudeMode>absolute</altitudeMode>
    <Location>
    <latitude>36.08260761307279</latitude>
    <longitude>-112.2552505069063</longitude>
    <altitude>0</altitude>
    </Location>
    <Orientation>
    <heading>0</heading>
    <tilt>0</tilt>
    <roll>0.0</roll>
    </Orientation>
    <Link>
    <href>models/LinearSpline.dae</href>
    </Link>
    </Model>
    </Placemark>
    </Folder>
    </kml>

    LinearSpline.dae:

    <?xml version="1.0" encoding="utf-8"?>
    <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
    <asset>
    <contributor>
    <author>Sphere</author>
    <authoring_tool>Google SketchUp 6.4.112</authoring_tool>
    </contributor>
    <created>2008-05-28T18:03:11Z</created>
    <modified>2008-05-28T18:03:11Z</modified>
    <unit name="inches" meter="0.0254"/>

    <up_axis>Z_UP</up_axis>
    </asset>
    <library_geometries>
    <geometry id="spline" name="spline">
    <spline closed="false">
    <source id="positions">
    <float_array id="positions-array" count="12">
    -112.2552505069063,36.08260761307279,2357
    -112.2564540158376,36.08395660588506,2357
    -112.2568540158388,36.08395660588506,2357
    -112.2552505069063,36.08260761307279,2357
    </float_array>
    <technique_common>
    <accessor source="#positions-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="interpolations">
    <Name_array id="interpolations-array" count="4">
    LINEAR LINEAR LINEAR LINEAR
    </Name_array>
    <technique_common>
    <accessor source="#interpolations-array" count="4" stride="1">
    <param name="INTERPOLATION" type="Name"/>
    </accessor>
    </technique_common>
    </source>
    <control_vertices>
    <input semantic="POSITION" source = "#positions"/>
    <input semantic="INTERPOLATION" source="#interpolations"/>
    </control_vertices>
    <vertices id="spline-vertex">
    <input semantic="POSITION" source="#spline"/>
    </vertices>
    </spline>
    </geometry>
    </library_geometries>
    <library_cameras>
    <camera id="Camera-camera" name="Camera-camera">
    <optics>
    <technique_common>
    <perspective>
    <xfov>46.666667</xfov>
    <yfov>35.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="position" name="position">
    <instance_geometry url="#spline">
    </instance_geometry>
    </node>
    <node id="Spline" name="Spline">
    <instance_geometry url="#interpolations">
    </instance_geometry>
    </node>
    </node>
    <node id="Camera" name="Camera">
    <matrix>
    0.848819 -0.139169 0.510038 539.801860
    0.528684 0.223440 -0.818882 -535.307595
    0.000000 0.964731 0.263237 328.919934
    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>

  2. #2
    bryces
    Guest

    Re: KML, COLLADA, Goolge Earth: using spline tag in COLLADA

    Hi Sphere

    Google Earth doesn't support true spline curves. You will have to approximate your spline with straight line segments.

    Best Regards
    Bryce Stout
    Product Manager
    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
  •