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

Gltf file node name is missing? #1

Closed
pigLoveRabbit520 opened this issue May 22, 2022 · 1 comment
Closed

Gltf file node name is missing? #1

pigLoveRabbit520 opened this issue May 22, 2022 · 1 comment

Comments

@pigLoveRabbit520
Copy link

pigLoveRabbit520 commented May 22, 2022

this is my glTF file

{
  "asset": {
    "generator": "Khronos glTF Blender I/O v1.8.19",
    "version": "2.0"
  },
  "scene": 0,
  "scenes": [
    {
      "name": "Scene",
      "nodes": [
        0
      ]
    }
  ],
  "nodes": [
    {
      "mesh": 0,
      "name": "c1",
      "translation": [
        50,
        20,
        30
      ]
    }
  ],
  "meshes": [
    {
      "name": "Cube",
      "primitives": [
        {
          "attributes": {
            "POSITION": 0,
            "NORMAL": 1,
            "TEXCOORD_0": 2
          },
          "indices": 3
        }
      ]
    }
  ],
  "accessors": [
    {
      "bufferView": 0,
      "componentType": 5126,
      "count": 24,
      "max": [
        1,
        1,
        1
      ],
      "min": [
        -1,
        -1,
        -1
      ],
      "type": "VEC3"
    },
    {
      "bufferView": 1,
      "componentType": 5126,
      "count": 24,
      "type": "VEC3"
    },
    {
      "bufferView": 2,
      "componentType": 5126,
      "count": 24,
      "type": "VEC2"
    },
    {
      "bufferView": 3,
      "componentType": 5123,
      "count": 36,
      "type": "SCALAR"
    }
  ],
  "bufferViews": [
    {
      "buffer": 0,
      "byteLength": 288,
      "byteOffset": 0
    },
    {
      "buffer": 0,
      "byteLength": 288,
      "byteOffset": 288
    },
    {
      "buffer": 0,
      "byteLength": 192,
      "byteOffset": 576
    },
    {
      "buffer": 0,
      "byteLength": 72,
      "byteOffset": 768
    }
  ],
  "buffers": [
    {
      "uri": "simple_data.bin",
      "byteLength": 840
    }
  ]
}

There is only one Cube with name c1, however, after exporting vrscene file, I cannot get the Node by

renderer.GetPlugin<Node>("c1@node")
@vkoylazov
Copy link
Contributor

The gltf reader can't read binary buffers data from a sidecar file ("simple_data.bin" in your case). The buffers need to be in the gltf file itself right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants