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:
- In Cesium, the buildings appear completely black.
- In the original Madrid 3D viewer (https://geoportal.madrid.es/IDEAM_WBGEOPORTAL/visor_3d.iam), the buildings are nicely styled in grey.
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:
- Is there a proper way to override I3S layer styling to achieve the grey appearance seen in the original viewer?
- Are there specific properties or methods I should use to modify I3S layer appearance beyond the current approach?
- 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!