coherency test available

Coherency Test

The purpose of Coherency Test is to check if a Collada data properly composed.

— OLD —
The binary executable and readme file are available here

— NEW —
http://sourceforge.net/projects/collada … ncy%20Test

Please checkout the readme file to see what kind of test it is checking.

The new coherencytest will be available as a conditioner in COLLADA Refinery 2.0

Please check sourceforge
http://sourceforge.net/projects/colladarefinery

Coherencytest checks the following:

  • check links
    It checks if links within a file are linked properly.

    • It will check if elements, “accessor”, “channel”, “input”, “skin”, etc, that has a source
      attribute in URIFragmentType format, are linking to a valid element.
    • It will check if all values in IDREF_array are valid IDs from elements.
    • It will check if “instance_camera”, “instance_controller”, “instance_geometry”, and other
      instances with a url, have a url that refence to an element.
    • It will check if “instance_material” and “instance_rigid_body” have valid target attributes
      that reference to valid materials.
      The way It check these links is by checking if these references can do resolveElement() and
      getElement(). The link is invalid if it got a NULL from getElement(), otherwise, it is valid.
  • check unique id
    It checks if all ids in each document are unique.

  • check files
    It checks if the image files, cg/fx files, and other non-dae files that the document
    referenced exist.

  • check counts
    It checks number counts are correctly set
    skin vertex count should be == mesh vertex count
    tristrips count == number of

    3 * triangle count * maxoffset == numbers of value in

,
where maxoffset is the max offset number all inputs

  • check InstanceGeometry
    There are many material groups in a geometry.
    It check if there is enough instance materials to bind a material groups to materials.
    If there is a material groups that is not bind to any material, it will display a warning.
  • check texture
    Many exporter set <texture=“imageID”>. This direct link to a <image> is wrong.
    It should be link indirectly where
    <texture texture=“NewParamWithSID_Image”>
    <newparam sid=“NewParamWithSID_Image”>
    <sampler2D>
    <source>NewParamWithSurface</source>
    <newparam sid=“NewParamWithSurface”>
    <surface type=“2D”>
    <init_from>ImageID</init_from>
    <image id=“ImageID”>
  • check schema
    It checks if the document validates against the Schema.
    If it is not validated, it will show the error message, but I won’t show the line number yet.
  • check inputs
    It checks if the required number of input elements are present and that they have
    the correct semantic values for their sources.
  • check skin
    If skin use name_array, it will check if there are available joint node with the same SID
    If skin use IDREF_array, it will check if there are available joint node witht he same ID