3D tileset appearence

Hi there,

We have a huge 3D tileset of buildings and face some problems may need your help as below:
Question 1:
This is how we insert the 3D tileset:

try {
        const tileset = await Cesium.Cesium3DTileset.fromUrl(url, {
          skipScreenSpaceErrorFactor: 16,
          skipLevelOfDetail: true,
          maximumMemoryUsage: 128,
          shadows: Cesium.ShadowMode.DISABLED,
          featureIdLabel: num,
          instanceFeatureIdLabel: num,
        });
        this.viewer.scene.primitives.add(tileset);
      } catch (error) {
        console.error(`Error creating tileset: ${error}`);
      }

After the insert, we found color differences in the 3D buildings. We want to know if this is the original default color of the 3D tileset? Please suggest how to uniform the colors if we want to retain the contour of the 3D buildings, thank you.

Question 2:
We noticed that when we zoom in extensively into the 3D building, the building model will turn dark black. Is this the feature provided by Cesium for 3D tileset? Can it be switched off?


Before color change


After color change

Question 3:
If we add a 3D building onto an existing 3D building, will they overlap or the new one will replace the old one straight the way? Or what kind of behavior would it show?

Hi there,

is there any update for this question?

There are multiple questions here, and little detail about each of them (i.e. it may be difficult to provide the “right” answer, just based on the screenshots).

But I’ll give it a try:


Question 3:
If we add a 3D building onto an existing 3D building, will they overlap or the new one will replace the old one straight the way? Or what kind of behavior would it show?

When you add two buildings at the same place, then they will overlap. In the rendering layer, there is no such concept like a “building that occupies some space”. It will render whatever geometry is added, and when some geometry should not be rendered, then it has to be omitted or removed.


Question 1:
[…]
After the insert, we found color differences in the 3D buildings. We want to know if this is the original default color of the 3D tileset? Please suggest how to uniform the colors if we want to retain the contour of the 3D buildings, thank you.

The input data may contain colors. Depending on the exact contents and structure of the data set, each building might have its own color (technically: The buildings may be individual B3DM files, which contain GLB data, which contains material definitions, and these materials may have different colors).

There are many, many options for controlling the appearance of the buildings. Have a look at the “3D Tiles Feature Styling” sandcastle for a few examples:

If you just want to set the same color for everything, then something like

tileset.style = new Cesium.Cesium3DTileStyle({
  color: "color('red')"
});

should be enough.


Question 2:
We noticed that when we zoom in extensively into the 3D building, the building model will turn dark black. Is this the feature provided by Cesium for 3D tileset? Can it be switched off?

This does not look right. It might be that there is something wrong with the tileset. (It might also be that there is a bug in CesiumJS, but … this looks like something that would have been noticed elsewhere if it was a general problem).

If that problem persists after setting the proper building colors, it may have to be investigated further.