tudelft3d/City3D

[BUG] - Resulting WAVEFRONT OBJ Files are Invalid

Closed this issue · 1 comments

Hi there,

Describe the bug
when using City3D to reconstruct individual buildings, all buildings (result.obj) tested so far are invalid, according to val3dity (so far usually threw errors 104 for multiple faces per building).

Even though I can still render the building using three.js just fine, the precise geometry is broken and when I want to convert it to tiles for mapbox using pg2b3dm, it does not throw any errors but the resulting .glb tiles seem to be simple triangles, not the expected buildings.

Tell us how to reproduce the bug
I attach two of the resulting .obj files so you can run val3dity for yourself and/or see how they look in a viewer.
I also attach a resulting .glb file.
Download via this link: https://we.tl/t-EKMlOACtiF

Development/Running environment:

  • OS: Ubuntu 22
  • Release

I would really appreciate any help on fixing this.

All the best
Paul

I am 100% sure generated files are valid OBJ format. All major CAD modelers can load and visualize these files.

But, val3dity validates 3D primitives according to the international standard ISO19107. This is different from checking valid OBJ files.

I am not sure if one of the following failed val3dity:

  • The OBJ model is simply a geometry reconstruction, in which even a simple box may be represented by a set of polygonal faces. These faces physically connect each other, so they look like a closed box, but the data structure doesn't necessarily represent topologically a genus zero entry. But this can be simply converted to topologically closed by stitching the coincident edges in the model.
  • the model has huge coordinates (e.g., the first vertex: 395512, 5.69921e+06, 159.302), which may cause some numerical issues for other software.

Anyway, this is neither a bug nor an issue that deserves exploration because City3D is simply a research prototype. Any simple and straightforward postprocessing is beyond the research scope of this project. So I am going to close this issue.