White 3d tiles very dark

Hi, I’ve created white 3D Tiles but they are visualized very dark/gray (even when changing time of day). Why do the models look so dark? How to draw them bright white?

Demo https://bertt.github.io/cesium_issues/dark/

Glb (https://bertt.github.io/cesium_issues/dark/tiles/content/2_0_1.glb)

The B3DM contains a GLB with

  "materials" : [
    {
      "doubleSided" : true,
      "pbrMetallicRoughness" : { }
    },
    {
      "doubleSided" : true,
      "pbrMetallicRoughness" : {
        "metallicFactor" : 0,
        "roughnessFactor" : 0.501960813999176
      }
    }
  ],

The empty pbrMetallicRoughness of the material causes the default values to be used, and the default metallicFactor is 1, according to the specification.

(I somehow think that this … is undesirable, and have the impression that some viewers do not obey this, but… would have to try it out in detail, and look up the implemementation of each viewer…)

So the default value of 1.0 should cause objects to appear very dark. For example, consider the upper right sphere in this MetalRoughSpheresNoTextures sample model screenshot:


(The base color there is (0.6, 0.6, 0.6), but for (1,1,1) (white) the effect would be the same - namely that of appearing much darker than one would expect).

Changing the material definition to set the metallicFactor to 0 should fix this:

    {
      "doubleSided": true,
      "pbrMetallicRoughness": {
        "metallicFactor": 0
      }
    },

Cesium Forum 26208 metallic issue

(The lighting still depends on the time of day, of course, but in broad daylight, the objects should appear white then…)

1 Like

ah thanks a lot! Fixed it here https://bertt.github.io/cesium_issues/dark/fixed/

three.js has defaults 0.0 for metallic, 1.0 for roughness three.js docs

using these defaults in Cesium would prevent this kind of issues, maybe an idea?

Hi, I have the same problem with my tiles that I converted from the citygml, and I have no influence on the material used.

Is there a way that I can then style that tile and fix lighting/material in the client ?
I only figured out how to change the color so far.

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

@Maciej_Eckstein I think that there is no way to affect this via styling operations (but would like to stand corrected if someone from the CesiumJS core team chimes in).

If you have the tileset (with its B3DM or GLB files), then it should be possible to post-process this with a small snippet based on the 3d-tiles-tools. That’s a huge hammer for a small nail, but could be an option if there is no other solution.

(An advantage could be that any renderer that follows the word and spirit of glTF, and uses the default of metallicValue=1 would then still render the tileset correctly, without manual tweaks to the rendering itself - whether or not that’s worth the effort is hard to say…)