Page MenuHome

Missing elements from Collada file (import)
Open, NormalPublic

Description

System Information
Windows 10

Blender Version
Broken: Blender 2.77a

Short description of error
Import collada file throws an error, and has missing geometry.

Exact steps for others to reproduce the error
Import Collada:

(unzip the file first)

Result in Blender:

Result in 3D Builder (Windows default .dae opener):

Reference object (photo):

I get the following message from Blender. Note, I get a similar message with any .dae I try to import from my collection. But this is the only one with missing geometry.

Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: transparent, Attribute: xmlns, Line: 78, Column: 38, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 107, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 113, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: texture, Attribute: xmlns, Line: 123, Column: 46, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 137, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 143, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: texture, Attribute: xmlns, Line: 153, Column: 46, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 170, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 176, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: texture, Attribute: xmlns, Line: 186, Column: 46, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: float, Attribute: xmlns, Line: 191, Column: 31, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 200, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: newparam, Attribute: xmlns, Line: 206, Column: 28, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: texture, Attribute: xmlns, Line: 216, Column: 46, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: transparent, Attribute: xmlns, Line: 224, Column: 38, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10549, Column: 75, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10552, Column: 75, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10582, Column: 75, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10612, Column: 75, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10642, Column: 65, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10643, Column: 65, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10644, Column: 65, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: bind_vertex_input, Attribute: xmlns, Line: 10645, Column: 65, Additional:
Schema validation error: Error: ERROR_UNKNOWN_ATTRIBUTE Element: library_images, Attribute: xmlns, Line: 10693, Column: 24, Additional:
Writing node id='', name='Render'
Writing node id='', name='Environment'
Writing node id='collidersNode', name='colliders'
Writing node id='Geometry-Mesh_Node', name='Mesh_'
Writing node id='Geometry-ZINCARB65_1_CarrinhoNode', name='ZINCARB65_1_Carrinho'
Writing node id='Geometry-ZINCARB65_2_PlastNode', name='ZINCARB65_2_Plast'
Writing node id='Geometry-ZINCARB65_3_RodNode', name='ZINCARB65_3_Rod'
Writing node id='Geometry-ZINCARB65_S_PisoNode', name='ZINCARB65_S_Piso'
got 2 library nodes to free

Event Timeline

Dalai Felinto (dfelinto) set Type to Bug.
Dalai Felinto (dfelinto) created this task.
Dalai Felinto (dfelinto) raised the priority of this task from to Needs Triage by Developer.

The Collada importer just reports some minor issues in the collada file. And admitedly it reports its concerns in a somewhat exagerated and misleading way.

Lets look at the first reported error:

Schema validation error: ERROR_UNKNOWN_ATTRIBUTE Element: 
transparent, Attribute: xmlns, Line: 78, Column: 38, Additional:

When i inspect the reported line in the collada file then i find this:

<transparent opaque="A_ONE" xmlns="">

The interpretation of the reported error line is as follows:

  • The parser has found an unknown attribute within the element <transparent> on line 78
  • The name of the offending attribute is 'xmlns'
  • and the value of the attribute is '' (empty)

This attribute is reported but ignored. We could improve the report by making it less verbose and more precise, for example like:

WARNING: Schema validation: Line 78:38: Element <transparent>, attribute: xmlns = ""  (ignore)

I am looking at this now and check if the collada parser reporter can be made more user friendly.

As requested, those are simpler sample files:

  • holed_face_tri.dae
  • holed_face_ngons.dae
  • holed_cube_tri.dae
  • holed_cube_ngons.dae

They all import fine on SketchUp (where I generated them), but the non-triangulated ones do not ipmort correctly on Blender or Meshlab.

As discussed in IRC: The missing geometry happens because the Collada importer discards faces with holes. This is a known issue. I tried to fix this last year but i could not find a good way to solve it.

Campbell mentioned yesterday (in IRC) that the file scanfill.c contains functions which are used by python importers to solve the import of faces with holes. I will look at this next and see if i can solve this issue. However it can take a few days.

Another example of a simple file (manually simplified):


The file opens fine-ish in SketchUp, but in Blender it presents the same problem as the original one.

In case it helps debugging, this is the original WINCAR75 as well as a triangulated version of its problematic part, and the original .fbx the collada files were exported from.

  • WINCAR75.fbx (original .fbx file, it won't import in Blender because it's ASCII)
  • WINCAR75_ngons.dae (original problematic .dae file)
  • WINCAR75_triangles.dae (triangulated .dae file)
  • *.* (textures, ..., ignore them)

As requested, the top plane only:

And at last, a very simple face with a hole:

Collada supports faces with holes by using at least 2 approaches:

  1. You can define a face and a set of holes within a <ph> element with one subelement <p> that contains the polygon (as closed loop of verts) and one or more subelements <h> each containing a hole (also as closed loop of verts).
  2. You can define a big loop where the inner holes are connected with the polygon's outer loop via edges :
    where each such an edge is used twice, once to enter the inner loop and once to exit the loop again.

Now the task is to break up the "face with holes" into a set of subfaces that contain no holes and no duplicate edges. (to be continued...)

@Gaia Clary (gaiaclary) now that we have a more clear picture of when the problem happens, how much trouble would be to add a printing warning for those cases? Knowing which of my imported files are broken would help my use case tremendously already.

Gaia Clary (gaiaclary) reopened this task as Open.Jun 3 2016, 6:54 PM

Automatic close was wrong. this is work in progress (we still want to support the import of polygons with holes).