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.99k stars 3.5k forks source link

`Model` EXT_mesh_features: handle feature IDs without a property table #9884

Open ptrgags opened 3 years ago

ptrgags commented 3 years ago

in #9872 I noticed that supporting feature IDs without property tables (a new detail in EXT_mesh_features is a little more involved than expected:

9872 was getting large, and also I want to make sure I have recent changes from #9873 so just leaving a note for this now. #9880 is a higher priority right now.

sanjeetsuhag commented 3 years ago

Currently, https://github.com/CesiumGS/cesium/pull/9873 has functionality that enables B3dmLoader to do this for B3DMs with Batch IDs but no Batch Table. That should be replaced by this functionality in GltfLoader

ptrgags commented 2 years ago

One subtlety I'm noticing: for picking, the model has featureIdAttributeIndex -- does that correspond to FEATURE_ID_n or is that supposed to be the index within the featureIds array (which can also include implicit feature ID attributes and feature ID textures)? That's something that we should sort out

ptrgags commented 2 years ago

Some more specific notes about what needs to be updated (part of a larger set of notes I'll post in another issue)

parseFeatureMetadata

GltfLoader

ptrgags commented 2 years ago

opened #10007 for the larger details about handling multiple sets of feature IDs. This issue should be addressed first.

ptrgags commented 2 years ago

Today I hit a major snag: with the current picking system, it's unclear how to handle the batch texture since the total range of values is unknown (no propertyTable.count), potentially large and sparse (think unique ids into an external database, not necessarily contiguous).

Talking with @lilleyse, for right now we'll skip picking (though I do still plan to add the value to custom shaders). See also https://github.com/CesiumGS/cesium/issues/9852#issuecomment-1013508890

lilleyse commented 1 year ago

Requested on the forum: https://community.cesium.com/t/gltf-feature-extensions-support-in-cesium-ion/22911