itwinjs-core icon indicating copy to clipboard operation
itwinjs-core copied to clipboard

Reproject reality tiles

Open pmconne opened this issue 3 years ago • 3 comments

Fixes #4036.

Previously we would only reproject reality tiles if they had a RealityTileRegion defined, which effectively meant only if they originated from the OpenStreetMap Buildings tileset. If we don't reproject, then points in the reality model shift further from the surface of the Earth as distance from the center of the iModel's ECEF location increases.

Now, we reproject all reality tiles onto the surface of the Earth using the center of the tile's range. This adds some extra work:

  • We must perform an asynchronous query per group of child tiles to do the reprojection; and
  • We must push a transform when drawing each tile.

If this measurably impacts user experience, we could try to come up with a heuristic to determine whether the loss of accuracy is large enough to warrant doing this extra work, on a per-tile or per-reality model basis (e.g., distance from iModel's ECEF center).

TODO

  • [x] Analyze ImageTests results
  • [ ] Figure out what to do about ImageTests differences
  • [ ] NextVersion.md?

pmconne avatar Oct 08 '22 12:10 pmconne

ImageTests shows 80 major differences against previous run.

  • Helsinki: definitely fixed - control points now align
  • Big E** point cloud. Delaware Waterfront, Redmond - vertical shift - all views have ground bias applied - perhaps bias was meant to counteract ECEF inaccuracies? Big E** definitely looks worse -- elevated too high above ground.
  • Philadelphia - vertical shift - no bias applied. Most views look arguably improved (less clipping of reality model into map - especially StreetLevel)
  • quarry, NasaLaunchPad, LanscapeDemo - slight vertical shift.

pmconne avatar Oct 08 '22 14:10 pmconne

The Helsinki results indicate that this fixes positional issues. Concerning the other different datasets it is not possible to determine if it is an amelioration or not based solely on the ImageTest results. Can you remind how to obtain the datasets so we can analyze them in viewers and apps?

AlainRobertAtBentley avatar Oct 08 '22 17:10 AlainRobertAtBentley

@AlainRobertAtBentley See https://github.com/iTwin/itwinjs-backlog/issues/443 All the reality model tilesets and corresponding .bim and _ESV.json files can be downloaded from ImageTests' "Cloud Files" dialog. Prepare for long download and unzip times. Unzip them all to the same directory and serve that directory like http-server absolute-path-to-directory --cors=X-Correlation-Id, then open the .bim files in display-test-app. Ping or email me if you run into issues.

pmconne avatar Oct 08 '22 17:10 pmconne

The BigE** point cloud is no longer in use by the user and almost certainly it and/or its iModel's GCS are still wrong.

pmconne avatar Oct 25 '22 17:10 pmconne

All attempts to test against user's data in PROD failed in various disappointing ways.

pmconne avatar Oct 26 '22 18:10 pmconne

@Mergifyio backport release/3.4.x

pmconne avatar Oct 26 '22 18:10 pmconne

backport release/3.4.x

✅ Backports have been created

mergify[bot] avatar Oct 26 '22 18:10 mergify[bot]