|
1 | 1 | #usda 1.0
|
2 |
| -# Source: https://graphics.pixar.com/usd/docs/api/_usd_skel__schema_overview.html |
| 2 | +#Source: https://graphics.pixar.com/usd/docs/api/_usd_skel__schema_overview.html |
3 | 3 | (
|
4 |
| - startTimeCode = 1 |
5 |
| - endTimeCode = 10 |
| 4 | + endTimeCode = 10 |
| 5 | + startTimeCode = 1 |
| 6 | + upAxis = "Y" |
6 | 7 | )
|
| 8 | + |
7 | 9 | def SkelRoot "Model" (
|
8 |
| - prepend apiSchemas = ["SkelBindingAPI"] |
| 10 | + prepend apiSchemas = ["SkelBindingAPI"] |
9 | 11 | )
|
10 | 12 | {
|
11 |
| - def Skeleton "Skel" { |
12 |
| - uniform token[] joints = ["Shoulder", "Shoulder/Elbow", "Shoulder/Elbow/Hand"] |
13 |
| - uniform matrix4d[] bindTransforms = [ |
14 |
| - ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)), |
15 |
| - ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,2,1)), |
16 |
| - ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,4,1)) |
17 |
| - ] |
18 |
| - uniform matrix4d[] restTransforms = [ |
19 |
| - ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)), |
20 |
| - ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,2,1)), |
21 |
| - ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,2,1)) |
22 |
| - ] |
23 |
| - def SkelAnimation "Anim" { |
24 |
| - uniform token[] joints = ["Shoulder/Elbow"] |
| 13 | + def Skeleton "Skel" ( |
| 14 | + prepend apiSchemas = ["SkelBindingAPI"] |
| 15 | + ) |
| 16 | + { |
| 17 | + uniform matrix4d[] bindTransforms = [( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 4, 1) )] |
| 18 | + uniform token[] joints = ["Shoulder", "Shoulder/Elbow", "Shoulder/Elbow/Hand"] |
| 19 | + uniform matrix4d[] restTransforms = [( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) )] |
| 20 | + rel skel:animationSource = </Model/Skel/Anim> |
25 | 21 |
|
26 |
| - float3[] translations = [(0,0,2)] |
27 |
| - quatf[] rotations.timeSamples = { |
28 |
| - 1: [(1,0,0,0)], |
29 |
| - 10: [(0.7071, 0.7071, 0, 0)] |
30 |
| - } |
31 |
| - half3[] scales = [(1,1,1)] |
32 |
| - } |
| 22 | + def SkelAnimation "Anim" |
| 23 | + { |
| 24 | + uniform token[] joints = ["Shoulder/Elbow"] |
| 25 | + quatf[] rotations.timeSamples = { |
| 26 | + 1: [(1, 0, 0, 0)], |
| 27 | + 10: [(0.7071, 0.7071, 0, 0)], |
| 28 | + } |
| 29 | + half3[] scales = [(1, 1, 1)] |
| 30 | + float3[] translations = [(0, 0, 2)] |
| 31 | + } |
| 32 | + } |
33 | 33 |
|
34 |
| - rel skel:animationSource = <Anim> |
35 |
| - } |
36 |
| - def Mesh "Arm" ( |
37 |
| - prepend apiSchemas = ["SkelBindingAPI"] |
38 |
| - ) |
39 |
| - { |
40 |
| - int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4] |
41 |
| - int[] faceVertexIndices = [ |
42 |
| - 2, 3, 1, 0, |
43 |
| - 6, 7, 5, 4, |
44 |
| - 8, 9, 7, 6, |
45 |
| - 3, 2, 9, 8, |
46 |
| - 10, 11, 4, 5, |
47 |
| - 0, 1, 11, 10, |
48 |
| - 7, 9, 10, 5, |
49 |
| - 9, 2, 0, 10, |
50 |
| - 3, 8, 11, 1, |
51 |
| - 8, 6, 4, 11 |
52 |
| - ] |
53 |
| - point3f[] points = [ |
54 |
| - (0.5, -0.5, 4), (-0.5, -0.5, 4), (0.5, 0.5, 4), (-0.5, 0.5, 4), |
55 |
| - (-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0), |
56 |
| - (-0.5, 0.5, 2), (0.5, 0.5, 2), (0.5, -0.5, 2), (-0.5, -0.5, 2) |
57 |
| - ] |
58 |
| - rel skel:skeleton = </Model/Skel> |
59 |
| - int[] primvars:skel:jointIndices = [ |
60 |
| - 2,2,2,2, 0,0,0,0, 1,1,1,1 |
61 |
| - ] ( |
62 |
| - interpolation = "vertex" |
63 |
| - elementSize = 1 |
64 |
| - ) |
65 |
| - float[] primvars:skel:jointWeights = [ |
66 |
| - 1,1,1,1, 1,1,1,1, 1,1,1,1 |
67 |
| - ] ( |
68 |
| - interpolation = "vertex" |
69 |
| - elementSize = 1 |
70 |
| - ) |
71 |
| - matrix4d primvars:skel:geomBindTransform = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)) |
72 |
| - } |
| 34 | + def Mesh "Arm" ( |
| 35 | + prepend apiSchemas = ["SkelBindingAPI"] |
| 36 | + ) |
| 37 | + { |
| 38 | + int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4] |
| 39 | + int[] faceVertexIndices = [2, 3, 1, 0, 6, 7, 5, 4, 8, 9, 7, 6, 3, 2, 9, 8, 10, 11, 4, 5, 0, 1, 11, 10, 7, 9, 10, 5, 9, 2, 0, 10, 3, 8, 11, 1, 8, 6, 4, 11] |
| 40 | + point3f[] points = [(0.5, -0.5, 4), (-0.5, -0.5, 4), (0.5, 0.5, 4), (-0.5, 0.5, 4), (-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0), (-0.5, 0.5, 2), (0.5, 0.5, 2), (0.5, -0.5, 2), (-0.5, -0.5, 2)] |
| 41 | + matrix4d primvars:skel:geomBindTransform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) |
| 42 | + int[] primvars:skel:jointIndices = [2, 2, 2, 2, 0, 0, 0, 0, 1, 1, 1, 1] ( |
| 43 | + elementSize = 1 |
| 44 | + interpolation = "vertex" |
| 45 | + ) |
| 46 | + float[] primvars:skel:jointWeights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ( |
| 47 | + elementSize = 1 |
| 48 | + interpolation = "vertex" |
| 49 | + ) |
| 50 | + rel skel:skeleton = </Model/Skel> |
| 51 | + } |
73 | 52 | }
|
| 53 | + |
0 commit comments