Lightning or Normals problem with 3D Tiles

Hi All,

I have two pipelines which create 3D Tiles.

  • The first one creates LOD1 buildings (extruded 2D polygons); this one computes normals for all vertices; they are exported in the GLB/B3DM tiles.
  • The second one post-processes LOD2 Textured buildings which are created in CityEngine (ESRI product) and exported in GLB. Note that CityEngine doesn’t export normals in GLB files.

From what I understand in GLTF specs, if normals are not available in a GLTF file, it’s up to the client to compute flat ones. From some changelog in Cesium, It seems that Cesium now follows the specs an computes normals if they are not defined in the loaded models.

As shown bellow :

I get correct lightning for LOD1 but not for LOD2.

I’m wondering if this problem comes from missing normals or from some other reasons (material definitions ? special settings when creating the Cesium3DTileset - i use the same for the two tilesets ? other ?).

Any help appreciated.
Fred.

Hi Fred,

Actually, CesiumJS does not compute normals for glTFs without them. We have an issue open for this here: Generate normals automatically for glTF 2.0 models · Issue #6506 · CesiumGS/cesium · GitHub.

We’d like to implement this in the future, though I don’t have a timeline for when that will happen. I’ll leave a comment on the issue, and when the feature is implemented, we’ll update this forum thread :slight_smile:

Hi Janine,
thanks for this information.
So, if i understand correctly, there is currently no way to get a right lightning without normals ?
I’ll try to evaluate how difficult it is to add normals computation in our CityEngine output post-processor.

Hi Fred,

Your understanding is correct. All models without normals are (currently) treated as unlit, so there will be no shading applied.