Skip to content
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

DTVF: Additional properties in glTF nodes. #422

Closed
mdhillman opened this issue Nov 3, 2022 · 5 comments
Closed

DTVF: Additional properties in glTF nodes. #422

mdhillman opened this issue Nov 3, 2022 · 5 comments
Assignees
Labels
infra-vis Infrastructure issues relating to the visualisation framework.

Comments

@mdhillman
Copy link
Collaborator

mdhillman commented Nov 3, 2022

To enable compatability with the FeatureInfoAgent, the visualisation needs to be able to grab (at least) an iri and endpoint parameter from the object that Cesium returns upon the selection event firing.

Cesium makes this tricky as each type of input data has its own way of holding and getting this info. For glTF files within 3D tiles, I can see no obvious way to get this information.

I will need to look into the glTF standard to work out how to set this data in the first place, on a node-by-node level (so we have the flexibility of getting metadata on individual parts of a building), then ensuring it's propagated through Cesium's event system.

@mdhillman mdhillman added the infra-vis Infrastructure issues relating to the visualisation framework. label Nov 3, 2022
@mdhillman mdhillman self-assigned this Nov 3, 2022
@mdhillman
Copy link
Collaborator Author

I'll use the glTF files I have for MK's house as a test case for this; see if I can add iri and endpoint parameters for different nodes (e.g. each walls chimney stack, the garage).

@mdhillman
Copy link
Collaborator Author

mdhillman commented Nov 7, 2022

Looking at the glTF format, it appears that an extras object can be added to individual nodes within the file (details here).

A closed Cesium issue appears to suggest extra data is supported for each tileset, or each tile within a set. To select individual assets within a building say, we would need to ability to set extras on a per-node basis. Unfortunately, this does not appear to be supported by Cesium JS. I can find no pipeline to retrieve any per-node extra information from Cesium.

I can however get the name parameter for each node. One possibility is to escape a JSON object (containing whatever data we want) into a string and use that as the name for each node. The DTVF could then parse this to get the user-facing name, iri, endpoint etc. I'm not sure what software is used to create these glTF files, so setting this up may be tricky.

@mdhillman
Copy link
Collaborator Author

It looks like it may be possible to add additional parameters to the tileset JSON (rather than the glTF files themselves). I will test if this is accessible via Cesium.

This does however have the restriction that we can only set metadata (e.g. an iri) on a per-asset/tile basis.

@mdhillman
Copy link
Collaborator Author

It looks like it may be possible to add additional parameters to the tileset JSON (rather than the glTF files themselves). I will test if this is accessible via Cesium.

This does however have the restriction that we can only set metadata (e.g. an iri) on a per-asset/tile basis.

This is possible using the metadata/properties node within the tileset specification JSON. This will suffice for now, but it does mean that each asset (as defined in the tileset, not each node within the glTF) will be treated as a single entity with one iri.

@mdhillman
Copy link
Collaborator Author

Current implementation is sufficient for the foreseeable future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra-vis Infrastructure issues relating to the visualisation framework.
Projects
None yet
Development

No branches or pull requests

1 participant