itwinjs-core
itwinjs-core copied to clipboard
Reproject reality tiles
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?
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.
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 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.
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.
All attempts to test against user's data in PROD failed in various disappointing ways.
@Mergifyio backport release/3.4.x
backport release/3.4.x
✅ Backports have been created
- #4555 Reproject reality tiles (backport #4455) has been created for branch
release/3.4.x