Initial Spatial Lab release with verified Blender bridge

This commit is contained in:
emil28092005
2026-09-17 16:59:32 +03:00
commit 60d0018fa9
30 changed files with 58238 additions and 0 deletions
+284
View File
@@ -0,0 +1,284 @@
{
"schema": "spatial-lab.project/1",
"id": "braided-atrium",
"name": "Braided atrium",
"parameters": {
"radius": 11,
"lobe": 3.2,
"rise": 4.8,
"width": 1.25,
"thickness": 0.24,
"twist": 360,
"samples": 240,
"levels": 3
},
"nodes": [
{
"id": "braid-path",
"op": "curve",
"params": {
"xyz": [
"(radius+lobe*cos(3*t))*cos(2*t)",
"(radius+lobe*cos(3*t))*sin(2*t)",
"rise*sin(3*t)"
],
"domain": [
0,
"tau"
],
"segments": "samples",
"closed": true
},
"visible": false,
"role": "route"
},
{
"id": "braid-frames",
"op": "frames",
"inputs": {
"path": "braid-path"
},
"params": {
"twist_degrees": "twist"
},
"visible": false
},
{
"id": "braid-section",
"op": "sweep",
"inputs": {
"frames": "braid-frames"
},
"params": {
"profile": [
[
"-width/2",
"-thickness/2"
],
[
"width/2",
"-thickness/2"
],
[
"width/2",
"thickness/2"
],
[
"-width/2",
"thickness/2"
]
]
},
"visible": false
},
{
"id": "braided-galleries",
"name": "Braided galleries",
"op": "repeat",
"inputs": {
"source": "braid-section"
},
"params": {
"count": "levels",
"translate": [
0,
0,
6.5
],
"rotate": [
0,
0,
37
],
"scale": 0.87
},
"color": [
0.37,
0.56,
0.68
],
"role": "gallery"
},
{
"id": "ring-path",
"op": "curve",
"params": {
"xyz": [
"(radius+lobe+2.6)*cos(t)",
"(radius+lobe+2.6)*sin(t)",
"-6+0.65*sin(4*t)"
],
"segments": 144,
"closed": true
},
"visible": false
},
{
"id": "ring-frames",
"op": "frames",
"inputs": {
"path": "ring-path"
},
"visible": false
},
{
"id": "ring-section",
"op": "sweep",
"inputs": {
"frames": "ring-frames"
},
"params": {
"profile": [
[
-0.13,
-0.11
],
[
0.13,
-0.11
],
[
0.13,
0.11
],
[
-0.13,
0.11
]
]
},
"visible": false
},
{
"id": "outer-rings",
"name": "Contour rings",
"op": "repeat",
"inputs": {
"source": "ring-section"
},
"params": {
"count": 9,
"translate": [
0,
0,
2.8
],
"rotate": [
0,
0,
11
]
},
"color": [
0.63,
0.68,
0.73
],
"role": "structure"
},
{
"id": "spine-path",
"op": "curve",
"params": {
"xyz": [
"(radius+lobe+2.6)*cos(t)",
"(radius+lobe+2.6)*sin(t)",
"-6+18*t/pi"
],
"domain": [
0,
"1.35*pi"
],
"segments": 112
},
"visible": false
},
{
"id": "spine-frames",
"op": "frames",
"inputs": {
"path": "spine-path"
},
"visible": false
},
{
"id": "spine-section",
"op": "sweep",
"inputs": {
"frames": "spine-frames"
},
"params": {
"profile": [
[
-0.18,
-0.18
],
[
0.18,
-0.18
],
[
0.18,
0.18
],
[
-0.18,
0.18
]
]
},
"visible": false
},
{
"id": "spiral-spines",
"name": "Spiral spines",
"op": "repeat",
"inputs": {
"source": "spine-section"
},
"params": {
"count": 4,
"rotate": [
0,
0,
90
]
},
"color": [
0.69,
0.47,
0.29
],
"role": "structure"
},
{
"id": "saddle-shell",
"name": "Lower saddle",
"op": "surface",
"params": {
"xyz": [
"u",
"v",
"0.025*(u*u-v*v)-9"
],
"u_domain": [
-7,
7
],
"v_domain": [
-7,
7
],
"u_segments": 28,
"v_segments": 28,
"thickness": 0.22
},
"color": [
0.57,
0.66,
0.58
],
"role": "shell"
}
]
}
Binary file not shown.
@@ -0,0 +1,56 @@
{
"blender_version": "5.2.2 LTS",
"initial": {
"passed": true,
"project_id": "braided-atrium",
"bundle_hash": "c7fbfd0528618a64c9868a908dbc19de3a40cec5e6a6247ef52937b0ace462eb",
"objects_checked": 17,
"vertices_checked_including_instances": 11554,
"triangles_checked_including_instances": 23088,
"tolerance_m": 1e-05,
"max_local_vertex_error_m": 1.0060402715329934e-06,
"max_world_vertex_error_m": 3.1225857623483306e-06,
"max_matrix_component_error": 7.629394538355427e-07,
"errors": [],
"scope": "Base mesh coordinates, connectivity, orientation and transforms. Artist modifiers are deliberately excluded."
},
"edited": {
"passed": true,
"project_id": "braided-atrium",
"bundle_hash": "48d124fa042aa478054370e11d7a063edae36f2b5541a578429227ca1fd46b13",
"objects_checked": 16,
"vertices_checked_including_instances": 10594,
"triangles_checked_including_instances": 21168,
"tolerance_m": 1e-05,
"max_local_vertex_error_m": 1.0060402715329934e-06,
"max_world_vertex_error_m": 3.1225857623483306e-06,
"max_matrix_component_error": 7.629394538355427e-07,
"errors": [],
"scope": "Base mesh coordinates, connectivity, orientation and transforms. Artist modifiers are deliberately excluded."
},
"undo": {
"passed": true,
"project_id": "braided-atrium",
"bundle_hash": "c7fbfd0528618a64c9868a908dbc19de3a40cec5e6a6247ef52937b0ace462eb",
"objects_checked": 17,
"vertices_checked_including_instances": 11554,
"triangles_checked_including_instances": 23088,
"tolerance_m": 1e-05,
"max_local_vertex_error_m": 1.0060402715329934e-06,
"max_world_vertex_error_m": 3.1225857623483306e-06,
"max_matrix_component_error": 7.629394538355427e-07,
"errors": [],
"scope": "Base mesh coordinates, connectivity, orientation and transforms. Artist modifiers are deliberately excluded."
},
"changed_import": {
"created": 0,
"updated": 16,
"removed": [
"braided-galleries/0002/main"
],
"collection": "Spatial Lab / Braided atrium",
"bundle_hash": "48d124fa042aa478054370e11d7a063edae36f2b5541a578429227ca1fd46b13"
},
"preserved_object_identity_modifiers_materials_and_unrelated_objects": true,
"undo_restored_identical_bundle": true
}
File diff suppressed because it is too large Load Diff
+17
View File
@@ -0,0 +1,17 @@
"""Example of a composable curve deformation loaded with --plugin."""
import math
from spatial_lab.kernel import register_operator
@register_operator('wave-z', version=1, inputs=('path',),
description='Displace a curve along world Z by a sinusoid of world X.')
def wave_z(context, params, inputs):
path = inputs['path']
if path['kind'] != 'curve':
raise ValueError('wave-z requires a curve')
amplitude = context.number(params.get('amplitude', 1))
wavelength = context.number(params.get('wavelength', 6))
if wavelength <= 0:
raise ValueError('wavelength must be positive')
points = [[x, y, z + amplitude * math.sin(math.tau * x / wavelength)]
for x, y, z in path['points']]
return {'kind': 'curve', 'points': points, 'closed': path['closed']}