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

bufferViews missing target types #142

Closed
viperscape opened this issue Dec 5, 2018 · 3 comments
Closed

bufferViews missing target types #142

viperscape opened this issue Dec 5, 2018 · 3 comments
Labels
exporter This involves or affects the export process

Comments

@viperscape
Copy link

On the latest exporter in Blenders 2.8 Beta, the bufferViews are missing their target types, is this expected behavior?

    "bufferViews" : [
        {
            "buffer" : 0,
            "byteLength" : 124992,
            "byteOffset" : 0
        },
        {
            "buffer" : 0,
            "byteLength" : 124992,
            "byteOffset" : 124992
        },
        {
            "buffer" : 0,
            "byteLength" : 166656,
            "byteOffset" : 249984
        },
        {
            "buffer" : 0,
            "byteLength" : 83328,
            "byteOffset" : 416640
        },
        {
            "buffer" : 0,
            "byteLength" : 122292,
            "byteOffset" : 499968
        }
    ],

Where before (2.7 exporter) they existed:

    "bufferViews" : [
        {
            "buffer" : 0,
            "byteLength" : 8064,
            "byteOffset" : 0,
            "target" : 34963
        },
        {
            "buffer" : 0,
            "byteLength" : 5196,
            "byteOffset" : 8064,
            "target" : 34962
        },
        {
            "buffer" : 0,
            "byteLength" : 5196,
            "byteOffset" : 13260,
            "target" : 34962
        },
        {
            "buffer" : 0,
            "byteLength" : 6928,
            "byteOffset" : 18456,
            "target" : 34962
        },
        {
            "buffer" : 0,
            "byteLength" : 3464,
            "byteOffset" : 25384,
            "target" : 34962
        }
    ],
@julienduroure julienduroure added the exporter This involves or affects the export process label Dec 5, 2018
@emackey
Copy link
Member

emackey commented Dec 5, 2018

Target is optional. The spec says:

When bufferView.target is defined, runtime must use it to determine data usage, otherwise it could be inferred from mesh' accessor objects.

@UX3D-becher
Copy link
Contributor

Yes, the target property isn't added to the glTF by the exporter any more

@gillesboisson
Copy link

gillesboisson commented Apr 13, 2019

I have also have the same issue here, I had to add to runtime sanity check which apply ELEMENT_ARRAY_BUFFER as target when bufferView is use in primitive indices accessor.

I use blender 2.80 2019-04-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter This involves or affects the export process
Projects
None yet
Development

No branches or pull requests

5 participants