3d-tiles (d3dm) not shown

Hi,

I’m new to Cesium and unity, but I have the following problem, loading 3d-tiles from local-files (b3dm, tileset.json) I don’t see a modell.

In CesiumJs it looks like - can only show a small region - i use skiplevelofdetails=true

Should I use a special option ?

Regards

Rüdiger

I used the dataset with Cesium 1.92 everything ok now only black textures

1.27

Code from Adjust Height sandcastle:

const toolbar = document.getElementById("toolbar");
Cesium.knockout.applyBindings(viewModel, toolbar);

let tileset;
try {
  tileset = await Cesium.Cesium3DTileset.fromUrl(
    "http://localhost:3000/......../tileset.json",
    { skipLevelOfDetail: true }
  );
  
  const height = -47.5;
  const cartographic = Cesium.Cartographic.fromCartesian(tileset.boundingSphere.center);
  const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
  const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
  const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
  tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
  

Just to confirm:

  • The data was shown correctly in CesiumJS 1.92
  • The data is not shown correctly in CesiumJS 1.127 (black textures)
  • The data is not shown at all in Cesium For Unity

If this is is correct, then there might be something wrong with the data, and the older version of CesiumJS may have still displayed it due to some better legacy handling. This could, for example, include things like quantized texture coordinates or so.

When you load the data set in CesiumJS 1.127 and open the Browser Console (by pressing F12 in Chrome or FireFox), do you see any error messages there?

(Could you in doubt share the data set or even just one of the B3DM files?)

yes to 1 and 2
the data is black in Cesium ion - same as 1.27

I get the following in the google console

Sandcastle-client.js:31 The tiles needed to meet maximumScreenSpaceError would use more memory than allocated for this tileset.
The tileset will be rendered with a larger screen space error (see memoryAdjustedScreenSpaceError).
Consider using larger values for cacheBytes and maximumCacheOverflowBytes.

The error message could explain the black textures.

The error means that it is trying to load too much data (more data than fits into memory). There are different possible reasons for that. And there are different ways of how it could be solved.

You could try setting a higher value for the maximumScreenSpaceError of the tileset:

tileset = await Cesium.Cesium3DTileset.fromUrl(
  "http://localhost:3000/......../tileset.json", { 
    maximumScreenSpaceError: 128, // <---------------- Default is 16
    skipLevelOfDetail: true 
  }
);

Or you could increase the amount of memory that it may occupy:

tileset = await Cesium.Cesium3DTileset.fromUrl(
  "http://localhost:3000/......../tileset.json", { 
    cacheBytes: 4 * 536870912, // <---------------- Default is 536870912
    skipLevelOfDetail: true 
  }
);

(Or maybe a combination of both)

For more focussed and goal-directed advice, it might be necessary to know some details about the structure of the tileset (e.g. how much geometry and textures it contains, or its geometric error, etc.)

I’m going to move this thread to the CesiumJS forum because you’re likely to get better help there than here (though Marco’s advice is solid as always!). If you also have a Cesium for Unity problem, please start a new thread for that.