KhronosGroup / KhronosGroup/glTF-InteractivityGraph-AuthoringTool

Documentation: Unclear how "World JSON" is supposed to work

Open
#13 1 comment 0 reactions 0 assignees View on GitHub
documentation
Dominant language
TypeScript
Stars
33
Forks
6
PR merge metrics
No merged PRs in 30d

Description

My understanding is that "Upload World JSON" is kind of a shortcut to having an actual glTF; it allows passing in some JSON data (ideally basically a glTF file or subset thereof) and then operating on that data.

However, I can't seem to get it to work.

Here's the World JSON I tried to use:

```json
{
"materials": [
{
"doubleSided": true,
"name": "Box",
"pbrMetallicRoughness": {
"baseColorFactor": [
0.800000011920929,
0.800000011920929,
0.800000011920929,
1
],
"roughnessFactor": 0.418181836605072
}
},
{
"doubleSided": true,
"name": "Numbers",
"pbrMetallicRoughness": {
"baseColorTexture": {
"extensions": {
"KHR_texture_transform": {
"offset": [
0,
0.9999999925494194
],
"scale": [
1,
0.10000000149011612
]
}
},
"index": 0
},
"metallicFactor": 0,
"roughnessFactor": 0.44090908765792847
}
}
]
}
```

and here's the graph:
```json
{
"nodes": [
{
"type": "pointer/get",
"values": [
{
"id": "index",
"value": [
1
],
"type": 1
}
],
"configuration": [
{
"id": "pointer",
"value": "/materials/{index}/pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset"
}
],
"flows": [],
"metadata": {
"positionX": "-152.95025358469047",
"positionY": "-14.052485184163714"
}
},
{
"type": "event/onStart",
"values": [],
"configuration": [],
"flows": [
{
"id": "out",
"node": 2,
"socket": "in"
}
],
"metadata": {
"positionX": "-87.98506592492325",
"positionY": "285.35751182875754"
}
},
{
"type": "ADBE/output_console_node",
"values": [
{
"id": "message",
"node": 0,
"socket": "isValid"
}
],
"configuration": [],
"flows": [],
"metadata": {
"positionX": "234.9002222471646",
"positionY": "101.39403215244309"
}
}
],
"variables": [],
"customEvents": [],
"types": [
{
"signature": "bool"
},
{
"signature": "int"
},
{
"signature": "float"
},
{
"signature": "float2"
},
{
"signature": "float3"
},
{
"signature": "float4"
},
{
"signature": "float4x4"
},
{
"signature": "custom",
"extensions": {
"AMZN_interactivity_string": {}
}
}
]
}
```

My expectation is that this should log "true". Is that incorrect?

**EDIT:** After looking into the code, it seems like only `/nodes/99/scale, rotation, translation` is hardcoded for pointer access instead of using what's available in the world model.

Loading a GLB also doesn't seem to actually make it possible to access the JSON data inside; only specific properties are registered

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files or tests are named. Start by reproducing the supplied World JSON and graph, then inspect pointer access and world-model property registration. Done means determining whether arbitrary World JSON paths are supported and documenting or correcting the observed limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.