Results 1 to 7 of 7

Thread: collada file referencing

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    4

    collada file referencing

    Hi,

    i dig up this old post to ask for help on the same subject.

    I would like to try to reference externals collada files with the simplest file. "sthomas" gave a trivial example above but i can't reproduce it.

    I downloaded the "cube.dae" sample file from the Collada test model bank. I would like to reference it from another dae file. This is the file :
    Code :
    <?xml version="1.0"?>
    <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
        <asset>
            <created>2006-06-21T21:23:22Z</created>
            <modified>2006-06-21T21:23:22Z</modified>
            <up_axis>Y_UP</up_axis>
        </asset>
        <library_visual_scenes>
            <visual_scene id="VisualSceneNode" name="untitled">
    				<node name="cube">
    					<instance_node url="cube.dae"/>
    				</node>
            </visual_scene>
        </library_visual_scenes>
        <scene>
            <instance_visual_scene url="#VisualSceneNode"/>
        </scene>
    </COLLADA>

    Of course, this file and cube.dae are in the same folder.

    When i run coherencyTest on it, it can't resolve the uri :
    Code :
    ERROR: DOM Error Handler msg=daeStandardURIResolver::resolveElement() - Failed to resolve file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae
    ERROR: CHECK_uri Failed uri=file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae not resolved
    ERROR: DOM Error Handler msg=daeStandardURIResolver::resolveElement() - Failed to resolve file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae

    If I append "#rootNode" after cube.dae, i get the same result.

    2 remarks :
    - Collada Schema is 1.4.1? Does it support external references or only the 1.5?
    - CoherencyTest could not resolve "file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae". I would expect file://. But when i write the full path with that, i get even more errors.

    Could someone help me?

    What am i doing wrong ?

    Where can i get a sample file with working external references ?

    Thanks

  2. #2
    Gruik
    Guest

    Re: collada file referencing

    Hi,

    Just a little thing: You indeed need the #node_you_want_to_instanciate. For me the coherency test work and most of the time Maya import my collada files. I followed the 1.4.1 when I did this.

    But it's known (of what I heard from the Collada Fest this year) that almost all 3D softwares don't handle file referencing very well in Collada.

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

    Re: collada file referencing

    Quote Originally Posted by bugger
    When i run coherencyTest on it, it can't resolve the uri :
    What version of the software are you running?
    What is the current working directory for the app?
    What are the command line arguments that you used?
    Quote Originally Posted by bugger
    2 remarks :
    - Collada Schema is 1.4.1? Does it support external references or only the 1.5?
    - CoherencyTest could not resolve "file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae". I would expect file://. But when i write the full path with that, i get even more errors.
    All versions of the COLLADA schema use URI to reference other documents.

    The correct syntax for a file: scheme URL is defined in RFC 1738 and is "file://<host>/<path>" where <host> can be empty or "localhost" and <path> is an absolute path. E.g. "file:///D:/file.txt".

  4. #4
    Junior Member
    Join Date
    Aug 2006
    Posts
    4

    Re: collada file referencing

    You indeed need the #node_you_want_to_instanciate
    ok, but as I said before, if I use cube.dae#rootNode, I get the same error message. But I wonder if rootNode is a reserved word, or a real name that must appear in the referenced file?

    What version of the software are you running?
    What is the current working directory for the app?
    What are the command line arguments that you used?
    -CoherencyTest v1.3
    -coherencyTest, scene.dae (the file I mention in my first post) and cube.dae are in the same directory
    -no argument except the file name.


    I tried with the correct syntax. The url is then
    Code :
    file:///D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae#rootNode

    I get again the same message from coherencyTest :
    Code :
    ERROR: DOM Error Handler msg=daeStandardURIResolver::resolveElement() - Failed to resolve file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae#rootNode
    ERROR: CHECK_uri Failed uri=file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae#rootNode not resolved
    ERROR: DOM Error Handler msg=daeStandardURIResolver::resolveElement() - Failed to resolve file:/D:/Documents/Utilitaires/ColladaSamples/testInclusion/cube.dae#rootNode

    As I mention before, cube.dae is the one from the collada test bank. Does someone successfully referenced it ? It should only take few second to test.

    If you use my scene.dae file, can you reproduce my issue?

    Thanks again

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    4

    Re: collada file referencing

    I looked for files samples on google earth and 3Dvia but nothing.

    I guess someone already tried that! May I have some samples files please ?

    By the way, do you know if google earth handles correctly extern references?

  6. #6
    Junior Member
    Join Date
    Aug 2006
    Posts
    4

    Re: collada file referencing

    OK, I manage to have no errors from coherencyTest by specifing #<existing node name> instead of rootNode. The syntax must be correct, but i have no means to check if the final result is correct. As I specify only a node with material, effects, ... I wonder if the resolver will get them automatically in the referenced file?

    I tried to view the scene under ColladaAirViewer SwirlViewer, and GoogleEarth. Nothing appears. Any ideas?

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

    Re: collada file referencing

    What does your final result look like?

    It's pretty simple: if the URL is correct and the resource is available then a conforming tool should resolve the URL and load the resource.

    It's still the case that many 3D tools, outside of Web and networked applications, do not handle URI correctly or even external references to local files (they load one file). I suggest that if the viewers you want to use are broken then please go to the support sites for the ones that fail and report external reference handling bugs.

Posting Permissions

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