thomwolf HF Staff commited on
Commit
6c3acde
·
1 Parent(s): 3d88414

adding files

Browse files
README.md CHANGED
@@ -10,3 +10,28 @@ pinned: false
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces#reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces#reference
13
+
14
+ # SimpleSkin
15
+
16
+ A simple example for vertex skinning in glTF 2.0.
17
+
18
+ Details about skinning using this particular model are explained in the
19
+ [skinning section of the glTF tutorial](https://github.com/javagl/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md).
20
+
21
+ ## Screenshot
22
+
23
+ ![screenshot](screenshot/screenshot.gif)
24
+
25
+ ## License Information
26
+
27
+ Public domain ([CC0](https://creativecommons.org/publicdomain/zero/1.0/))
28
+
29
+ ## Data layout
30
+
31
+ The following images show the data layout of this sample:
32
+
33
+ ![skinGeometry](screenshot/skinGeometry.png)
34
+ ![skinAnimation](screenshot/skinAnimation.png)
35
+ ![inverseBindMatrices](screenshot/inverseBindMatrices.png)
36
+ ![skinningData](screenshot/skinningData.png)
37
+
glTF-Embedded/SimpleSkin.gltf ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "scene" : 0,
3
+ "scenes" : [ {
4
+ "nodes" : [ 0, 1 ]
5
+ } ],
6
+
7
+ "nodes" : [ {
8
+ "skin" : 0,
9
+ "mesh" : 0
10
+ }, {
11
+ "children" : [ 2 ]
12
+ }, {
13
+ "translation" : [ 0.0, 1.0, 0.0 ],
14
+ "rotation" : [ 0.0, 0.0, 0.0, 1.0 ]
15
+ } ],
16
+
17
+ "meshes" : [ {
18
+ "primitives" : [ {
19
+ "attributes" : {
20
+ "POSITION" : 1,
21
+ "JOINTS_0" : 2,
22
+ "WEIGHTS_0" : 3
23
+ },
24
+ "indices" : 0
25
+ } ]
26
+ } ],
27
+
28
+ "skins" : [ {
29
+ "inverseBindMatrices" : 4,
30
+ "joints" : [ 1, 2 ]
31
+ } ],
32
+
33
+ "animations" : [ {
34
+ "channels" : [ {
35
+ "sampler" : 0,
36
+ "target" : {
37
+ "node" : 2,
38
+ "path" : "rotation"
39
+ }
40
+ } ],
41
+ "samplers" : [ {
42
+ "input" : 5,
43
+ "interpolation" : "LINEAR",
44
+ "output" : 6
45
+ } ]
46
+ } ],
47
+
48
+ "buffers" : [ {
49
+ "uri" : "data:application/gltf-buffer;base64,AAABAAMAAAADAAIAAgADAAUAAgAFAAQABAAFAAcABAAHAAYABgAHAAkABgAJAAgAAAAAvwAAAAAAAAAAAAAAPwAAAAAAAAAAAAAAvwAAAD8AAAAAAAAAPwAAAD8AAAAAAAAAvwAAgD8AAAAAAAAAPwAAgD8AAAAAAAAAvwAAwD8AAAAAAAAAPwAAwD8AAAAAAAAAvwAAAEAAAAAAAAAAPwAAAEAAAAAA",
50
+ "byteLength" : 168
51
+ }, {
52
+ "uri" : "data:application/gltf-buffer;base64,AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAABAPwAAgD4AAAAAAAAAAAAAQD8AAIA+AAAAAAAAAAAAAAA/AAAAPwAAAAAAAAAAAAAAPwAAAD8AAAAAAAAAAAAAgD4AAEA/AAAAAAAAAAAAAIA+AABAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAA=",
53
+ "byteLength" : 320
54
+ }, {
55
+ "uri" : "data:application/gltf-buffer;base64,AACAPwAAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAgD8AAAAAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIC/AAAAAAAAgD8=",
56
+ "byteLength" : 128
57
+ }, {
58
+ "uri" : "data:application/gltf-buffer;base64,AAAAAAAAAD8AAIA/AADAPwAAAEAAACBAAABAQAAAYEAAAIBAAACQQAAAoEAAALBAAAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAkxjEPkSLbD8AAAAAAAAAAPT9ND/0/TQ/AAAAAAAAAAD0/TQ/9P00PwAAAAAAAAAAkxjEPkSLbD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAkxjEvkSLbD8AAAAAAAAAAPT9NL/0/TQ/AAAAAAAAAAD0/TS/9P00PwAAAAAAAAAAkxjEvkSLbD8AAAAAAAAAAAAAAAAAAIA/",
59
+ "byteLength" : 240
60
+ } ],
61
+
62
+ "bufferViews" : [ {
63
+ "buffer" : 0,
64
+ "byteLength" : 48,
65
+ "target" : 34963
66
+ }, {
67
+ "buffer" : 0,
68
+ "byteOffset" : 48,
69
+ "byteLength" : 120,
70
+ "target" : 34962
71
+ }, {
72
+ "buffer" : 1,
73
+ "byteLength" : 320,
74
+ "byteStride" : 16
75
+ }, {
76
+ "buffer" : 2,
77
+ "byteLength" : 128
78
+ }, {
79
+ "buffer" : 3,
80
+ "byteLength" : 240
81
+ } ],
82
+
83
+ "accessors" : [ {
84
+ "bufferView" : 0,
85
+ "componentType" : 5123,
86
+ "count" : 24,
87
+ "type" : "SCALAR"
88
+ }, {
89
+ "bufferView" : 1,
90
+ "componentType" : 5126,
91
+ "count" : 10,
92
+ "type" : "VEC3",
93
+ "max" : [ 0.5, 2.0, 0.0 ],
94
+ "min" : [ -0.5, 0.0, 0.0 ]
95
+ }, {
96
+ "bufferView" : 2,
97
+ "componentType" : 5123,
98
+ "count" : 10,
99
+ "type" : "VEC4"
100
+ }, {
101
+ "bufferView" : 2,
102
+ "byteOffset" : 160,
103
+ "componentType" : 5126,
104
+ "count" : 10,
105
+ "type" : "VEC4"
106
+ }, {
107
+ "bufferView" : 3,
108
+ "componentType" : 5126,
109
+ "count" : 2,
110
+ "type" : "MAT4"
111
+ }, {
112
+ "bufferView" : 4,
113
+ "componentType" : 5126,
114
+ "count" : 12,
115
+ "type" : "SCALAR",
116
+ "max" : [ 5.5 ],
117
+ "min" : [ 0.0 ]
118
+ }, {
119
+ "bufferView" : 4,
120
+ "byteOffset" : 48,
121
+ "componentType" : 5126,
122
+ "count" : 12,
123
+ "type" : "VEC4",
124
+ "max" : [ 0.0, 0.0, 0.707, 1.0 ],
125
+ "min" : [ 0.0, 0.0, -0.707, 0.707 ]
126
+ } ],
127
+
128
+ "asset" : {
129
+ "version" : "2.0"
130
+ }
131
+ }
glTF/SimpleSkin.gltf ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "scene" : 0,
3
+ "scenes" : [ {
4
+ "nodes" : [ 0, 1 ]
5
+ } ],
6
+
7
+ "nodes" : [ {
8
+ "skin" : 0,
9
+ "mesh" : 0
10
+ }, {
11
+ "children" : [ 2 ]
12
+ }, {
13
+ "translation" : [ 0.0, 1.0, 0.0 ],
14
+ "rotation" : [ 0.0, 0.0, 0.0, 1.0 ]
15
+ } ],
16
+
17
+ "meshes" : [ {
18
+ "primitives" : [ {
19
+ "attributes" : {
20
+ "POSITION" : 1,
21
+ "JOINTS_0" : 2,
22
+ "WEIGHTS_0" : 3
23
+ },
24
+ "indices" : 0
25
+ } ]
26
+ } ],
27
+
28
+ "skins" : [ {
29
+ "inverseBindMatrices" : 4,
30
+ "joints" : [ 1, 2 ]
31
+ } ],
32
+
33
+ "animations" : [ {
34
+ "channels" : [ {
35
+ "sampler" : 0,
36
+ "target" : {
37
+ "node" : 2,
38
+ "path" : "rotation"
39
+ }
40
+ } ],
41
+ "samplers" : [ {
42
+ "input" : 5,
43
+ "interpolation" : "LINEAR",
44
+ "output" : 6
45
+ } ]
46
+ } ],
47
+
48
+ "buffers" : [ {
49
+ "uri" : "skinGeometry.bin",
50
+ "byteLength" : 168
51
+ }, {
52
+ "uri" : "skinningData.bin",
53
+ "byteLength" : 320
54
+ }, {
55
+ "uri" : "inverseBindMatrices.bin",
56
+ "byteLength" : 128
57
+ }, {
58
+ "uri" : "skinAnimation.bin",
59
+ "byteLength" : 240
60
+ } ],
61
+
62
+ "bufferViews" : [ {
63
+ "buffer" : 0,
64
+ "byteLength" : 48,
65
+ "target" : 34963
66
+ }, {
67
+ "buffer" : 0,
68
+ "byteOffset" : 48,
69
+ "byteLength" : 120,
70
+ "target" : 34962
71
+ }, {
72
+ "buffer" : 1,
73
+ "byteLength" : 320,
74
+ "byteStride" : 16
75
+ }, {
76
+ "buffer" : 2,
77
+ "byteLength" : 128
78
+ }, {
79
+ "buffer" : 3,
80
+ "byteLength" : 240
81
+ } ],
82
+
83
+ "accessors" : [ {
84
+ "bufferView" : 0,
85
+ "componentType" : 5123,
86
+ "count" : 24,
87
+ "type" : "SCALAR"
88
+ }, {
89
+ "bufferView" : 1,
90
+ "componentType" : 5126,
91
+ "count" : 10,
92
+ "type" : "VEC3",
93
+ "max" : [ 0.5, 2.0, 0.0 ],
94
+ "min" : [ -0.5, 0.0, 0.0 ]
95
+ }, {
96
+ "bufferView" : 2,
97
+ "componentType" : 5123,
98
+ "count" : 10,
99
+ "type" : "VEC4"
100
+ }, {
101
+ "bufferView" : 2,
102
+ "byteOffset" : 160,
103
+ "componentType" : 5126,
104
+ "count" : 10,
105
+ "type" : "VEC4"
106
+ }, {
107
+ "bufferView" : 3,
108
+ "componentType" : 5126,
109
+ "count" : 2,
110
+ "type" : "MAT4"
111
+ }, {
112
+ "bufferView" : 4,
113
+ "componentType" : 5126,
114
+ "count" : 12,
115
+ "type" : "SCALAR",
116
+ "max" : [ 5.5 ],
117
+ "min" : [ 0.0 ]
118
+ }, {
119
+ "bufferView" : 4,
120
+ "byteOffset" : 48,
121
+ "componentType" : 5126,
122
+ "count" : 12,
123
+ "type" : "VEC4",
124
+ "max" : [ 0.0, 0.0, 0.707, 1.0 ],
125
+ "min" : [ 0.0, 0.0, -0.707, 0.707 ]
126
+ } ],
127
+
128
+ "asset" : {
129
+ "version" : "2.0"
130
+ }
131
+ }
glTF/inverseBindMatrices.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5844ab221cd2ad367420a248f6387b46e5f8498604427730a37ee96b4d4ec599
3
+ size 128
glTF/skinAnimation.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff21b1bc3d0abbe53f7665060ec6c22d873b6e85a7669171a2b6b8ae01c39347
3
+ size 240
glTF/skinGeometry.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35f0ca6bc07976c0aadc163d4737758989cfcc9870a99800004c4478fe698b63
3
+ size 168
glTF/skinningData.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:413bc8a8c0da673df767874e6f05f0b00c9261756a08586b9d555bd5535414b5
3
+ size 320
screenshot/inverseBindMatrices.png ADDED

Git LFS Details

  • SHA256: 7036f4106be203e6217a25c94d05806287541e09f3768c5364e3cc0a12a11bab
  • Pointer size: 130 Bytes
  • Size of remote file: 43.9 kB
screenshot/screenshot.gif ADDED

Git LFS Details

  • SHA256: e80e197342eed2cdbd14dc565a9fed04168964cd9f560f3d4705a8c19c2dd76f
  • Pointer size: 132 Bytes
  • Size of remote file: 2 MB
screenshot/skinAnimation.png ADDED

Git LFS Details

  • SHA256: 4e6f6c9954adc399b53acd7f19150c4b677a317f61bb7c88b52185d3b1566857
  • Pointer size: 131 Bytes
  • Size of remote file: 101 kB
screenshot/skinGeometry.png ADDED

Git LFS Details

  • SHA256: 47ecc2114b65f625f3fa66ed828923a8d790c8fa4f9fb8a5b8637b411088332a
  • Pointer size: 130 Bytes
  • Size of remote file: 74.6 kB
screenshot/skinningData.png ADDED

Git LFS Details

  • SHA256: 19be136a80d294d28ee0bd26aef6ca53346dffeabb75b7e200382b12f580d2c7
  • Pointer size: 130 Bytes
  • Size of remote file: 86.3 kB