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

Unloading bug in 3d Tiles branch #4673

Closed
lucasvw opened this issue Nov 22, 2016 · 11 comments
Closed

Unloading bug in 3d Tiles branch #4673

lucasvw opened this issue Nov 22, 2016 · 11 comments

Comments

@lucasvw
Copy link

lucasvw commented Nov 22, 2016

Hi everyone,

There seems to be a problem with the unloading of the 3d-tiles branch.

At some camera positions, the same tiles keep on being loaded over and over again (being requested from server).

The following link lands at exactly such a position:

http://demo.virtualcitymap.de/index2.html?startingmap=cesium&lang=en&cameraPosition=13.43017%2C52.57237%2C243.09854&groundPosition=13.43087%2C52.57779%2C46.74016&distance=635.49&pitch=-18.00&heading=4.51&roll=0.02&layerToActivate=buildings&layerToDeactivate=buildings_untextured

I created http://demo.virtualcitymap.de/index2.html which loads the CesiumUnminified version.

In chrome dev tools I am seeing a couple of b3dm files being constantly loaded new, such as 27253.b3dm and 13626.b3dm, which creates a really big amount of network traffic over time :)

Best,
Lucas

@lilleyse
Copy link
Contributor

I'm also noticing that in the network tab. Can you create a quick Sandcastle demo for this?

@jbo023
Copy link
Contributor

jbo023 commented Nov 23, 2016

var viewer = new Cesium.Viewer('cesiumContainer');

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : "http://demo.virtualcitymap.de/datasource-data/berlin",
maximumNumberOfLoadedTiles:3,
maximumScreenSpaceError:16
}));

var cameraPosition = new Cesium.Cartesian3(3778492.598335113, 902266.7207133673, 5041956.047869663);
var cam = viewer.scene.camera;
var cameraOptions = {
"heading": Cesium.Math.toRadians(4.51),
"pitch": Cesium.Math.toRadians(-18.00),
"roll": Cesium.Math.toRadians(0.02)
};

var direction = new Cesium.Cartesian3(-0.9323680118559295, -0.14575318580427238, 0.33082608617780795);
var up = new Cesium.Cartesian3(0.318555765161632, 0.10140786762051479, 0.9424641472581052);

cam.setView({
"destination": cameraPosition,
"orientation": {
"direction":direction,
"up":up
}
});

The Bug only occurs if we set maximumNumberOfLoadedTiles to a small value.
Jannes

@lilleyse
Copy link
Contributor

Is the url still up to date? I'm not noticing any unusual activity in the network tab but the tileset seems wrong.

Captured from a different view:
floating

@jbo023
Copy link
Contributor

jbo023 commented Feb 14, 2017

Hi,

I just pulled the latest 3d-tiles branch and have the same problem. The tileset is not shown correctly. Did something change with the rendering code in the last days?

But the unloading problem is still there. If i just run the examplecode in a sandcastle, chrome won't stop loading b3dm tiles. But I just noticed that this only happens if you disable the cache. This is really strange.

@lilleyse
Copy link
Contributor

I'm looking into why its broken on the latest branch, there should be a fix soon and then I'll get back to this.

@jbo023
Copy link
Contributor

jbo023 commented Feb 14, 2017

I also checked some other datasets, the problem is only with textured datasets.

@lilleyse
Copy link
Contributor

There was a recent change in Model.js in how program attributes are checked.

Looking at one of the b3dm tiles not all the attributes are specified correctly in programs objects:

  "programs": {
    "ID110": {
      "attributes": [
        "a_texcoord0"
      ],
      "fragmentShader": "ID106",
      "vertexShader": "ID108"
    },
  },

There may be a quick fix to this in Cesium so it uses techniques.attributes instead.

@jbo023
Copy link
Contributor

jbo023 commented Feb 14, 2017

I see, I also found the corresponding commit.
0690a4f

Its a bug in the our gltf code. But before that commit cesium tried to find the attributes by using the "findVertexAttributes" function to get the attributes directly from the shader code. So the Bug in our GLTF code didn't have any impact :)

We will also change our converter to fix the b3dm files.

@lilleyse
Copy link
Contributor

Yeah that's the problem area. I'm going to revert some of those changes since I don't want to break existing models.

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 16, 2017

@lilleyse is #5008 just part of the fix here or the entire fix?

@lilleyse
Copy link
Contributor

It's the entire fix. The rendering issues were resolved in #5004

@pjcozzi pjcozzi closed this as completed Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants