-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Wrong camera position in photogrammetry Sandcastle example #6962
Comments
Still happens in master, but this is definitely terrain related since that's the only difference in the demo between 1.47 and 1.48 |
That being said, I'm not sure why my change wouldn't have fixed this. |
Your change to |
Good point. But now I'm not sure why this bugs exists at all, unless the bounding sphere for the tileset is not taking the transform into account? |
I'm sure it's whatever code we have that pushes the camera up above terrain when the terrain loads in that's causing the problem |
Possibly, I thought it only pushed if the camera was actively under terrain though, but that's a good place to start. |
It's not a problem with assets.agi.com terrain var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: new Cesium.CesiumTerrainProvider({
url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
requestVertexNormals : true
})
});
var tileset = new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(5712)
});
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset); |
@hpinkos I can reproduce this problem is all kinds of cases, not just the example. I think the fact that it doesn't happen with assets.agi.com is a red herring do to the difference between terrain data. For example, I have a tileset in New Zealand that this happens with. |
It only happens the first time you zoom, zooming a second time works fine. I believe this may be some sort of race condition we recently introduced: var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});
var tileset = new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(5712)
});
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);
Sandcastle.addToolbarButton('Zoom again', function() {
viewer.zoomTo(tileset);
}); |
I marked this next release because it's started showing up often for me. |
Well, the differences in data are at least exposing an existing problem. It's our The globe renders with a lower resolution tile that has a greater height in a particular area and |
Okay, I think we're getting close to the root cause here. I don't think |
Submitted #6989 |
And thanks @hpinkos for doing most of the hard work in narrowing this down. |
Fixes CesiumGS#6962 I'm not sure if we introduced a regression somewhere or if we just never noticed, but the desired camera behavior is that it not force the view to be above terrain if there is still terrain loading. I also confirmed that CesiumGS#4075 is still fixed even with this change.
The camera view starts at the photogrammetry and then moves upward after the terrain is loaded. This is a regression in the 1.48 release.
Expected behavior in 1.47:
https://cesiumjs.org/releases/1.47/Apps/Sandcastle/index.html?src=3D%20Tiles%20Photogrammetry.html&label=3D%20Tiles
In 1.48:
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Photogrammetry.html
The text was updated successfully, but these errors were encountered: