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

Thread: Imcompatibility across different packages

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

    Imcompatibility across different packages

    It is allow using collada specification to write files that are syntactically 100% collada 1.4.x compliance, but that are a subset of the grammar?
    Say for example changing the extension from xml, or dae to something else.

    The reason I say this is because I had found that plugging makers for popular modeling packages violates Collada specifications.
    It appears that Fcollada is more strict and compliance than Collada DOM, for what I can see collada Dom is a wrapper over XML with not type validations of any kind.

    My primary concern is to have true data exchangeable functionality, but only on the type of data I am operating. Collada provides that but it provides a lot more.

    It may sound a triviality, but for example if I export a cube from XSI, I can load it in Max but it comes with a whole set of other things, like camera, light, procedural model, etc.
    If I experts a cube from Max then XSI collada do not understand the format.
    And I give up on blender, blender exported files are not collada compliance at all.

    So for me saying that my library supports Collada will be a cause for debates, each time some one try to load a file with a package that does not support the data. Since I am an underdog I do not want to go into debates and explanation. But if the file have a different extension I do not have to explain anything, It will be collada as long as the package plug-in is 100% collade compliance. And it will be upto the user to rename it to DAE.

    So far all files I generates can be loaded and parsed by Fcollada library, the Max plugin, and Collada viewer from free soft where. But not by Blender, XSI, and I had not tested on Maya.

    It is possible that I just do not understand Collada but I had some sample file that I had created and I can post a link, perhaps some body would like to test then with this packages and maybe tell me if I am doing something wrong.
    They go from a simple a cube to medium complexity to fairly complex hierarchies.
    Julio

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    It is allow using collada specification to write files that are syntactically 100% collada 1.4.x compliance, but that are a subset of the grammar?
    I am not sure what you mean, but in order to test if a COLLADA file is compliant you have a two major tools available:

    - XML validator. You can use any XML validator (like XMLSpy, or embedded in libraries such as libXML2) to validate a COLLADA document. This will check for all that we could express in the Schema language.
    - Coherency test: this is a set of conditioners that will check for consistency/coherency of the document. This covers for the part of the specification that cannot be embedded in the schema. (for example, is the count parameter matches with the number of elements). We are adding conditioners to this test each time we find an implementation problem.

    If you find out that some tools are violating any of the above tests, please immediately report bugs to the tool developer.

    Say for example changing the extension from xml, or dae to something else.
    .dae is the extension chosen for COLLADA documents. You can also use .xml, since COLLADA documents are XML documents, but it is always more convenient to use the dae extension to know upfront what the file may contain.

    The reason I say this is because I had found that plugging makers for popular modeling packages violates Collada specifications.
    As incredible as it may be, some do not read the specification at all ! I found out that some do reverse engineering on files exported by their favorite tool, not even checking that the document validates, propagating errors.
    So it is really important to chase down all those implementations, and help them to fix the issues. This is why the coherency test is very important in my opinion, since this provides with an easy way for everybody to test, without any doubts.
    Of course, the main way to get all those implementation and quality issues solved is to find and report bugs, and to follow up with vendors very regularly to make sure those are fixed. This is what SCE focus in on, and we will keep doing this until the level of quality is good.

    It appears that Fcollada is more strict and compliance than Collada DOM, for what I can see collada Dom is a wrapper over XML with not type validations of any kind.
    You can compile the DOM so that it will use libXML2 to validate the data against the schema every time it is loaded. I do not know the details but I was told it is easy.

    Your point though, is that FCOLLADA and COLLADA-DOM are different. FCOLLADA has a higher level of abstractation, and make it easier for programming import/exports, but the COLLADA-DOM gives you more control, and is a lot closer to the schema, since its front-end is generated automatically from the XML Schema.


    It may sound a triviality, but for example if I export a cube from XSI, I can load it in Max but it comes with a whole set of other things, like camera, light, procedural model, etc.
    If I experts a cube from Max then XSI collada do not understand the format.
    I am not sure I understand what the problem is ? You export a cube from Max in COLLADA and XSI cannot load it back ?
    There are issues that we are getting fixed, but they concern advanced features, for most users, the interchange between MAX, Maya, and XSI works perfectly .

    And I give up on blender, blender exported files are not collada compliance at all.
    That is correct, but since Blender is an open-source project, the work in the export/import is done by donating time to this project. They are currently working on animation, but have basic issues with textures. The Physics part works great though, which is more advanced than what 3dsMAx provides at the moment. I guess my point is that it is up to the community to help with the development of the Blender plug-in

    So for me saying that my library supports Collada will be a cause for debates, each time some one try to load a file with a package that does not support the data. Since I am an underdog I do not want to go into debates and explanation. But if the file have a different extension I do not have to explain anything, It will be collada as long as the package plug-in is 100% collade compliance. And it will be upto the user to rename it to DAE.
    That is why we have made the coherency test available, which BTW now includes the XML validation. You now have a good way to test the data, and close debates.


    It is possible that I just do not understand Collada but I had some sample file that I had created and I can post a link, perhaps some body would like to test then with this packages and maybe tell me if I am doing something wrong.
    They go from a simple a cube to medium complexity to fairly complex hierarchies.
    Samples are important, and we have neglected that part so far. We have just released 1.4.1 samples, and want to grow a database of sample data. I'll get someone to contact you to see if you would accept to donate those samples to the community, provided they pass the coherency test !

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    28
    Well I may be wrong but I believe I exported a simple triangulated cube from Max at work, and XSI 5.11 refuses to load it. I saved a cube from XSI and Max can load it without problems. Maybe the file was corrupted I will try again but I am very positive this was right since I can load the file as well and the file also loads with collada viewer from Feeling Software.

    Beside this is pointless if the answer to my first question is no. So I ask again, It is not allowed to distribute files or a tool that generates files that are grammatically correct according to this document http://www.khronos.org/cgi-bin/fetch/fe ... a_spec_1_4 but that have a different extension?

    And for the record I see that you move forth and back between XML and DAE, and perhaps these is why there is so much anarchy with data exported from different packages with collada exporters.
    The way I understand all DAE file are XML files but not all XML file are Collada files, and collada dom seems to accept a XMLs file as a valid DAE file.

    I do not want to tell you what is right or what is wrong, I just want to come to a solution that is simple enough for me and my users, and be as standard as it can possible be.

    I will do the cube test again and if post me finding.
    Julio

  4. #4
    Junior Member
    Join Date
    Aug 2006
    Posts
    28
    Quote Originally Posted by remi
    .dae is the extension chosen for COLLADA documents. You can also use .xml, since COLLADA documents are XML documents
    Oh I see I can distribute file with XML extension. That answer my first question.
    Julio

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    28
    Ok I tried the test cube again. And her it is.
    This is a cube created in 3dsmax 7, converted to triangle mesh.
    It has a single targa texture applied to it.
    XSI fails to load it with the error unspecified failure.
    If I export the same file without texture, then XSI loads it correctly.

    The image file is in the same directory that the dae file, and I know that XSI supports targa file because I can create a similar cube and texture using the same texture.
    This file loads without any problems in Max and also with the Feeling Viewer tool.

    I think the file is small enough to demonstrate what I say.
    I hope that this is somethig I am doing wrong.


    Code :
    <?xml version="1.0" encoding="utf-8" ?>
    <COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.0">
       <asset>
          <contributor>
             <author>Jon smith</author>
             <authoring_tool>3dsmax COLLADA exporter v2.10</authoring_tool>
          </contributor>
          <created>2006-09-22T03:52:45Z</created>
          <modified>2006-09-22T03:52:45Z</modified>
          <revision>1.0</revision>
          <unit name="inch" meter="1"></unit>
          <up_axis>Z_UP</up_axis>
       </asset>
       <library_images>
          <image id="Map__1" name="Map__1">
             <init_from>./camo.tga</init_from>
          </image>
       </library_images>
       <library_materials>
          <material id="_01_-_Default" name="_01_-_Default">
             <instance_effect url="#_01_-_Default-fx"></instance_effect>
          </material>
       </library_materials>
       <library_effects>
          <effect id="_01_-_Default-fx" name="_01_-_Default">
             <profile_COMMON>
                <technique id="_01_-_Default-fx-COMMON" sid="COMMON">
                   <phong>
                      <ambient>
                         <color>0.588235 0.588235 0.588235 1</color>
                      </ambient>
                      <diffuse>
                         <texture texture="Map__1" texcoord="CHANNEL1">
                            <extra>
                               <technique profile="MAX3D">
                                  <amount>1</amount>
                               </technique>
                            </extra>
                         </texture>
                      </diffuse>
                      <specular>
                         <color>0.9 0.9 0.9 1</color>
                      </specular>
                      <shininess>
                         <float>10</float>
                      </shininess>
                      <reflective>
                         <color>0 0 0 1</color>
                      </reflective>
                      <transparent>
                         <color>1 1 1 1</color>
                      </transparent>
                      <transparency>
                         <float>0</float>
                      </transparency>
                   </phong>
                   <extra>
                      <technique profile="MAX3D">
                         <spec_level>
                            <float>0</float>
                         </spec_level>
                         <emission_level>
                            <float>0</float>
                         </emission_level>
                         <faceted>false</faceted>
                         <double_sided>false</double_sided>
                         <wireframe>false</wireframe>
                         <face_map>false</face_map>
                      </technique>
                   </extra>
                </technique>
             </profile_COMMON>
          </effect>
       </library_effects>
       <library_lights>
          <light id="global-ambient-light">
             <technique_common>
                <ambient>
                   <color>0.360784 0.360784 0.360784</color>
                </ambient>
             </technique_common>
          </light>
       </library_lights>
       <library_geometries>
          <geometry id="Box01-obj" name="Box01">
             <mesh>
                <source id="Box01-obj-position">
                   <float_array id="Box01-obj-position-array" count="24">-0.500000 -0.500000 0 0.500000 -0.500000 0 -0.500000 0.500000 0 0.500000 0.500000 0 -0.500000 -0.500000 1.000000 0.500000 -0.500000 1.000000 -0.500000 0.500000 1.000000 0.500000 0.500000 1.000000</float_array>
                   <technique_common>
                      <accessor source="#Box01-obj-position-array" count="8" stride="3">
                         <param name="X" type="float"></param>
                         <param name="Y" type="float"></param>
                         <param name="Z" type="float"></param>
                      </accessor>
                   </technique_common>
                </source>
                <source id="Box01-obj-normal">
                   <float_array id="Box01-obj-normal-array" count="108">0 0 -1.000000 0 0 -1.000000 0 0 -1.000000 0 0 -1.000000 0 0 1.000000 0 0 1.000000 0 0 1.000000 0 0 1.000000 0 -1.000000 0 0 -1.000000 0 0 -1.000000 0 0 -1.000000 0 1.000000 0 0 1.000000 0 0 1.000000 0 0 1.000000 0 0 0 1.000000 0 0 1.000000 0 0 1.000000 0 0 1.000000 0 -1.000000 0 0 -1.000000 0 0 -1.000000 0 0 -1.000000 0 0</float_array>
                   <technique_common>
                      <accessor source="#Box01-obj-normal-array" count="36" stride="3">
                         <param name="X" type="float"></param>
                         <param name="Y" type="float"></param>
                         <param name="Z" type="float"></param>
                      </accessor>
                   </technique_common>
                </source>
                <source id="Box01-obj-mapchan-1">
                   <float_array id="Box01-obj-mapchan-1-array" count="36">0 0 0 1.000000 0 0 0 1.000000 0 1.000000 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0 1.000000 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0 1.000000 1.000000 0</float_array>
                   <technique_common>
                      <accessor source="#Box01-obj-mapchan-1-array" count="12" stride="3">
                         <param name="S" type="float"></param>
                         <param name="T" type="float"></param>
                         <param name="R" type="float"></param>
                      </accessor>
                   </technique_common>
                </source>
                <vertices id="Box01-obj-vertex">
                   <input semantic="POSITION" source="#Box01-obj-position"></input>
                </vertices>
                <polylist material="_01_-_Default" count="6">
                   <input semantic="VERTEX" source="#Box01-obj-vertex" offset="0"></input>
                   <input semantic="NORMAL" source="#Box01-obj-normal" offset="1"></input>
                   <input semantic="TEXCOORD" source="#Box01-obj-mapchan-1" offset="2" set="1"></input>
                   <vcount>4 4 4 4 4 4 </vcount>
     
     
    0 0 9 2 1 11 3 2 10 1 3 8 4 4 8 5 5 9 7 6 11 6 7 10 0 8 4 1 9 5 5 10 7 4 11 6 1 12 0 3 13 1 7 14 3 5 15 2 3 16 4 2 17 5 6 18 7 7 19 6 2 20 0 0 21 1 4 22 3 6 23 2 </p>
                </polylist>
             </mesh>
          </geometry>
       </library_geometries>
       <library_visual_scenes>
          <visual_scene id="unnamed_scene" name="unnamed_scene">
             <node id="Box01" sid="Box01" name="Box01">
                <translate>0 0 0 </translate>
                <node id="Box01_PIVOT" name="Box01_PIVOT">
                   <translate>0 0 -0.5 </translate>
                   <instance_geometry url="#Box01-obj">
                      <bind_material>
                         <technique_common>
                            <instance_material symbol="_01_-_Default" target="#_01_-_Default">
                               <bind semantic="CHANNEL1" target="#Box01-obj-mapchan-1"></bind>
                            </instance_material>
                         </technique_common>
                      </bind_material>
                   </instance_geometry>
                </node>
             </node>
             <node id="global-ambient-light_scene-node" name="global-ambient-light_scene-node">
                <instance_light url="#global-ambient-light"></instance_light>
             </node>
          </visual_scene>
       </library_visual_scenes>
       <scene>
          <instance_visual_scene url="#unnamed_scene"></instance_visual_scene>
       </scene>
    </COLLADA>



    edit:
    I also want to say that I realize that this is an XSI issue, but it seems that the XSI Collada support is a Collada intuitive more than a XSI imitative.

    In addition is spent a considerable amount of time looking for some options or something to solve the problem, but if there is one it is not trivial.
    Julio

  6. #6
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    was that the file exported from 3DSMax?
    It isn't correct. There are two things I noticed about it. One might be causing the problems.
    First, Thats not triangles. You said that you exported it as triangles but I see a <polylist> where each polygon is a quad.
    Second, The texturing is incorrect. I don't know if that is why XSI doesn't load the file, but it might be.

    Actually I just tested that in XSI by hand editing the file to be correct and it still doesn't work.

    I don't know what's up with it. Best bet is to file the bug against XSI.

    The corrected <effect> looks like this
    Code :
    <effect id="_01_-_Default-fx" name="_01_-_Default">
      <profile_COMMON>
        <newparam sid="surface">
          <surface type="2D">
            <init_from>Map__1</init_from>
          </surface>
        </newparam>
        <newparam sid="sampler">
          <sampler_2D>
            <source>surface</source>
          </sampler_2D>
        </newparam>
        <technique id="_01_-_Default-fx-COMMON" sid="COMMON">
          <phong>
            <ambient>
              <color>0.588235 0.588235 0.588235 1</color>
            </ambient>
            <diffuse>
              <texture texture="sampler" texcoord="CHANNEL1">
                <extra>
                  <technique profile="MAX3D">
                    <amount>1</amount>
                  </technique>
                </extra>
              </texture>
            </diffuse>
            <specular>
              <color>0.9 0.9 0.9 1</color>
            </specular>
            <shininess>
              <float>10</float>
            </shininess>
            <reflective>
              <color>0 0 0 1</color>
            </reflective>
            <transparent>
              <color>1 1 1 1</color>
            </transparent>
            <transparency>
              <float>0</float>
            </transparency>
          </phong>
          <extra>
            <technique profile="MAX3D">
              <spec_level>
                <float>0</float>
              </spec_level>
              <emission_level>
                <float>0</float>
              </emission_level>
              <faceted>false</faceted>
              <double_sided>false</double_sided>
              <wireframe>false</wireframe>
              <face_map>false</face_map>
            </technique>
          </extra>
        </technique>
      </profile_COMMON>
    </effect>

    -Andy

  7. #7
    The problem is in the normal array. The count is 108 and the accessor is 37, it should be 72 and the count in the accessor 24.

    If you correct the count manually, it loads correctly.

    The Collada coherency checker caught this.

    What exported this file? If it was Max, can you describe how to get it to do it again?

  8. #8
    Junior Member
    Join Date
    Aug 2006
    Posts
    28
    Well thank you for taking the time analyzing my problem.
    You are right the sample cube file is wrong. I do not own a copy of 3d studio max, I am using samples exported form Max with the collada 1.4 plug in.

    The last cube was a model I asked a friend of mind to export so I can test again. I asked to make it triangle mesh but they do not like work with triangulated meshes, so he just exported the file without checking the triangle button in the plug in. I am sorry about that error. I did with more care again if you still want to take a look here is the file.
    http://rapidshare.de/files/34180669/col ... t.zip.html

    This is a brief description:

    There are two folders ColladaFromMax and ColladaFromMyTool with the exact same information:

    In each one you will find a cube.dae and a Subaru.dae with the textures. Ther are triangulated meshes with a single texture, and single vertex
    The vertex semantic is (postion, normal, texture coordenade)

    These are my results on all files:

    • Result from ColladaFromMax (file expored from 3dsMax Collada plguin 1.4)
      File------Myloader-coherency-FViewer-3dsMax-XSI---Blender
      cube-----load------fail--------load-----load----load?--load
      subaru---load------fail*-------load?----load----fail*--load?

      Result from ColladaFromMyTool (files experted with the tool I am developing)
      File------Myloader-coherency-FViewer-3dsMax-XSI---Blender
      cube-----load------pass-------load-----load----fail*--load
      subaru---load------pass-------load-----load----fail*--load?


    * = catastrofic failure
    ? = load geometry incorrectly

    As you can see, if I am not mistaken or I am confused, in interpreting the
    output of the coherencytest tool, the files I am producing comply more with collada scheme than any of the files generated from these plugins, but that does not thanslates to any gain since they cannot be transfered to other packages.
    It is not my place to policy or judge these tools, but my finding
    do not confirm what collada advertices. Not even at the lowest common denominator.

    There is not way data can be transfered from package to package using collada tool provided with those packages. The only way this can be done is if you write a set of plugins yurself for each package, which is expensive, unpractical and sometime imposible (in the case of blender license). and if a comapany can do that then why does it needs collada for?
    In my mind Collada was suppossed to standarize the prolifaration of file formats. but as it stand now it actually makes it worse since now you have file that are diffrent intenally but have the same format.
    Not exacly what I would call "industry standard initialive".

    Thanks
    Julio

  9. #9
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    Result from ColladaFromMax (file expored from 3dsMax Collada plguin 1.4)
    File------Myloader-coherency-FViewer-3dsMax-XSI---Blender
    cube-----load------fail--------load-----load----load?--load
    subaru---load------fail*-------load?----load----fail*--load?
    Looks like the current 3dsMax exporter has some issues, that the more and more restrictive coherency test is reporting. At least 3dsMax can load its file back! and I bet Maya has no problem with it at all.

    Blender importer, even though currently still in alpha/development can load the file. XSI seems to have some problems. We are already aware of some issues with the XSI plug-in, and XSI has fixes for all of the issues that we know about, but for some reason they have not delivered those fixes to their customers yet.

    So, this is quite good, the coherency test is really doing its job catching implementation issues, Even though the document is wrong the tools are still able to load the document (except in one case)

    Result from ColladaFromMyTool (files experted with the tool I am developing)
    File------Myloader-coherency-FViewer-3dsMax-XSI---Blender
    cube-----load------pass-------load-----load----fail*--load
    subaru---load------pass-------load-----load----fail*--load?
    So all the tools, except XSI, can load the documents you created by your own method, simply following the specification.

    This is really good, it works !

    Testing Maya would really be interesting, it should work fine. Blender is interesting to add in the list, but not really fair since their exporter is not done yet.

    You may have run into a new bug from the XSI importer, or hit one that has already been fixed. I suggest you contact them regarding this.

    In summary, those results are really good,
    - One can write a import/export from scratch reading the specification and using the tool provided
    - The coherency and valiation tolls work, are tighter and tighter, and can detect problems with exporters/importers.
    - Even the Blender plug-in, that is work in progress seems to work quite well

    Yes, it is not perfect, there are still some issues, but thanks to those reporting their problems with plug-ins and specification, COLLADA, although a very challenging proposal, is certainly the best "industry standard initialive" available.

  10. #10
    Hi Julio,

    I was just going over the files you uploaded and noticed something strange. In the <authoring_tool> section of your MAX files you have

    3dsmax COLLADA exporter v2.10

    Something is very wrong here, the Feeling Software COLLADA exporter for Max is currently at V1.05. As far as I know, there has never been a version 2.10.

    This is what you should see in the authoring tool tag.

    Feeling ColladaMax v1.05 with FCollada v1.13

    It looks like you either have a very old script based COLLADA exporter installed, or maybe the Feeling ColladaMax wasn't installed correctly. I'd suggest you get the latest ColladaMax V1.05 from www.feelingsoftware.com and try your tests again.

    In the meantime, I'll have a look at the files you exported from your tool and see why they wern't loading into XSI

    Greg

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
  •