How to highlight the edges of a GLB model in CesiumJS?

Hi,
I’m using CesiumJS and want to highlight the edges of a GLB model, similar to an outline or wireframe effect.
Is there a simple way to show the edges of the model in Cesium?
Maybe using a shader, post-processing, or any other method?
I’m loading a standard GLB model into my scene, and it renders fine — I just want to make the edges more visible for better clarity.

If anyone has done this before or knows a good way, I’d appreciate your help.
Thanks!

There are different concepts of what “highlighting edges” could refer to.

From the description, it sounds like you are not referring to what is sometimes called “silhouette rendering”.

It sounds like you might refer to what can be achieved with the CESIUM_primitive_outline extension. But note that this is not something that can just be “switched on”. Instead, the edges that should be highlighted have to be stored explicitly in that glTF extension. A more versatile extension for highlighting edges is currently in development, via the EXT_mesh_primitive_edge_visibility pull request (Direct link to README.md), but this is not yet finalized or supported.

It sounds like this mainly refers to something that is related to wireframe rendering, which would look like this:

CesiumJS offers this as a debugging functionality. You can pass in the

  enableDebugWireframe: true,
  debugWireframe: true

options when creating the model to achieve this. This is shown (with a different model) in this sandcastle:

What is currently not easily possible is to show the standard (“filled”) representation of the model, and render such a wireframe on top of that. It might be possible to achieve that with a custom shader, but it might be a bit tricky and involve some work.

@Marco13
how can we have private chat?

You can click on my user name and select “Message” in the upper right. (I might not always be able to quickly answer all questions, but … we’ll see…)


I cant find "Message"button.
???

That’s strange. There was some “User Note” associated with your account, and maybe a certain “trust level” is required. But I just sent you a message, let’s see if you receive (and can respond) to that.