debugWireframe not working with 3DTILES_content_gltf

In CesiumJS, I’ve noticed that wireframe mode (tileset param debugWireframe) doesn’t work with 3D Tiles tilesets that use the 3DTILES_content_gltf extension, i.e. tilesets that have content as .glb files
rather than .b3dm files. In particular, it doesn’t seem to work with 3D Tiles Next tilesets.

Is this a known problem? Is there a workaround?

To demonstrate, start with each of the following two sandcastle demos:

and either:

  • add debugWireframe:true, to the tileset construction params, or
  • add tileset.debugWireframe = true; after construction of the tileset, or
  • add viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin); after construction of the viewer, pick the tileset at runtime, and then try toggling the Display->wireframe checkbox.

Notice that wireframe mode works in the first (3D Tiles) demo, but seems to be ignored in the second (3D Tiles Next) demo. In general, I’ve observed that the problem seems to be specific to tilesets that use the 3DTILES_content_gltf extension.

Hi @donhatch,

Tilesets that are loaded with glb / glTF files are loaded with ModelExperimental instead of old Model. ModelExperimental requires an enableDebugWireframe option in order for debugWireframe to work.

So you’ll want to construct your tileset like so:

const tileset = new Cesium.Cesium3DTileset({
    url: "my url",
    enableDebugWireframe: true,
  });

Then, debugWireframe can be toggled at runtime. Note that we plan for ModelExperimental to replace Model entirely in the future, so this will eventually become required for all tilesets.

The underlying reason for this difference is that Model’s wireframe was not implemented accurately, and ModelExperimental needs to be loaded differently in order to correctly construct a wireframe. If you want, you can see these issues for more info:

Hi Janine, thanks for explaining, and for the references.
I’ll add enableDebugWireframe to my programs.

It seems to me there’s a remaining usability problem here, though.
That is, if I hook up a Cesium3DTilesInspector to a tileset that uses glb/glTF content,
then the inspector will contain a “wireframe” checkbox that doesn’t do anything,
and the user is given no hint of what this checkbox is supposed to do, or, conversely, whether any kind of wireframe mode is available at all.
Is there anything that can be done about this?

Hi @donhatch ,

Those are good points, thank you for bringing them up. I opened an issue below so we can address this when we make all tilesets load with ModelExperimental. We’ll work on communicating this to users to avoid future confusion.