-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model
- support noData
and required
from EXT_mesh_features
#9887
Comments
Some more details:
|
Yeah I think that's a good path to start |
@ptrgags could you post a new summary of the changes required here? Some things have changed in the spec and implementation since - notably Afterwards we can get |
Looks like a few details have already been accounted for:
Remaining details:
Future:
|
Might depend on the compiler and complexity of the expressions. |
Hm this brings up bigger questions about the custom shaders API. We also need to consider min, max, and statistics. What about sub-structs for these special properties? Only problem is it could collide with actual property names.
Related areas of the spec: The voxels branch already does it this way for statistics. |
It seems like this issue could be split into two PRs:
|
Two options to avoid the naming conflict: 1. Move the property value to metadata.propertyName.valuemetadata.propertyName.value
metadata.propertyName.noData
metadata.propertyName.default
...
metadata.propertyName.statistics.mean
... This would be a breaking change. Current applications get the property value directly as 2. Add a new top-level property to the Vertex/FragmentInput structstruct VertexInput {
// Processed attribute values.
Attributes attributes;
// Feature IDs/Batch IDs.
FeatureIds featureIds;
// Metadata property values.
Metadata metadata;
// Information about metadata properties.
MetadataClassInfo metadataClassInfo;
}; The per-vertex or per-fragment property values would still be accessed as metadataClassInfo.propertyName.noData
metadataClassInfo.propertyName.default
...
metadataClassInfo.propertyName.statistics.median
... |
@jjhembd I feel a bit undecided here, but leaning towards the second option since it keeps the basic value access simple ( Side note, overall this input struct feels like it is getting cumbersome to work with given how long the names become. |
Just jotting down one note from a conversation with @jjhembd, instead of nesting the statistics inside the Less nesting is better not just for ergonomics for the user, but also makes the GLSL code generation easier (fewer dynamic structs to generate) |
#10520 brought properties from the metadata Class Property into the shader. The next step is to bring in Property Statistics. In some ways, this is conceptually similar to what we did in #10520. But there are 3 additional complexities: 1. Property types are more complicated 2. Values of statistics are harder to retrieve 3. These factors will affect the time estimate for the next PR. I will follow up with a couple questions. |
@ptrgags, can you point me to where I can find answers to these 2 questions?
Do we have enums with array values? |
No, but we have arrays of enum values: propertyEnumArray: {
type: "ENUM",
array: true,
count: 3
enumType: "myEnum",
},
// so the statistics should be an array with occurrences for index 0, index 1, index 2... |
Statistics also exist for 3D Tiles 1.1. @ptrgags is the API the same for both? |
Ah yes, sorry for the confusion. Yes, |
Thanks @ptrgags! So if I understand you correctly, the glTF files we are currently using in
|
I'm still trying to trace back the link between |
@jjhembd There are some parent pointers that you can use to locate the tileset:
These pointers skip over a few levels of abstraction. To recap the full hierarchy here (from root to leaves):
|
Also one thing to consider when implementing statistics (and this goes for anything else that comes from tileset/tile/content metadata as well), is that this information is coarser-grained, so as far as the |
As discussed with @ptrgags: we need to load a 3DTileset in
const tilesetOptions = { enableModelExperimental: true };
return Cesium3DTilesTester.loadTileset(
scene,
tilesetWithMetadata,
tilesetOptions
).then(tileset => { // ...
I couldn't find a sample tileset with statistics. So I spent some time understanding the structure of this tileset: Specs/Data/Cesium3DTiles/Metadata/AllMetadataTypes/tileset_1.1.json and am now adding a |
One upcoming challenge for
|
Can we mock the tileset like in Or we should step back and think about whether statistics should be passed along to the model so that it doesn't have to reach back to the tileset. |
This option seems cleaner to me. It can leverage some of the existing code. |
ModelExperimental
- support noData
and required
from EXT_mesh_features
Model
- support noData
and required
from EXT_mesh_features
One of the schema changes from
EXT_mesh_features
is to removedefault
andoptional
from the schema and replace them withnoData
andrequired
. The CesiumJS implementation still needs to be updated for this.This was out of scope for #9880 since it has wider reaching implications. I want to wait on this until getting metadata working in Custom Shaders
The text was updated successfully, but these errors were encountered: