diff --git a/Models/AnimatedColorsCube/README.body.md b/Models/AnimatedColorsCube/README.body.md new file mode 100644 index 0000000..59d3b24 --- /dev/null +++ b/Models/AnimatedColorsCube/README.body.md @@ -0,0 +1,11 @@ +## Screenshot + +![screenshot](screenshot/screenshot-large.gif) + +## Description + +This model tests the [`KHR_animation_pointer`](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_animation_pointer) extension's effect on the `baseColorFactor` of a material. When animated, the top cube should rotate above other colored cubes, and change its own color to match the cubes below. + +If the top cube moves but stays red the entire time, it may indicate that `KHR_animation_pointer` is not supported in your renderer. + +This model was created in Blender 4.2.0 by placing keyframes for a material's default base color and using the "Push Down Action" button in the NLA Track Editor. The glTF export settings were configured with "Animation Mode" set to "NLA Tracks" and with a checkmark placed on "Animation Pointer (experimental)". diff --git a/Models/AnimatedColorsCube/glTF-Binary/AnimatedColorsCube.glb b/Models/AnimatedColorsCube/glTF-Binary/AnimatedColorsCube.glb new file mode 100644 index 0000000..96c0f24 Binary files /dev/null and b/Models/AnimatedColorsCube/glTF-Binary/AnimatedColorsCube.glb differ diff --git a/Models/AnimatedColorsCube/glTF/AnimatedColorsCube.bin b/Models/AnimatedColorsCube/glTF/AnimatedColorsCube.bin new file mode 100644 index 0000000..c36efec Binary files /dev/null and b/Models/AnimatedColorsCube/glTF/AnimatedColorsCube.bin differ diff --git a/Models/AnimatedColorsCube/glTF/AnimatedColorsCube.gltf b/Models/AnimatedColorsCube/glTF/AnimatedColorsCube.gltf new file mode 100644 index 0000000..a22781b --- /dev/null +++ b/Models/AnimatedColorsCube/glTF/AnimatedColorsCube.gltf @@ -0,0 +1,441 @@ +{ + "asset":{ + "copyright":"CC0: This work has been marked as dedicated to the public domain. Model by Ed Mackey.", + "generator":"Khronos glTF Blender I/O v4.2.57", + "version":"2.0" + }, + "extensionsUsed":[ + "KHR_animation_pointer" + ], + "scene":0, + "scenes":[ + { + "name":"Scene", + "nodes":[ + 0, + 1, + 2, + 3 + ] + } + ], + "nodes":[ + { + "mesh":0, + "name":"TestCube", + "translation":[ + -3, + 3, + 0 + ] + }, + { + "mesh":1, + "name":"1-RedCube", + "translation":[ + -3, + 0, + 0 + ] + }, + { + "mesh":2, + "name":"2-GreenCube" + }, + { + "mesh":3, + "name":"3-BlueCube", + "translation":[ + 3, + 0, + 0 + ] + } + ], + "animations":[ + { + "channels":[ + { + "sampler":0, + "target":{ + "node":0, + "path":"translation" + } + }, + { + "sampler":1, + "target":{ + "node":0, + "path":"rotation" + } + }, + { + "sampler":2, + "target":{ + "extensions":{ + "KHR_animation_pointer":{ + "pointer":"/materials/0/pbrMetallicRoughness/baseColorFactor" + } + }, + "path":"pointer" + } + } + ], + "name":"Cube Animation", + "samplers":[ + { + "input":9, + "interpolation":"LINEAR", + "output":10 + }, + { + "input":9, + "interpolation":"LINEAR", + "output":11 + }, + { + "input":12, + "interpolation":"LINEAR", + "output":13 + } + ] + } + ], + "materials":[ + { + "doubleSided":true, + "name":"AnimatedColorMaterial", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.800000011920929, + 0.019999999552965164, + 0.019999999552965164, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Red", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.800000011920929, + 0.019999999552965164, + 0.019999999552965164, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Green", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.019999999552965164, + 0.800000011920929, + 0.019999999552965164, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + }, + { + "doubleSided":true, + "name":"Blue", + "pbrMetallicRoughness":{ + "baseColorFactor":[ + 0.019999999552965164, + 0.019999999552965164, + 0.800000011920929, + 1 + ], + "metallicFactor":0, + "roughnessFactor":0.5 + } + } + ], + "meshes":[ + { + "name":"Cube", + "primitives":[ + { + "attributes":{ + "POSITION":0, + "NORMAL":1 + }, + "indices":2, + "material":0 + } + ] + }, + { + "name":"Cube.001", + "primitives":[ + { + "attributes":{ + "POSITION":3, + "NORMAL":4 + }, + "indices":2, + "material":1 + } + ] + }, + { + "name":"Cube.002", + "primitives":[ + { + "attributes":{ + "POSITION":5, + "NORMAL":6 + }, + "indices":2, + "material":2 + } + ] + }, + { + "name":"Cube.003", + "primitives":[ + { + "attributes":{ + "POSITION":7, + "NORMAL":8 + }, + "indices":2, + "material":3 + } + ] + } + ], + "accessors":[ + { + "bufferView":0, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":1, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":2, + "componentType":5123, + "count":36, + "type":"SCALAR" + }, + { + "bufferView":3, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":4, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":5, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":6, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":7, + "componentType":5126, + "count":24, + "max":[ + 1, + 1, + 1 + ], + "min":[ + -1, + -1, + -1 + ], + "type":"VEC3" + }, + { + "bufferView":8, + "componentType":5126, + "count":24, + "type":"VEC3" + }, + { + "bufferView":9, + "componentType":5126, + "count":181, + "max":[ + 3 + ], + "min":[ + 0 + ], + "type":"SCALAR" + }, + { + "bufferView":10, + "componentType":5126, + "count":181, + "type":"VEC3" + }, + { + "bufferView":11, + "componentType":5126, + "count":181, + "type":"VEC4" + }, + { + "bufferView":12, + "componentType":5126, + "count":151, + "max":[ + 2.5 + ], + "min":[ + 0 + ], + "type":"SCALAR" + }, + { + "bufferView":13, + "componentType":5126, + "count":151, + "type":"VEC4" + } + ], + "bufferViews":[ + { + "buffer":0, + "byteLength":288, + "byteOffset":0, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":288, + "target":34962 + }, + { + "buffer":0, + "byteLength":72, + "byteOffset":576, + "target":34963 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":648, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":936, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":1224, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":1512, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":1800, + "target":34962 + }, + { + "buffer":0, + "byteLength":288, + "byteOffset":2088, + "target":34962 + }, + { + "buffer":0, + "byteLength":724, + "byteOffset":2376 + }, + { + "buffer":0, + "byteLength":2172, + "byteOffset":3100 + }, + { + "buffer":0, + "byteLength":2896, + "byteOffset":5272 + }, + { + "buffer":0, + "byteLength":604, + "byteOffset":8168 + }, + { + "buffer":0, + "byteLength":2416, + "byteOffset":8772 + } + ], + "buffers":[ + { + "byteLength":11188, + "uri":"AnimatedColorsCube.bin" + } + ] +} diff --git a/Models/AnimatedColorsCube/metadata.json b/Models/AnimatedColorsCube/metadata.json new file mode 100644 index 0000000..13f8dc0 --- /dev/null +++ b/Models/AnimatedColorsCube/metadata.json @@ -0,0 +1,25 @@ +{ + "version": 2, + "legal": [ + { + "license": "CC0", + "licenseUrl": "https://creativecommons.org/publicdomain/zero/1.0/legalcode", + "artist": "Ed Mackey", + "year": "2024", + "owner": "Public", + "what": "Everything", + "text": "CC0 1.0 Universal", + "spdx": "CC0-1.0", + "icon": "https://licensebuttons.net/p/zero/1.0/88x31.png" + } + ], + "tags": [ + "extension", + "testing" + ], + "screenshot": "screenshot/screenshot.gif", + "name": "Animated Colors Cube", + "path": "./Models/AnimatedColorsCube", + "summary": "This model demonstrates animating a base color with KHR_animation_pointer.", + "createReadme": true +} \ No newline at end of file diff --git a/Models/AnimatedColorsCube/screenshot/screenshot-large.gif b/Models/AnimatedColorsCube/screenshot/screenshot-large.gif new file mode 100644 index 0000000..81667d0 Binary files /dev/null and b/Models/AnimatedColorsCube/screenshot/screenshot-large.gif differ diff --git a/Models/AnimatedColorsCube/screenshot/screenshot.gif b/Models/AnimatedColorsCube/screenshot/screenshot.gif new file mode 100644 index 0000000..116e74f Binary files /dev/null and b/Models/AnimatedColorsCube/screenshot/screenshot.gif differ