CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.79k stars 3.46k forks source link

Allow ClassificationPrimitive to "hide" objects #5758

Open pjcozzi opened 7 years ago

pjcozzi commented 7 years ago

@bagnell we are doing this 3D Tiles classification tiles, but how hard is this for the general ClassificationPrimitive where it could be classifying anything in the scene? Can we use the same-ish rendering pipeline?

bagnell commented 7 years ago

The ClassificationPrimitive and 3D Tiles classification tiles render in the same pass so we wouldn't need to do anything different.

pjcozzi commented 7 years ago

Very nice, please just close this when that ships, or even cherry pick if parts of it can go into master sooner.

conradlempert commented 4 years ago

Do you have any news on this? I would like to have a Polygon hide the points of a 3D Tileset that are inside it.

OmarShehata commented 4 years ago

@conradlempert it's possible to hide everything outside a classification primitive (see example here: https://sandcastle.cesium.com/index.html?src=Classification.html). If you're trying to hide things inside a polygon, you could use clipping planes: https://sandcastle.cesium.com/index.html?src=Terrain%20Clipping%20Planes.html.

If you have any follow up questions about your specific use case you can post in the Cesium community forum: https://community.cesium.com/