M7.4: model import
New crate effectcraft-model (L2): glTF 2.0 (.gltf/.glb, data URIs, external buffers and images, PBR metallic-roughness with base/MR/normal/occlusion/emissive textures, node hierarchy, skins, step/linear/cubic animations) and OBJ/MTL import, parametric primitives, extruded/bevelled outline meshes and polygon triangulation with holes. Project: FootageKind::Model, LayerSource::Model/Primitive, Layer::environment, Geometry and Material Options builders, Environment light Source. Media probes and loads models (FootageSource::model). Engine: layer.newModel, layer.new3dPrimitive/newPrimitive, comp.renderer, layer.environment, material.set/reset/duplicateAssign/revealSource (stubs replaced); File > Import and layer.addItem pick up models. Hand-written fixtures with attribution sidecars. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4bcf1f447c
commit
83c7e14b94
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
# EffectCraft test fixture: materials for cube.obj (original work).
|
||||
newmtl Red
|
||||
Kd 1.0 0.0 0.0
|
||||
Ns 98
|
||||
d 1.0
|
||||
|
||||
newmtl Gold
|
||||
Kd 1.0 0.766 0.336
|
||||
Ke 0.0 0.0 0.0
|
||||
Pr 0.3
|
||||
Pm 1.0
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: cube.mtl
|
||||
title: MTL fixture: the two materials of cube.obj (Phong exponent and PBR extension keys)
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M7.4)
|
||||
notes: Hand-written / script-generated test data for the model importer, made from the public Khronos glTF 2.0 specification and the Wavefront OBJ/MTL format description; not taken from any third-party file. The 2x2 texture is four solid colours.
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
# EffectCraft test fixture: a unit cube with texture coordinates and normals (original work).
|
||||
mtllib cube.mtl
|
||||
o Cube
|
||||
v -0.5 -0.5 0.5
|
||||
v 0.5 -0.5 0.5
|
||||
v 0.5 0.5 0.5
|
||||
v -0.5 0.5 0.5
|
||||
v -0.5 -0.5 -0.5
|
||||
v 0.5 -0.5 -0.5
|
||||
v 0.5 0.5 -0.5
|
||||
v -0.5 0.5 -0.5
|
||||
vt 0 0
|
||||
vt 1 0
|
||||
vt 1 1
|
||||
vt 0 1
|
||||
vn 0 0 1
|
||||
vn 0 0 -1
|
||||
vn 1 0 0
|
||||
vn -1 0 0
|
||||
vn 0 1 0
|
||||
vn 0 -1 0
|
||||
usemtl Red
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 6/1/2 5/2/2 8/3/2 7/4/2
|
||||
f 2/1/3 6/2/3 7/3/3 3/4/3
|
||||
usemtl Gold
|
||||
f 5/1/4 1/2/4 4/3/4 8/4/4
|
||||
f 4/1/5 3/2/5 7/3/5 8/4/5
|
||||
f -4/1/6 -3/2/6 -7/3/6 -8/4/6
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: cube.obj
|
||||
title: Wavefront OBJ fixture: a unit cube with texture coordinates, normals and two materials
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M7.4)
|
||||
notes: Hand-written / script-generated test data for the model importer, made from the public Khronos glTF 2.0 specification and the Wavefront OBJ/MTL format description; not taken from any third-party file. The 2x2 texture is four solid colours.
|
||||
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
asset: quad.glb
|
||||
title: Binary glTF (GLB) fixture: the same textured, animated quad with its PNG texture in the BIN chunk
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M7.4)
|
||||
notes: Hand-written / script-generated test data for the model importer, made from the public Khronos glTF 2.0 specification and the Wavefront OBJ/MTL format description; not taken from any third-party file. The 2x2 texture is four solid colours.
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"asset": {
|
||||
"version": "2.0",
|
||||
"generator": "EffectCraft fixture script (original work)"
|
||||
},
|
||||
"scene": 0,
|
||||
"scenes": [
|
||||
{
|
||||
"nodes": [
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Root",
|
||||
"translation": [
|
||||
0.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"children": [
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Quad",
|
||||
"mesh": 0,
|
||||
"scale": [
|
||||
2.0,
|
||||
2.0,
|
||||
2.0
|
||||
]
|
||||
}
|
||||
],
|
||||
"meshes": [
|
||||
{
|
||||
"name": "Quad",
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"POSITION": 0,
|
||||
"NORMAL": 1,
|
||||
"TEXCOORD_0": 2
|
||||
},
|
||||
"indices": 3,
|
||||
"material": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"materials": [
|
||||
{
|
||||
"name": "Painted",
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorFactor": [
|
||||
1.0,
|
||||
0.5,
|
||||
0.25,
|
||||
1.0
|
||||
],
|
||||
"metallicFactor": 0.25,
|
||||
"roughnessFactor": 0.75,
|
||||
"baseColorTexture": {
|
||||
"index": 0
|
||||
}
|
||||
},
|
||||
"emissiveFactor": [
|
||||
0.1,
|
||||
0.2,
|
||||
0.3
|
||||
],
|
||||
"doubleSided": true
|
||||
}
|
||||
],
|
||||
"textures": [
|
||||
{
|
||||
"source": 0,
|
||||
"sampler": 0
|
||||
}
|
||||
],
|
||||
"samplers": [
|
||||
{
|
||||
"wrapS": 33071,
|
||||
"wrapT": 10497
|
||||
}
|
||||
],
|
||||
"images": [
|
||||
{
|
||||
"uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVR4nGP4z8DwHwyBNBgAAEnICff5q7YNAAAAAElFTkSuQmCC"
|
||||
}
|
||||
],
|
||||
"animations": [
|
||||
{
|
||||
"name": "Move",
|
||||
"samplers": [
|
||||
{
|
||||
"input": 4,
|
||||
"output": 5,
|
||||
"interpolation": "LINEAR"
|
||||
}
|
||||
],
|
||||
"channels": [
|
||||
{
|
||||
"sampler": 0,
|
||||
"target": {
|
||||
"node": 0,
|
||||
"path": "translation"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"accessors": [
|
||||
{
|
||||
"bufferView": 0,
|
||||
"componentType": 5126,
|
||||
"count": 4,
|
||||
"type": "VEC3",
|
||||
"min": [
|
||||
-0.5,
|
||||
-0.5,
|
||||
0.0
|
||||
],
|
||||
"max": [
|
||||
0.5,
|
||||
0.5,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
{
|
||||
"bufferView": 1,
|
||||
"componentType": 5126,
|
||||
"count": 4,
|
||||
"type": "VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView": 2,
|
||||
"componentType": 5126,
|
||||
"count": 4,
|
||||
"type": "VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView": 3,
|
||||
"componentType": 5123,
|
||||
"count": 6,
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"bufferView": 4,
|
||||
"componentType": 5126,
|
||||
"count": 2,
|
||||
"type": "SCALAR",
|
||||
"min": [
|
||||
0.0
|
||||
],
|
||||
"max": [
|
||||
1.0
|
||||
]
|
||||
},
|
||||
{
|
||||
"bufferView": 5,
|
||||
"componentType": 5126,
|
||||
"count": 2,
|
||||
"type": "VEC3"
|
||||
}
|
||||
],
|
||||
"bufferViews": [
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 0,
|
||||
"byteLength": 48,
|
||||
"target": 34962
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 48,
|
||||
"byteLength": 48,
|
||||
"target": 34962
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 96,
|
||||
"byteLength": 32,
|
||||
"target": 34962
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 128,
|
||||
"byteLength": 12,
|
||||
"target": 34963
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 140,
|
||||
"byteLength": 8
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteOffset": 148,
|
||||
"byteLength": 24
|
||||
}
|
||||
],
|
||||
"buffers": [
|
||||
{
|
||||
"byteLength": 172,
|
||||
"uri": "data:application/octet-stream;base64,AAAAvwAAAL8AAAAAAAAAPwAAAL8AAAAAAAAAPwAAAD8AAAAAAAAAvwAAAD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAgD8AAIA/AACAPwAAgD8AAAAAAAAAAAAAAAAAAAEAAgAAAAIAAwAAAAAAAACAPwAAAAAAAIA/AAAAAAAAAEAAAIA/AAAAAA=="
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
asset: quad.gltf
|
||||
title: glTF 2.0 fixture: a textured quad under a parent node with a translation animation (all data embedded as data URIs)
|
||||
author: EffectCraft contributors
|
||||
source: original work
|
||||
license: MIT OR Apache-2.0
|
||||
added: 2026-10-02 by EffectCraft agent (M7.4)
|
||||
notes: Hand-written / script-generated test data for the model importer, made from the public Khronos glTF 2.0 specification and the Wavefront OBJ/MTL format description; not taken from any third-party file. The 2x2 texture is four solid colours.
|
||||
Reference in New Issue
Block a user