Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOUNDING_VOLUMES_INCONSISTENT false positive #321

Closed
lilleyse opened this issue Nov 22, 2024 · 3 comments · Fixed by #322
Closed

BOUNDING_VOLUMES_INCONSISTENT false positive #321

lilleyse opened this issue Nov 22, 2024 · 3 comments · Fixed by #322

Comments

@lilleyse
Copy link
Contributor

A BOUNDING_VOLUMES_INCONSISTENT error is reported when a tile has a transform and its tile and content bounding boxes are equal.

{
  "asset": {
    "version": "1.1"
  },
  "geometricError": 36.01134987443187,
  "root": {
    "boundingVolume": {
      "box": [-6.080217871000059, -2.5626078567001978, 7.670572920935234, 28.222668701666407, 0.0, 0.0, 0.0, 16.052909179823477, 0.0, 0.0, 0.0, 14.046370606636636]
    },
    "geometricError": 55.168405797565356,
    "refine": "ADD",
    "transform": [0.8351817646559274, 0.4354886487600266, 0.33588845884813834, 0.0, -0.5332815258250316, 0.4919274611372525, 0.6881992351004056, 0.0, 0.13447019818509023, -0.7538945614475695, 0.6430868961655487, 0.0, 858886.5117950288, -4815266.719929179, 4080019.9862379627, 1.0],
    "content": {
      "boundingVolume": {
        "box": [-6.080217871000059, -2.5626078567001978, 7.670572920935234, 28.222668701666407, 0.0, 0.0, 0.0, 16.052909179823477, 0.0, 0.0, 0.0, 14.046370606636636]
      },
      "uri": "tiles/0/0/0/0.gltf"
    }
  }
}

Results:

{
  "date": "2024-11-22T20:57:15.797Z",
  "numErrors": 2,
  "numWarnings": 0,
  "numInfos": 0,
  "issues": [
    {
      "type": "CONTENT_VALIDATION_ERROR",
      "path": "/root/content",
      "message": "Tile content /root/content refers to URI tiles/0/0/0/0.gltf, which could not be resolved",
      "severity": "ERROR"
    },
    {
      "type": "BOUNDING_VOLUMES_INCONSISTENT",
      "path": "/root/content/boundingVolume",
      "message": "The content bounding volume is not contained in the tile bounding volume: box [-6.080217871000059,-2.5626078567001978,7.670572920935234,28.222668701666407,0,0,0,16.052909179823477,0,0,0,14.046370606636636] is not within box [-6.080217871000059,-2.5626078567001978,7.670572920935234,28.222668701666407,0,0,0,16.052909179823477,0,0,0,14.046370606636636]",
      "severity": "ERROR"
    }
  ]
}
@javagl
Copy link
Contributor

javagl commented Nov 22, 2024

Oh, how confidently I copied the error message and aligned the bounding box definitions, expecting some epsilon-difference, before I noticed: "Wait, the transform is the important part here!"

This seems to be a leftover from porting the original bounding volume checks, which explicitly did set the innerTransform (for the content) to IDENTITY.

The fix should be trivial, by setting innerTransform = tile.transform here explicitly. I'll address that soon, but also want to generate some test cases (similar to the given one, but with some more "readable and understandable" boxes and transforms) to include that in the specs.

@javagl
Copy link
Contributor

javagl commented Dec 9, 2024

This came up again with this tileset:

{
  "asset": {
    "version": "1.1"
  },
  "geometricError": 7072.464255939013,
  "root": {
    "boundingVolume": {
      "box": [-1437.4653144939202, -1351.9203807671843, 21.789232747352724, 3044.9885061302843, 0.0, 0.0, 0.0, 1797.3777033814815, 0.0, 0.0, 0.0, 49.153349889067634]
    },
    "geometricError": 493.6682205676981,
    "refine": "ADD",
    "transform": [0.984462563037212, 0.17559459552675144, 0.0, 0.0, -0.11292226348726195, 0.6330931803632711, 0.7657947423340227, 0.0, 0.13446941803665555, -0.7538962547985733, 0.6430850741648168, 0.0, 858879.7136220747, -4815267.358751021, 4079999.803718023, 1.0],
    "content": {
      "boundingVolume": {
        "box": [-396.03805092558207, -2039.1541406260544, 3.9259350686276653, 325.31453299882213, 0.0, 0.0, 0.0, 703.5696039607931, 0.0, 0.0, 0.0, 4.123325457177468]
      },
      "uri": "triangle.gltf"
    }
  }
}

@javagl
Copy link
Contributor

javagl commented Dec 12, 2024

The second incarnation of this should now be fixed via #328

@javagl javagl closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants