I3S Layer from Madrid Geoportal Renders Black Instead of Grey - Styling Issues


I3S Layer from Madrid Geoportal Renders Black Instead of Grey - Styling Issues

Description:

I’m experiencing a rendering issue with an I3S layer from Madrid’s geoportal:

What I tried:

Before adding the I3S provider to Cesium’s primitives, we attempted to adjust the style like this:

this.i3sProvider = await I3SDataProvider.fromUrl(
  this.url!,
  this.i3soptions,
);

// Set edge and material colors
this.i3sProvider.layers[0].data.drawingInfo.renderer.symbol.symbolLayers[0].edges.color =
        [255, 255, 255];
this.i3sProvider.layers[0].data.drawingInfo.renderer.symbol.symbolLayers[0].material.color =
        [0, 0, 0];
this.i3sProvider.layers[0].data.drawingInfo.renderer.symbol.symbolLayers[0].material.transparence = 0.6;

// Set tileset style
this.i3sProvider.layers[0].tileset.style = new Cesium3DTileStyle({
  color: {
    conditions: [['true', "color('white')"]],
  },
});

this.map.getScene()?.primitives.add(this.i3sProvider);

Issue:

Despite these changes, the buildings still render as black in Cesium. In the original Madrid viewer, they appear as a proper grey with good contrast.

Questions:

  1. Is there a proper way to override I3S layer styling to achieve the grey appearance seen in the original viewer?
  2. Are there specific properties or methods I should use to modify I3S layer appearance beyond the current approach?
  3. Could this be related to how the I3S service defines its symbology, and is there a way to completely override it?

Environment:

Any guidance on properly styling I3S layers in Cesium would be greatly appreciated!

Hi @Thomas_Adolphi, welcome to the Cesium forums!

I think the issue here is mainly a normals issue. I set calculateNormals to true on the 3d tileset options, and changed the lightColor to be an intense white, and now the buildings look grey to me. What do you think?

Best,
Matt

Hi,

thank you so much. I tried to play around with calculateNormals but i simply have overseen the lightColor option.

BR Thomas