mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Added comprehensive test models and scripts for skeletal animation features: Skeletal Animation Test Models (models/): - skelanim-empty.usda: Edge case with no animation data - skelanim-mixed.usda: Mixed static and time-sampled (incomplete skeleton binding) - skelanim-rotation-only.usda: Only rotation channels animated - skelanim-single-joint.usda: Single joint animation - skelanim-static.usda: Static values only (incomplete skeleton binding) - skelanim-timesampled.usda: Time-sampled values (incomplete skeleton binding) Synthetic Skin Test Models (models/): - synthetic-skin-8influences.usda: 8 influences per vertex test - synthetic-skin-16influences.usda: 16 influences per vertex test - synthetic-skin-32influences.usda: 32 influences per vertex test Test Scripts (web/js/): - test-anim-debug.js: Animation debugging utility - test-16influences.js: Test 16 influences per vertex - test-all-bone-reduction.js: Bone reduction testing - test-boundaries.js: Boundary condition tests - test-digit-limits.js: Digit parsing limits - test-malicious.js: Malicious input handling - test-number-parsing.js: Number parsing validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
115 lines
5.2 KiB
Plaintext
115 lines
5.2 KiB
Plaintext
#usda 1.0
|
|
(
|
|
defaultPrim = "root"
|
|
upAxis = "Z"
|
|
metersPerUnit = 1
|
|
)
|
|
|
|
def SkelRoot "root"
|
|
{
|
|
def Skeleton "Skeleton"
|
|
{
|
|
uniform token[] joints = [
|
|
"Root", "Root/joint1", "Root/joint2", "Root/joint3", "Root/joint4", "Root/joint5", "Root/joint6", "Root/joint7",
|
|
"Root/joint8", "Root/joint9", "Root/joint10", "Root/joint11", "Root/joint12", "Root/joint13", "Root/joint14", "Root/joint15"
|
|
]
|
|
uniform matrix4d[] bindTransforms = [
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 1.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 1.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 3.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 3.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 4.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 4.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 5.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 5.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 6.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 6.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 7.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 7.5, 0, 1))
|
|
]
|
|
uniform matrix4d[] restTransforms = [
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 1.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 1.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 2.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 3.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 3.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 4.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 4.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 5.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 5.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 6.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 6.5, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 7.0, 0, 1)),
|
|
((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 7.5, 0, 1))
|
|
]
|
|
}
|
|
|
|
def Mesh "Mesh" (
|
|
prepend apiSchemas = ["SkelBindingAPI"]
|
|
)
|
|
{
|
|
uniform bool doubleSided = 0
|
|
int[] faceVertexCounts = [3, 3, 3, 3, 3, 3]
|
|
int[] faceVertexIndices = [0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6, 0, 6, 1]
|
|
rel skel:skeleton = </root/Skeleton>
|
|
|
|
point3f[] points = [
|
|
(0, 0, 0),
|
|
(1, 0, 0),
|
|
(1, 1, 0),
|
|
(0, 1, 0),
|
|
(-1, 1, 0),
|
|
(-1, 0, 0),
|
|
(-1, -1, 0)
|
|
]
|
|
|
|
int[] primvars:skel:jointIndices = [
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
|
|
] (
|
|
elementSize = 16
|
|
interpolation = "vertex"
|
|
)
|
|
|
|
float[] primvars:skel:jointWeights = [
|
|
0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625,
|
|
0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625,
|
|
0.25, 0.20, 0.15, 0.10, 0.08, 0.06, 0.05, 0.04, 0.03, 0.02, 0.01, 0.005, 0.003, 0.002, 0.001, 0.001,
|
|
0.20, 0.18, 0.16, 0.14, 0.10, 0.08, 0.06, 0.04, 0.02, 0.01, 0.005, 0.003, 0.002, 0.001, 0.001, 0.001,
|
|
0.01, 0.02, 0.04, 0.06, 0.08, 0.12, 0.16, 0.20, 0.16, 0.08, 0.04, 0.02, 0.005, 0.003, 0.001, 0.001,
|
|
0.001, 0.002, 0.003, 0.005, 0.01, 0.02, 0.04, 0.06, 0.08, 0.12, 0.16, 0.20, 0.14, 0.10, 0.05, 0.02,
|
|
0.001, 0.001, 0.002, 0.003, 0.005, 0.01, 0.02, 0.03, 0.04, 0.05, 0.08, 0.10, 0.15, 0.20, 0.18, 0.15,
|
|
0.40, 0.25, 0.15, 0.10, 0.05, 0.03, 0.02, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
|
] (
|
|
elementSize = 16
|
|
interpolation = "vertex"
|
|
)
|
|
|
|
matrix4d primvars:skel:geomBindTransform = ((1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1))
|
|
|
|
normal3f[] normals = [
|
|
(0, 0, 1),
|
|
(0, 0, 1),
|
|
(0, 0, 1),
|
|
(0, 0, 1),
|
|
(0, 0, 1),
|
|
(0, 0, 1),
|
|
(0, 0, 1)
|
|
] (
|
|
interpolation = "vertex"
|
|
)
|
|
}
|
|
}
|