Skip to content

Commit a2bb50c

Browse files
authored
Add the Instantiation model group (KhronosGroup#535)
* Add the Instantiation model group. * Add ability to instance a image, texture, texture sampler, material, attribute accessor, mesh, skin, joint, inverseBindMatrice, and animation sampler. * Remove the runtime class `SkinJoint` and instead track Joints and InverseBindMatrices in the Skin class. * Add images A and B.
1 parent e381755 commit a2bb50c

File tree

200 files changed

+5421
-1919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+5421
-1919
lines changed

Diff for: Output/Positive/Animation_Skin/Animation_Skin_05.bin

-48 Bytes
Binary file not shown.

Diff for: Output/Positive/Animation_Skin/Animation_Skin_05.gltf

+6-19
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,13 @@
6464
},
6565
{
6666
"bufferView": 6,
67-
"componentType": 5125,
68-
"count": 12,
69-
"type": "SCALAR",
70-
"name": "Indices Accessor"
71-
},
72-
{
73-
"bufferView": 7,
7467
"componentType": 5126,
7568
"count": 6,
7669
"type": "VEC4",
7770
"name": "weights accessor"
7871
},
7972
{
80-
"bufferView": 8,
73+
"bufferView": 7,
8174
"componentType": 5123,
8275
"count": 6,
8376
"type": "VEC4",
@@ -91,7 +84,7 @@
9184
"buffers": [
9285
{
9386
"uri": "Animation_Skin_05.bin",
94-
"byteLength": 656
87+
"byteLength": 608
9588
}
9689
],
9790
"bufferViews": [
@@ -133,18 +126,12 @@
133126
{
134127
"buffer": 0,
135128
"byteOffset": 464,
136-
"byteLength": 48,
137-
"name": "Indices"
138-
},
139-
{
140-
"buffer": 0,
141-
"byteOffset": 512,
142129
"byteLength": 96,
143130
"name": "weights buffer view"
144131
},
145132
{
146133
"buffer": 0,
147-
"byteOffset": 608,
134+
"byteOffset": 560,
148135
"byteLength": 48,
149136
"name": "joint indices buffer view"
150137
}
@@ -192,10 +179,10 @@
192179
{
193180
"attributes": {
194181
"POSITION": 5,
195-
"WEIGHTS_0": 7,
196-
"JOINTS_0": 8
182+
"WEIGHTS_0": 6,
183+
"JOINTS_0": 7
197184
},
198-
"indices": 6,
185+
"indices": 1,
199186
"material": 1
200187
}
201188
]

Diff for: Output/Positive/Animation_Skin/Animation_Skin_07.bin

-128 Bytes
Binary file not shown.

Diff for: Output/Positive/Animation_Skin/Animation_Skin_07.gltf

+7-29
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@
8686
{
8787
"bufferView": 9,
8888
"componentType": 5126,
89-
"count": 2,
90-
"type": "MAT4",
91-
"name": "IBM"
92-
},
93-
{
94-
"bufferView": 10,
95-
"componentType": 5126,
9689
"count": 3,
9790
"type": "SCALAR",
9891
"max": [
@@ -104,7 +97,7 @@
10497
"name": "Animation Sampler Input"
10598
},
10699
{
107-
"bufferView": 11,
100+
"bufferView": 10,
108101
"componentType": 5126,
109102
"count": 3,
110103
"type": "VEC4",
@@ -124,8 +117,8 @@
124117
],
125118
"samplers": [
126119
{
127-
"input": 10,
128-
"output": 11
120+
"input": 9,
121+
"output": 10
129122
}
130123
]
131124
}
@@ -137,7 +130,7 @@
137130
"buffers": [
138131
{
139132
"uri": "Animation_Skin_07.bin",
140-
"byteLength": 892
133+
"byteLength": 764
141134
}
142135
],
143136
"bufferViews": [
@@ -197,18 +190,12 @@
197190
{
198191
"buffer": 0,
199192
"byteOffset": 704,
200-
"byteLength": 128,
201-
"name": "Inverse Bind Matrix"
202-
},
203-
{
204-
"buffer": 0,
205-
"byteOffset": 832,
206193
"byteLength": 12,
207194
"name": "Animation Sampler Input"
208195
},
209196
{
210197
"buffer": 0,
211-
"byteOffset": 844,
198+
"byteOffset": 716,
212199
"byteLength": 48,
213200
"name": "Animation Sampler Output"
214201
}
@@ -299,7 +286,7 @@
299286
"name": "joint1"
300287
},
301288
{
302-
"skin": 1,
289+
"skin": 0,
303290
"mesh": 1,
304291
"name": "outerPrism"
305292
}
@@ -320,16 +307,7 @@
320307
"joints": [
321308
1,
322309
2
323-
],
324-
"name": "innerPrismSkinB"
325-
},
326-
{
327-
"inverseBindMatrices": 9,
328-
"joints": [
329-
1,
330-
2
331-
],
332-
"name": "outerPrismSkinB"
310+
]
333311
}
334312
]
335313
}

Diff for: Output/Positive/Animation_Skin/Manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"sampleImageName": "Figures/SampleImages/Animation_Skin_11.png",
141141
"camera": {
142142
"translation": [
143-
0.8,
143+
1.5,
144144
0.0,
145145
1.0
146146
]

Diff for: Output/Positive/Animation_Skin/ValidatorResults/Animation_Skin_05.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"mimeType": "application/gltf-buffer",
2020
"storage": "external",
2121
"uri": "Animation_Skin_05.bin",
22-
"byteLength": 656
22+
"byteLength": 608
2323
}
2424
],
2525
"hasAnimations": false,

Diff for: Output/Positive/Animation_Skin/ValidatorResults/Animation_Skin_07.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"mimeType": "application/gltf-buffer",
2020
"storage": "external",
2121
"uri": "Animation_Skin_07.bin",
22-
"byteLength": 892
22+
"byteLength": 764
2323
}
2424
],
2525
"hasAnimations": true,
8.03 KB
7.38 KB
8.03 KB
8.61 KB
8.54 KB
8.54 KB
8.64 KB
8.71 KB
8.81 KB
8.71 KB
78.8 KB
89.2 KB
89.7 KB

Diff for: Output/Positive/Instancing/Instancing_00.bin

208 Bytes
Binary file not shown.

Diff for: Output/Positive/Instancing/Instancing_00.gltf

+189
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"accessors": [
3+
{
4+
"bufferView": 0,
5+
"componentType": 5126,
6+
"count": 4,
7+
"type": "VEC3",
8+
"max": [
9+
-0.100000024,
10+
0.5,
11+
0.0
12+
],
13+
"min": [
14+
-1.1,
15+
-0.5,
16+
0.0
17+
],
18+
"name": "Positions Accessor"
19+
},
20+
{
21+
"bufferView": 1,
22+
"componentType": 5126,
23+
"count": 4,
24+
"type": "VEC2",
25+
"name": "UV Accessor 0"
26+
},
27+
{
28+
"bufferView": 2,
29+
"componentType": 5125,
30+
"count": 6,
31+
"type": "SCALAR",
32+
"name": "Indices Accessor"
33+
},
34+
{
35+
"bufferView": 3,
36+
"componentType": 5126,
37+
"count": 4,
38+
"type": "VEC3",
39+
"max": [
40+
1.1,
41+
0.5,
42+
0.0
43+
],
44+
"min": [
45+
0.100000024,
46+
-0.5,
47+
0.0
48+
],
49+
"name": "Positions Accessor"
50+
},
51+
{
52+
"bufferView": 4,
53+
"componentType": 5126,
54+
"count": 4,
55+
"type": "VEC2",
56+
"name": "UV Accessor 0"
57+
},
58+
{
59+
"bufferView": 5,
60+
"componentType": 5125,
61+
"count": 6,
62+
"type": "SCALAR",
63+
"name": "Indices Accessor"
64+
}
65+
],
66+
"asset": {
67+
"generator": "glTF Asset Generator",
68+
"version": "2.0"
69+
},
70+
"buffers": [
71+
{
72+
"uri": "Instancing_00.bin",
73+
"byteLength": 208
74+
}
75+
],
76+
"bufferViews": [
77+
{
78+
"buffer": 0,
79+
"byteLength": 48,
80+
"name": "Positions"
81+
},
82+
{
83+
"buffer": 0,
84+
"byteOffset": 48,
85+
"byteLength": 32,
86+
"name": "Texture Coords 0"
87+
},
88+
{
89+
"buffer": 0,
90+
"byteOffset": 80,
91+
"byteLength": 24,
92+
"name": "Indices"
93+
},
94+
{
95+
"buffer": 0,
96+
"byteOffset": 104,
97+
"byteLength": 48,
98+
"name": "Positions"
99+
},
100+
{
101+
"buffer": 0,
102+
"byteOffset": 152,
103+
"byteLength": 32,
104+
"name": "Texture Coords 0"
105+
},
106+
{
107+
"buffer": 0,
108+
"byteOffset": 184,
109+
"byteLength": 24,
110+
"name": "Indices"
111+
}
112+
],
113+
"images": [
114+
{
115+
"uri": "Textures/BaseColor_A.png"
116+
}
117+
],
118+
"materials": [
119+
{
120+
"pbrMetallicRoughness": {
121+
"baseColorTexture": {
122+
"index": 0
123+
}
124+
}
125+
},
126+
{
127+
"pbrMetallicRoughness": {
128+
"baseColorTexture": {
129+
"index": 1
130+
}
131+
}
132+
}
133+
],
134+
"meshes": [
135+
{
136+
"primitives": [
137+
{
138+
"attributes": {
139+
"POSITION": 0,
140+
"TEXCOORD_0": 1
141+
},
142+
"indices": 2,
143+
"material": 0
144+
},
145+
{
146+
"attributes": {
147+
"POSITION": 3,
148+
"TEXCOORD_0": 4
149+
},
150+
"indices": 5,
151+
"material": 1
152+
}
153+
]
154+
}
155+
],
156+
"nodes": [
157+
{
158+
"mesh": 0
159+
}
160+
],
161+
"samplers": [
162+
{
163+
"wrapS": 33071,
164+
"wrapT": 33071
165+
},
166+
{
167+
"wrapS": 33648,
168+
"wrapT": 33648
169+
}
170+
],
171+
"scene": 0,
172+
"scenes": [
173+
{
174+
"nodes": [
175+
0
176+
]
177+
}
178+
],
179+
"textures": [
180+
{
181+
"sampler": 0,
182+
"source": 0
183+
},
184+
{
185+
"sampler": 1,
186+
"source": 0
187+
}
188+
]
189+
}

Diff for: Output/Positive/Instancing/Instancing_01.bin

208 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)