Self generated 3D tileset terrain, winding order problem

Hi.
I have a winding order/doublesided problem for my local custom generated tileset.

I’m generating 3d tiles from heightmaps locally by my pipeline.
The process is:
Read height data => Generate mesh => Optimize with meshoptimizer => Output.

If I reduce indices/triangles too aggressively with meshoptimizer, some hole/torn like artifacts appear on the terrain. I realized that the holes appears because winding order is reversed for those triangles, and ChatGPT said it might happen if the mesh is optimized too aggressively.

By accepting this may happen, the problem is I see those reversed triangles as ‘transparent’, not double sided even though my gltf material is set as doublesided.

This is front facing view:

This is back facing view:

The glTF is ‘doublesided’ so I wouldn’t expect this to happen. UV’s may be a problem for texturing but at least I expect to see some shading at there.

Is there a known issue about the problem, either Cesium or UE related? What can I do to mitigate the problem?

UE: 5.2.1
Cesium for Unreal: 2.10.0


"materials": [
    {
      "alphaMode": "MASK",
      "doubleSided": true,
      "extensions": {
        "KHR_materials_unlit": {}
      },
      "pbrMetallicRoughness": {
        "baseColorTexture": {
          "index": 0
        },
        "metallicFactor": 0.0,
        "roughnessFactor": 0.9679999947547913
      }
    }
  ],
"images": [
    {
      "uri": "./top_strip.jpg"
    }
  ],

It’s difficult to see the actual topology from the screenshots. It might be helpful if you could share one of the original and optimized GLB files (if they can be shared). But maybe someone from the Cesium For Unreal core team already has an idea about what might be wrong there, and can give hints about possible caveats when it comes to double-sided materials or the winding order.

Hi @yunusyurtturk,
It’s unfortunately a known problem that doubleSided materials are not currently supported:

I think the claim in that issue that double-sided rendering is enabled for all materials is no longer true (it’s a very old issue).

We added support for doubleSided in Ceisum for Unity a few months back, so that might be a useful reference for someone trying to add it to Unreal as well: