Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Collada Models in Google Earth

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    12

    Collada Models in Google Earth

    I have an array of 3D models originally created using Openflight (.flt). Using Open Scene Graph I changed the format of these models to Collada (.dae). The models followed the Collada 1.4.1 format (as far as I know). After changing their format they were then dragged and dropped into Google Earth.

    I've tried to upload these models to the 3D warehouse, but i receive the error: "Invalid Collada file. The uploaded file must follow either the Collada 1.4.1 or Collada 1.5.1 schema specified at http://www.khronos.org/collada/"

    I've tried looking at the Collada 1.4.1 Schema, and the Schema of the models I have. To be honest, I cannot tell heads or tails of it all. What language it's in...etc. Is there an easy fix to this? I've tried saving it (the scene as far as I know) into a KMZ file, but I receive a different error: "(Shaefer.kmz) KMZ contains an unrecognized file type" (Shaefer is the name of the model).

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Collada Models in Google Earth

    Try running the COLLADA Coherency Checker on your file?

    What produced the "1.5.1" message? There is no such version.

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    12

    Re: Collada Models in Google Earth

    The 1.5.1 is something google tossed at me. I think there might be something wrong with their submission process...but i've yet to determine that. I'll need a collada model that passes the coherency test first.

    I've tried running the collada coherency test on my model...and I got nothing but massive failures.

    CHECK_count Failed (type=source,id=p1137_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p195_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p19_58-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p21_24-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p21_27-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p23_10-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p27_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p381_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p41_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p429_9-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p42_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p451_7-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p46_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p52_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p57_8-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p65_4-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p74_26-texcoord_0)stride count != number of param elementsCHECK_count
    Failed (type=source,id=p74_30-texcoord_0)stride count !=number of param elements


    How would I go about correcting these errors?

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Collada Models in Google Earth

    Can you provide more details about the OSG version you are using?

    Can you attach a .dae file exported from your OSG program that you are trying to validate?

  5. #5
    Junior Member
    Join Date
    Jun 2009
    Posts
    12

    Re: Collada Models in Google Earth

    Unfortunately the extension .dae is not allowed to be posted on here for some reason. But I posted it here:

    http://rapidshare.com/files/244289716/smp_schafer6.dae

  6. #6
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356

    Re: Collada Models in Google Earth

    All the arrays names ...texcoord_0 are boggus. They all contain Zero elements.
    All the geometry seem to want to have 2 texcoord per vertex (texcoord_0 and texcoord_1) but only the texcoord_1 is valid.
    Materials all reference the texcoord_0, I did not see any reference to texcoord_1 in the file.

    Looks like a bug in the exporter for sure.

    You can fix manually those files by:
    - removing all the ...texcoord_0 sources <source> ... </source>
    - removing reference to this array <input offset="3" .../>
    - changing the instance material to use the 2nd texcoords instead of the boggus one
    <bind_vertex_input semantic="texcoord0" input_semantic="TEXCOORD" input_set="0"/>
    replace with
    <bind_vertex_input semantic="texcoord0" input_semantic="TEXCOORD" input_set="1"/>

    Would be better to fix OSG, which is obviously confused when only one texcoord is valid.

    Note: If the google earth loader is correctly written it will ignore all the indices for offset="3"
    If the loader is boggus, then you have to:
    rename <input offset="4"> into <input offset="3">
    Remove every 5th element of the

    array in the <triangles>

    Good luck

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Collada Models in Google Earth

    Quote Originally Posted by arwise
    Unfortunately the extension .dae is not allowed to be posted on here for some reason. But I posted it here:

    http://rapidshare.com/files/244289716/smp_schafer6.dae
    Fixed permissions.

  8. #8
    Junior Member
    Join Date
    Jun 2009
    Posts
    12

    Re: Collada Models in Google Earth

    Well. I already have a question.
    When you say "removing all the ...texcoord_0 sources <source> ... </source>" you mean remove all of:

    <source id="p19_58-texcoord_0">
    <float_array id="p19_58-texcoord_0-array" count="0"/>
    <technique_common>
    <accessor count="0" source="#p19_58-texcoord_0-array" stride="0">
    <param name="S" type="float"/>
    <param name="T" type="float"/>
    </accessor>
    </technique_common>
    </source>

    And when you say - removing reference to this array <input offset="3" .../> You mean remove all of: <input offset="3" semantic="TEXCOORD" source="#p21_27-texcoord_0" set="0"/>

    The last step isn't that big of a concern. It would be much better to fix OSG...but i'm trying to see what step would be better? I mean...just getting rid of certain things...doesn't seem all that bad if it's all the same.

  9. #9
    Junior Member
    Join Date
    Jun 2009
    Posts
    12

    Re: Collada Models in Google Earth

    Ok. Everytime I try and modify the xml document...i.e. remove every instance of the:

    <source id="p451_7-texcoord_0">
    <float_array id="p451_7-texcoord_0-array" count="0"/>
    <technique_common>
    <accessor count="0" source="#p451_7-texcoord_0-array" stride="0">
    <param name="S" type="float"/>
    <param name="T" type="float"/>
    </accessor>
    </technique_common>
    </source>

    The model turns white. As in removie all of these source id's, removes the refernces to all of the sides of the model. I don't think these are all bogus...

    -Adam

  10. #10
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356

    Re: Collada Models in Google Earth

    yes, if you remove the accessor for textcoord the model would have no material.

    What I suggested is to look for the <source> in the document that contains no data and get rid of those sources, and remap the accessor to use the sources to the ones that have the UV coordinate.
    Additionaly, you can get rid of all the 'set=' since there is only one set of texcoord per vertex

    Regards

    BTW, you defiintly have to open a bug to the OSG community if you want this fixed. Please add a link to the bug you are opening into this thread for reference

Page 1 of 3 123 LastLast

Posting Permissions

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