gltf bufferview

I'm confused by bufferView. I have 10 accessors ,I must have 10 bufferviews for different data? for example, can I only have 1 bufferview for all vertices normal texturecood batchID? i plan to set offset at accessor .
and what does bufferview's target property work for?

One limitation for buffer views in that all accessors that reference a buffer view must have the same stride. Positions and normals typically have a stride of 12, texture coordinates typically have a stride of 8, and batch ids typically have a stride of 2. If you decide to use a single buffer view with the right accessor offsets Cesium will load it, however it would not be valid according to the glTF 2.0 spec.

To get around this limitation people often interleave vertex attributes, which allows all accessors to have the same stride and use the same buffer view. Check out Box Interleaved as an example.

The bufferView target property says whether the bufferView contains vertex data or indices data. This is not required for loading into Cesium since we can infer this information based on which accessors use which bufferViews.

you mean mix the position normal and so on, point1's position,point1's normai ,point1's textcoord,point1's batchid,then point2's position,point2's normai ,point2's textcoord,point2's batchid.
but i dont understand,different data have a different componentType( 5126) count type(vec3) and byteOffset ,even stride property in accessor,that tell cesium to extract data from the the same bufferview?

Yeah that’s the ordering I mean. All the accessors would have the same stride (34) and each accessor would have a byteOffset to its first attribute. (e.g. 0 for position, 12 for normal, 24 for texcoord, and 32 for batch id). The count and other properties would stay the same. Cesium doesn’t actually extract the data stored in the buffers, it is sent right to the GPU, where having interleaved attributes like this is valid.

I have been blocked to visit google,so I can’t visit cesium forum.

I got error below,when loaded a B3DM file

"An error occurred while rendering. Rendering has stopped.

TypeError: Cannot read property ‘skinning’ of undefined
TypeError: Cannot read property ‘skinning’ of undefined
at d (http://localhost/c/Build/Cesium/Cesium.js:513:16510)
at http://localhost/c/Build/Cesium/Cesium.js:513:15953
at Object.t.object (http://localhost/c/Build/Cesium/Cesium.js:512:11239)
at Object.t.topLevel (http://localhost/c/Build/Cesium/Cesium.js:512:11331)
at Object.t.material (http://localhost/c/Build/Cesium/Cesium.js:512:11923)
at c (http://localhost/c/Build/Cesium/Cesium.js:513:15886)
at we.update (http://localhost/c/Build/Cesium/Cesium.js:515:31529)
at b.update (http://localhost/c/Build/Cesium/Cesium.js:526:17179)
at R.process (http://localhost/c/Build/Cesium/Cesium.js:531:27246)
at K (http://localhost/c/Build/Cesium/Cesium.js:532:28317)

I think you are encountering this bug:

The fix was merged and will be included in Cesium 1.44 on April 2.

you mean I have some material that don’t be used by any primitive? i do have,if you will fix the bug, so I don’t need to modify my program? thank you very much,i have been work for the reason for three days ,thanks for you answer.

Correct, this was a bug on our end and you don’t need to modify your glTF or your program.

Everything should work once Cesium 1.44 is out.

(Sorry for the duplicate message. I sent you this earlier but forgot to send it out to the rest of the google group)