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

[CityTiler] "Dancing buildings" #77

Closed
jailln opened this issue Mar 7, 2022 · 7 comments
Closed

[CityTiler] "Dancing buildings" #77

jailln opened this issue Mar 7, 2022 · 7 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jailln
Copy link
Contributor

jailln commented Mar 7, 2022

The geometries of the 3D Tiles produced with the CityTiler move alone when moving the camera:

2022-03-07.10-21-27.mp4

This happens for conversions with and without textures and since PR #71 . I reproduce this on iTowns and Cesium and I don't reproduce it with tilesets produced before #71 with the same iTowns/Cesium apps.

@LorenzoMarnat
Copy link
Collaborator

Which CRS are you using ? Do you know if it happens in any CRS ?

@LorenzoMarnat LorenzoMarnat added the bug Something isn't working label Mar 7, 2022
@LorenzoMarnat LorenzoMarnat self-assigned this Mar 7, 2022
@LorenzoMarnat LorenzoMarnat added this to the M3 milestone Mar 7, 2022
@jailln
Copy link
Contributor Author

jailln commented Mar 7, 2022

It seems related to the CRS (transformation) indeed: In my first message, I converted from EPSG:3945 to EPSG:4978 and I just tried with a dataset of Lyon without CRS transformation and the bug is gone.

@LorenzoMarnat
Copy link
Collaborator

LorenzoMarnat commented Mar 7, 2022

I think the error comes from the transform and boundingVolume of the tiles in the tileset.json.

For a same tile (projected in EPSG:4978), with master branch:

      {
        "boundingVolume": {
          "box": [
            172.20416069030762, -577.5076789855957, -170.31637573242188,
            224.00000190734863, 0.0, 0.0, 0.0, 692.2968864440918, 0.0, 0.0, 0.0,
            273.75
          ]
        },
        "geometricError": 1,
        "refine": "REPLACE",
        "content": { "uri": "tiles/0.b3dm" },
        "transform": [
          1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0,
          4440989.296, 375313.555, 4547598.566, 1.0
        ]
      },

With PR branch:

      {
        "boundingVolume": {
          "box": [
            2598789.75, -4801335.25, 4547209.625, 224.0, 0.0, 0.0, 0.0, 692.25,
            0.0, 0.0, 0.0, 273.875
          ]
        },
        "geometricError": 1,
        "refine": "REPLACE",
        "content": { "uri": "tiles/0.b3dm" },
        "transform": [
          1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0,
          1842371.867, 5176071.129, 218.639, 1.0
        ]
      },

The correct values are those from master branch. I'll see what goes wrong on PR branch

@jailln
Copy link
Contributor Author

jailln commented Mar 7, 2022

Nice, thanks! I should have put this issue directly in the PR, I thought that it was already merged, sorry for that.

@LorenzoMarnat
Copy link
Collaborator

No problem ! This issue already happened before, and may happen again. At least, it will be documented this time ;)

@LorenzoMarnat
Copy link
Collaborator

It should be fixed on the PR branch.

The problem was coming from the centroid used when creating a tile. We were using the centroid of the whole tileset, but this centroid is wrong if we reproject the tileset, since some tiles will be in the new CRS and others (not transformed yet) will still be in the old CRS.

@jailln
Copy link
Contributor Author

jailln commented Mar 7, 2022

It's fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants