How to color gtlf silhouette

I am loading a gltf from a file.
I draw on the map, and I have a picker like the exemple in the Sandcastle Here:

**So I made a edge detector **

var silhouetteGreen = Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
silhouetteGreen.uniforms.color = Cesium.Color.LIME;
silhouetteGreen.uniforms.length = 0.01;
silhouetteGreen.selected = [];

``

**Now, In the exemple when he pick stuff there is **

var pickedFeature = viewer.scene.pick(movement.endPosition);

``

But the result of it is a Cesium3DTileFeature :

In My case, is just a plain gltf node

https://prnt.sc/pgq4zt
And when I do

silhouetteBlue.selected = [pickedFeature];

nothing happens, even if I added correctly the postprocessing

this.snapshotPostProcessEffectRef = Cesium.PostProcessStageLibrary.createSilhouetteStage([silhouetteBlue, silhouetteGreen]);

this.viewer.scene.postProcessStages.add(this.snapshotPostProcessEffectRef);

How can I draw the edge of a gltf?

You’d need to get the underlying primitive from the picked object to apply post processing on it. See this Sandcastle example:

Let me know if that helps!

I had a similar problem and using the primitive I am able to highlight the silhouette of the whole city / model.

However I have a gltf model with all the buildings in the city. I am able to select the name of each one of them by clicking on them but following this example … Is there any way to highlight the silhouette of only one of the gltf model buildings?

Are the buildings in your glTF file separated in any way? The way that 3D Tiles example works is that 3D Tiles has a feature table that keeps track of which vertices belong to which buildings, that way you can color/style each feature (in this case building) independently. You could create a 3D Tileset like this if you have a way of converting your buildings to KML/COLLADA as described here: https://cesium.com/blog/2020/04/09/kml-collada-metadata/

I have generated the gltf model (can be downloaded here) through Blender, so each building has its own mesh. Blender also allows you to export in COLLADA, but I still cannot access the information of the buildings in Cesium (such as the name, use, etc. that is stored in the model) and highlight the silhouette of the buildings individually.

These properties would need to be stored in a KML file that describes which property belongs to each building.

Once glTF has a standard way of including metadata like this it would be great to make Cesium ion support it to make this workflow more streamlined.