diff --git a/docs/research/builds/aetheria-bloom-habitat.md b/docs/research/builds/aetheria-bloom-habitat.md new file mode 100644 index 0000000..15de707 --- /dev/null +++ b/docs/research/builds/aetheria-bloom-habitat.md @@ -0,0 +1,94 @@ +# Aetheria Bloom Habitat Build Study + +## Source Lore Read + +Indexed AetheriaLore sources: + +- `Aetheria/Worldbuilding/Pre-Elysium/Technology/Bloom Habitat Anatomy.md` +- `Aetheria/Brainstorming/Technology/Bloom Habitat Engineering Research Notes.md` +- `Aetheria/Brainstorming/Technology/Bloom Habitat Systems Walkthroughs.md` +- `Aetheria/Brainstorming/Technology/Bloom Habitat Open Questions And Red Team.md` + +External visual/procedural reference: + +- Eric Bruneton, `Modeling and Rendering Rama`, via + `http://ebruneton.free.fr/rama3/rama.html` and the mirrored text at + `https://doczz.net/doc/3617854/making-of---rama` + +Rama lessons used here: + +- sell the cylinder as a whole world, not just a tube +- divide the inner surface into large readable axial/circumferential regions +- generate terrain, roads, rivers, cities, fields, forests, clouds, and lighting + from layered map logic +- adapt detail to the view instead of pretending a hand-modeled megastructure + is a sensible authoring target + +The build follows the current Bloom model: + +- rotating manufactured cylinder, not hollowed asteroid rock +- broad open pressurized commons +- high-radius civic surface with comfortable spin gravity +- despun or partially despun axial hub and light/traffic spire +- expensive spoke interfaces where transit, utilities, and authority concentrate +- outward stack of utility mat, pressure/structural shell, and aggregate shielding +- layered civic geography: central water band, plains, farms, forests, city + clusters, roads, rivers, cloud patches, and service routes +- one small Service Ring Kappa marker among many maintenance systems, not the + compositional focus + +## Built Artifact + +Script: +`examples/geometry_script/aetheria_bloom_habitat.py` + +Generated artifacts: + +- `experiments/generated/aetheria_bloom/aetheria_bloom_habitat.blend` +- `experiments/generated/aetheria_bloom/aetheria_bloom_habitat.png` +- `experiments/generated/aetheria_bloom/aetheria_bloom_interior_world.png` + +Verification: + +```powershell +& 'C:\Program Files (x86)\Steam\steamapps\common\Blender\blender.exe' --background '.\experiments\generated\aetheria_bloom\aetheria_bloom_habitat.blend' --python '.\tools\verify_aetheria_bloom_habitat.py' +``` + +Result: + +```text +AETHERIA_BLOOM_VERIFY ok +AETHERIA_BLOOM_VERIFY group VG Bloom Light Spine 21 31 +AETHERIA_BLOOM_VERIFY objects 98 +``` + +## Procedural Translation Notes + +This is intentionally hybrid: + +- Python structures the lore-derived coordinate system, layer tables, material + meanings, mapped civic regions, cameras, labels, and render paths. +- Geometry Script emits `VG Bloom Light Spine`, an inspectable 21-node + geometry-node group used by a Nodes modifier in the scene. +- bpy builds the cutaway shell surfaces, spokes, wrapped region patches, city + blocks, roads, rivers, clouds, utility lines, service markers, and cameras. + +The IRCSS pass paid off in three ways: + +- **Edge-first architecture:** the Bloom is built as shell layers, spoke lines, + region patches, utility routes, and service markers before local dressing. +- **Curves as attachment rails:** roads, rivers, and utility routes are curves + wrapped onto the inner cylinder or service layers. +- **Python as orchestration:** the cylinder layers, region maps, city blocks, + roads, rivers, forests, clouds, and spokes come from small tables and named + helpers rather than copied object placement. + +## Current Limits + +- The build is a spatial systems study, not final art. +- The civic surface is a symbolic map-layer world, not a lived city. +- The current whole-Bloom view is more diagrammatic than cinematic; it needs + atmospheric scale cues, denser horizon detail, and better light gradation. +- Only the light spine is emitted through Geometry Script so far. The next pass + should move one repeated whole-Bloom subsystem, probably wrapped roads/rivers + or region patches, into a reusable Geometry Script group. diff --git a/examples/geometry_script/aetheria_bloom_habitat.py b/examples/geometry_script/aetheria_bloom_habitat.py new file mode 100644 index 0000000..abb0f2e --- /dev/null +++ b/examples/geometry_script/aetheria_bloom_habitat.py @@ -0,0 +1,483 @@ +"""Build an Aetheria Bloom habitat study scene. + +This is a hybrid authoring test: + +- Python owns the lore-derived scene brief, tables, materials, labels, camera, + and Blender object orchestration. +- Geometry Script emits reusable inspectable node groups for procedural rails. +- bpy builds the cutaway habitat mesh and render evidence. +""" + +import math as pymath +from pathlib import Path + +try: + from tools.geometry_script_loader import load_repo_geometry_script +except ModuleNotFoundError: + import sys + + sys.path.insert(0, str(Path(__file__).resolve().parents[2])) + from tools.geometry_script_loader import load_repo_geometry_script + +load_repo_geometry_script() + +from geometry_script import * # noqa: F403 - Geometry Script exposes node functions as DSL globals. + + +TAU = pymath.tau +AXIS_LENGTH = 18.0 +CUT_START = pymath.radians(-132.0) +CUT_END = pymath.radians(132.0) +INNER_RADIUS = 5.0 + + +@tree("VG Bloom Light Spine") +def vg_bloom_light_spine( + length: Float = 18.0, + helix_radius: Float = 0.18, + turns: Float = 7.5, + thickness: Float = 0.035, +): + """A thin procedural light/distribution rail around the axial spire.""" + + rail = curve_line(mode=CurveLine.Mode.POINTS, start=(-9.0, 0.0, 0.0), end=(9.0, 0.0, 0.0)) + samples = resample_curve(keep_last_segment=True, curve=rail, mode="Count", count=420, length=0.1) + point_count = domain_size(component="CURVE", geometry=samples).point_count + t = math(operation=Math.Operation.DIVIDE, value=(index(), point_count)) + theta = math(operation=Math.Operation.MULTIPLY, value=(t, math(operation=Math.Operation.MULTIPLY, value=(turns, TAU)))) + x = math(operation=Math.Operation.SUBTRACT, value=(math(operation=Math.Operation.MULTIPLY, value=(t, length)), math(operation=Math.Operation.DIVIDE, value=(length, 2.0)))) + y = math(operation=Math.Operation.MULTIPLY, value=(math(operation=Math.Operation.SINE, value=theta), helix_radius)) + z = math(operation=Math.Operation.MULTIPLY, value=(math(operation=Math.Operation.COSINE, value=theta), helix_radius)) + positioned = set_position(geometry=samples, position=combine_xyz(x=x, y=y, z=z), offset=(0.0, 0.0, 0.0)) + profile = curve_circle(mode=CurveCircle.Mode.RADIUS, resolution=8, radius=thickness) + return {"Geometry": curve_to_mesh(curve=positioned, profile_curve=profile, fill_caps=True)} + + +def mat(name, color, emission=False, strength=0.0, alpha=1.0): + import bpy + + material = bpy.data.materials.new(name) + material.diffuse_color = (color[0], color[1], color[2], alpha) + material.use_nodes = True + bsdf = material.node_tree.nodes.get("Principled BSDF") + if bsdf: + if emission: + bsdf.inputs["Emission Color"].default_value = (color[0], color[1], color[2], 1.0) + bsdf.inputs["Emission Strength"].default_value = strength + bsdf.inputs["Base Color"].default_value = (color[0], color[1], color[2], alpha) + bsdf.inputs["Roughness"].default_value = 0.62 + bsdf.inputs["Alpha"].default_value = alpha + if alpha < 1.0: + material.blend_method = "BLEND" + material.use_screen_refraction = True + material.show_transparent_back = True + return material + + +def clear_scene(): + import bpy + + bpy.ops.object.select_all(action="SELECT") + bpy.ops.object.delete() + + +def radial(angle: float): + return (0.0, pymath.cos(angle), pymath.sin(angle)) + + +def tangent(angle: float): + return (0.0, -pymath.sin(angle), pymath.cos(angle)) + + +def add_shell_segment(name, radius, half_length, thickness, material, angle_steps=96, x_steps=8): + import bpy + + verts = [] + faces = [] + for ix in range(x_steps + 1): + x = -half_length + (2.0 * half_length * ix / x_steps) + for ia in range(angle_steps + 1): + a = CUT_START + (CUT_END - CUT_START) * ia / angle_steps + verts.append((x, radius * pymath.cos(a), radius * pymath.sin(a))) + for ix in range(x_steps): + for ia in range(angle_steps): + row = angle_steps + 1 + faces.append((ix * row + ia, (ix + 1) * row + ia, (ix + 1) * row + ia + 1, ix * row + ia + 1)) + mesh = bpy.data.meshes.new(name + "Mesh") + mesh.from_pydata(verts, [], faces) + mesh.update() + obj = bpy.data.objects.new(name, mesh) + bpy.context.collection.objects.link(obj) + obj.data.materials.append(material) + obj.show_transparent = True + solid = obj.modifiers.new("visible thickness", "SOLIDIFY") + solid.thickness = thickness + solid.offset = 0.0 + return obj + + +def surface_point(x, angle, radius=INNER_RADIUS, lift=-0.04): + r = radius + lift + return (x, r * pymath.cos(angle), r * pymath.sin(angle)) + + +def add_surface_patch(name, x0, x1, a0, a1, radius, material, lift=-0.045, angle_steps=8, x_steps=3): + import bpy + + verts = [] + faces = [] + for ix in range(x_steps + 1): + x = x0 + (x1 - x0) * ix / x_steps + for ia in range(angle_steps + 1): + a = a0 + (a1 - a0) * ia / angle_steps + verts.append(surface_point(x, a, radius, lift=lift)) + row = angle_steps + 1 + for ix in range(x_steps): + for ia in range(angle_steps): + faces.append((ix * row + ia, (ix + 1) * row + ia, (ix + 1) * row + ia + 1, ix * row + ia + 1)) + mesh = bpy.data.meshes.new(name + "Mesh") + mesh.from_pydata(verts, [], faces) + mesh.update() + obj = bpy.data.objects.new(name, mesh) + bpy.context.collection.objects.link(obj) + obj.data.materials.append(material) + return obj + + +def add_surface_curve(name, samples, radius, bevel, material, lift=-0.11): + points = [surface_point(x, angle, radius, lift=lift) for x, angle in samples] + return add_curve_polyline(name, points, bevel, material) + + +def add_surface_box(name, x, angle, material, size=(0.22, 0.12, 0.08), radial_lift=-0.18): + r = radial(angle) + t = tangent(angle) + loc = surface_point(x, angle, INNER_RADIUS, lift=radial_lift) + return add_box(name, loc, axes=((1, 0, 0), t, r), size=size, material=material) + + +def add_cylinder_between(name, start, end, radius, material, vertices=16): + import bpy + from mathutils import Vector + + start_v = Vector(start) + end_v = Vector(end) + mid = (start_v + end_v) / 2.0 + direction = end_v - start_v + length = direction.length + bpy.ops.mesh.primitive_cylinder_add(vertices=vertices, radius=radius, depth=length, location=mid) + obj = bpy.context.object + obj.name = name + obj.data.name = name + "Mesh" + obj.rotation_euler = direction.to_track_quat("Z", "Y").to_euler() + obj.data.materials.append(material) + return obj + + +def add_curve_polyline(name, points, bevel, material, resolution=2): + import bpy + + curve = bpy.data.curves.new(name + "Curve", "CURVE") + curve.dimensions = "3D" + curve.resolution_u = resolution + curve.bevel_depth = bevel + curve.bevel_resolution = 4 + spline = curve.splines.new("POLY") + spline.points.add(len(points) - 1) + for point, co in zip(spline.points, points): + point.co = (co[0], co[1], co[2], 1.0) + obj = bpy.data.objects.new(name, curve) + bpy.context.collection.objects.link(obj) + obj.data.materials.append(material) + return obj + + +def add_box(name, loc, axes, size, material): + import bpy + from mathutils import Matrix, Vector + + bpy.ops.mesh.primitive_cube_add(size=1.0, location=loc) + obj = bpy.context.object + obj.name = name + obj.dimensions = size + matrix = Matrix.Identity(4) + matrix.col[0].xyz = Vector(axes[0]).normalized() + matrix.col[1].xyz = Vector(axes[1]).normalized() + matrix.col[2].xyz = Vector(axes[2]).normalized() + obj.rotation_euler = matrix.to_euler() + obj.data.materials.append(material) + bpy.ops.object.transform_apply(location=False, rotation=False, scale=True) + return obj + + +def add_label(name, text, loc, size, material): + import bpy + + bpy.ops.object.text_add(location=loc, rotation=(pymath.radians(70), 0.0, pymath.radians(0))) + obj = bpy.context.object + obj.name = name + obj.data.body = text + obj.data.align_x = "CENTER" + obj.data.align_y = "CENTER" + obj.data.size = size + obj.data.materials.append(material) + return obj + + +def add_gn_light_spine(material): + import bpy + + group = bpy.data.node_groups.get("VG Bloom Light Spine") + mesh = bpy.data.meshes.new("BloomLightSpineCarrierMesh") + obj = bpy.data.objects.new("GN_Light_Spine_Modifier_Carrier", mesh) + bpy.context.collection.objects.link(obj) + mod = obj.modifiers.new("VG Bloom Light Spine", "NODES") + mod.node_group = group + obj.data.materials.append(material) + return obj + + +def aim_camera(obj, target): + from mathutils import Vector + + direction = Vector(target) - obj.location + obj.rotation_euler = direction.to_track_quat("-Z", "Y").to_euler() + + +def build_scene(): + import bpy + + clear_scene() + + mats = { + "inner": mat("civic inner surface - open commons", (0.28, 0.30, 0.32), alpha=0.78), + "utility": mat("utility mat amber", (0.95, 0.57, 0.18), alpha=0.42), + "pressure": mat("pressure laminate blue", (0.18, 0.45, 0.86), alpha=0.25), + "shield": mat("aggregate shielding graphite", (0.08, 0.075, 0.07), alpha=0.86), + "hub": mat("despun hub white", (0.82, 0.86, 0.88), alpha=0.88), + "light": mat("light spine gold", (1.0, 0.78, 0.25), emission=True, strength=1.6), + "farm": mat("TCS Root farms", (0.15, 0.55, 0.24), alpha=0.92), + "district": mat("surface districts", (0.55, 0.58, 0.62), alpha=0.95), + "water": mat("cylindrical sea", (0.05, 0.28, 0.55), alpha=0.82), + "forest": mat("forest canopy", (0.04, 0.32, 0.1), alpha=0.92), + "road": mat("road graph", (0.72, 0.66, 0.52), alpha=0.96), + "city": mat("city clusters", (0.62, 0.64, 0.67), alpha=0.98), + "cloud": mat("interior cloud layer", (0.8, 0.86, 0.9), alpha=0.24), + "air": mat("air return cyan", (0.1, 0.85, 1.0), emission=True, strength=0.25), + "coolant": mat("coolant blue", (0.08, 0.25, 1.0), emission=True, strength=0.2), + "condensate": mat("condensate green", (0.15, 0.95, 0.55), emission=True, strength=0.15), + "pressure_line": mat("pressure amber", (1.0, 0.65, 0.08), emission=True, strength=0.35), + "hazard": mat("emergency red", (1.0, 0.12, 0.07), emission=True, strength=0.45), + "label": mat("label white", (0.92, 0.95, 1.0), emission=True, strength=0.4), + "glass": mat("operations glass", (0.45, 0.8, 1.0), alpha=0.28), + } + + add_shell_segment("01_open_civic_inner_surface", 5.0, AXIS_LENGTH / 2, 0.05, mats["inner"]) + add_shell_segment("02_utility_mat_service_interlayer", 5.35, AXIS_LENGTH / 2, 0.08, mats["utility"]) + add_shell_segment("03_pressure_structural_shell", 5.75, AXIS_LENGTH / 2, 0.12, mats["pressure"]) + add_shell_segment("04_outer_aggregate_shielding", 6.35, AXIS_LENGTH / 2, 0.32, mats["shield"]) + + add_cylinder_between("despun_axial_hub", (-9.8, 0, 0), (9.8, 0, 0), 0.42, mats["hub"], vertices=32) + add_cylinder_between("traffic_light_spire_core", (-9.2, 0, 0), (9.2, 0, 0), 0.13, mats["light"], vertices=16) + add_gn_light_spine(mats["light"]) + + # Spokes and transfer collars: places where frame changes, and therefore where class power gathers. + spoke_angles = [pymath.radians(a) for a in (-96, -45, 0, 45, 96)] + for idx, a in enumerate(spoke_angles, start=1): + r = radial(a) + add_cylinder_between( + f"rotating_spoke_{idx:02d}_transfer_trunk", + (0.0, r[1] * 0.52, r[2] * 0.52), + (0.0, r[1] * 5.18, r[2] * 5.18), + 0.08, + mats["hub"], + vertices=12, + ) + add_cylinder_between( + f"spoke_base_transfer_collar_{idx:02d}", + (-0.35, r[1] * 5.06, r[2] * 5.06), + (0.35, r[1] * 5.06, r[2] * 5.06), + 0.22, + mats["pressure_line"], + vertices=24, + ) + + # Civic skin: Rama-style map layers wrapped to the rotating inner surface. + # Blooms do not copy Rama's poles/sea literally, but the procedural lesson is + # useful: big readable regions first, then roads, rivers, cities, fields, + # forests, clouds, and local infrastructure on top. + add_surface_patch("central_civic_sea_band", -1.15, 1.15, pymath.radians(-126), pymath.radians(126), INNER_RADIUS, mats["water"], lift=-0.07, angle_steps=64, x_steps=4) + for i, (x0, x1) in enumerate([(-8.2, -6.1), (-5.8, -3.6), (3.6, 5.8), (6.1, 8.2)]): + add_surface_patch(f"plain_grass_region_{i}", x0, x1, pymath.radians(-118), pymath.radians(118), INNER_RADIUS, mats["farm"], angle_steps=36, x_steps=3) + for i, (x0, x1, a0, a1) in enumerate([ + (-6.0, -4.1, -108, -74), + (-4.9, -3.2, 48, 86), + (3.1, 4.7, -92, -58), + (5.0, 6.9, 68, 106), + (6.8, 8.4, -30, 18), + ]): + add_surface_patch(f"forest_region_{i}", x0, x1, pymath.radians(a0), pymath.radians(a1), INNER_RADIUS, mats["forest"], lift=-0.12, angle_steps=12, x_steps=3) + for i, (x0, x1, a0, a1) in enumerate([ + (-7.4, -6.0, 48, 86), + (-3.1, -1.7, -88, -50), + (1.8, 3.4, 40, 82), + (5.4, 7.0, -112, -76), + ]): + add_surface_patch(f"district_city_region_{i}", x0, x1, pymath.radians(a0), pymath.radians(a1), INNER_RADIUS, mats["district"], lift=-0.16, angle_steps=8, x_steps=3) + for bx in [x0 + 0.25, (x0 + x1) / 2, x1 - 0.25]: + for ba in [pymath.radians(a0 + 7), pymath.radians((a0 + a1) / 2), pymath.radians(a1 - 7)]: + add_surface_box(f"city_block_{i}_{bx:.1f}_{ba:.2f}", bx, ba, mats["city"], size=(0.18, 0.1, 0.16), radial_lift=-0.27) + road_specs = [ + [(-8.4, -90), (-6.8, -70), (-5.2, -42), (-3.2, -18), (-1.1, -6), (1.1, 4), (3.4, 25), (5.8, 48), (8.2, 74)], + [(-7.8, 92), (-5.0, 72), (-2.4, 50), (0.0, 38), (2.7, 55), (5.2, 83), (8.0, 104)], + [(-8.0, -22), (-5.6, -10), (-3.3, 10), (-1.2, 32), (0.8, 42), (2.8, 34), (5.4, 12), (8.1, -14)], + ] + for i, spec in enumerate(road_specs): + add_surface_curve(f"wrapped_road_graph_{i}", [(x, pymath.radians(a)) for x, a in spec], INNER_RADIUS, 0.018, mats["road"], lift=-0.24) + river_specs = [ + [(-8.1, 18), (-6.5, 10), (-4.9, -4), (-3.2, -20), (-1.0, -32)], + [(1.0, 18), (2.6, 5), (4.4, -12), (6.2, -28), (8.1, -42)], + ] + for i, spec in enumerate(river_specs): + add_surface_curve(f"wrapped_river_{i}", [(x, pymath.radians(a)) for x, a in spec], INNER_RADIUS, 0.04, mats["water"], lift=-0.18) + for i, (x, a, sx) in enumerate([(-5.5, -42, 0.65), (-2.0, 62, 0.5), (2.4, -66, 0.55), (5.9, 25, 0.7)]): + add_surface_patch(f"interior_cloud_patch_{i}", x - sx, x + sx, pymath.radians(a - 8), pymath.radians(a + 8), 3.1, mats["cloud"], lift=0.0, angle_steps=8, x_steps=2) + + # Service and heat/air/water flows running below the public surface. + for deg, material, label in [ + (-112, mats["air"], "inward warm return"), + (-105, mats["coolant"], "coolant trunk"), + (-98, mats["condensate"], "condensate recovery"), + (105, mats["pressure_line"], "pressure reserve"), + (112, mats["hazard"], "emergency isolation"), + ]: + a = pymath.radians(deg) + r = radial(a) + add_curve_polyline( + label.replace(" ", "_"), + [(-8.6, r[1] * 5.42, r[2] * 5.42), (8.6, r[1] * 5.42, r[2] * 5.42)], + 0.035, + material, + ) + + # Kappa service ring: kept as one small local maintenance marker, not the point of the scene. + kappa_x = -2.7 + kappa_angle = pymath.radians(-45) + kr = radial(kappa_angle) + kt = tangent(kappa_angle) + service_center = (kappa_x, kr[1] * 5.22, kr[2] * 5.22) + add_box("service_ring_kappa_human_gallery", service_center, axes=((1, 0, 0), kt, kr), size=(2.4, 0.34, 0.16), material=mats["utility"]) + add_box( + "kappa_operations_gallery_badge_route", + (kappa_x - 0.25, kr[1] * 4.72, kr[2] * 4.72 + 0.28), + axes=((1, 0, 0), kt, kr), + size=(1.7, 0.24, 0.18), + material=mats["glass"], + ) + add_box( + "octopoid_support_rig_prep_station", + (kappa_x + 1.35, kr[1] * 5.05, kr[2] * 5.05 - 0.12), + axes=((1, 0, 0), kt, kr), + size=(0.7, 0.32, 0.2), + material=mats["hazard"], + ) + + # Crawl throats branch outward into the shell. Seal lungs live beyond them. + for i, offset in enumerate([-0.62, 0.0, 0.62], start=1): + base = (kappa_x + offset, kr[1] * 5.36, kr[2] * 5.36) + end = (kappa_x + offset, kr[1] * 6.14, kr[2] * 6.14) + add_cylinder_between(f"kappa_crawl_throat_{i}", base, end, 0.055, mats["hazard"], vertices=10) + bpy.ops.mesh.primitive_uv_sphere_add(segments=24, ring_count=12, radius=0.23, location=(kappa_x + offset, kr[1] * 6.0, kr[2] * 6.0)) + lung = bpy.context.object + lung.name = f"kappa_seal_lung_{i}" + lung.scale = (0.8, 1.0, 0.45) + lung.data.materials.append(mats["pressure_line"]) + + manifold_base = (kappa_x - 0.05, kr[1] * 5.48, kr[2] * 5.48) + for dz, material, name in [ + (-0.12, mats["air"], "air_return_to_filters"), + (0.0, mats["coolant"], "coolant_heat_exchanger"), + (0.12, mats["condensate"], "condensate_drain"), + ]: + add_curve_polyline( + "kappa_" + name, + [ + (manifold_base[0] - 1.0, manifold_base[1], manifold_base[2] + dz), + (manifold_base[0], manifold_base[1] + kt[1] * 0.55, manifold_base[2] + kt[2] * 0.55 + dz), + (manifold_base[0] + 1.0, manifold_base[1], manifold_base[2] + dz), + ], + 0.025, + material, + ) + + bpy.ops.object.light_add(type="AREA", location=(-1.6, 6.7, -2.0)) + kappa_light = bpy.context.object + kappa_light.name = "Kappa colored service inspection light" + kappa_light.data.energy = 360 + kappa_light.data.size = 4.0 + + # Labels are sparse: only the relationships the lore says a blueprint must show. + add_label("label_inward", "INWARD: open air / light spine / hub", (5.8, 1.2, 1.0), 0.23, mats["label"]) + add_label("label_outward", "OUTWARD: utility mat -> pressure shell -> shielding", (-6.0, -3.8, -4.1), 0.21, mats["label"]) + add_label("label_regions", "mapped regions: sea, plains, cities, fields, forests, roads, rivers", (-3.4, 3.8, 3.5), 0.16, mats["label"]) + add_label("label_kappa", "one service-ring marker among many", (kappa_x, -4.2, -4.0), 0.14, mats["label"]) + add_label("label_spokes", "spoke interfaces: transit, utilities, authority", (1.8, 2.2, 3.2), 0.18, mats["label"]) + + # Lighting and camera. + bpy.ops.object.light_add(type="AREA", location=(1.5, -6.5, 7.0)) + key = bpy.context.object + key.name = "large soft inspection light" + key.data.energy = 650 + key.data.size = 6.5 + bpy.ops.object.camera_add(location=(15.5, -19.0, 12.5)) + bpy.context.scene.camera = bpy.context.object + bpy.context.object.name = "Camera_Bloom_Cutaway" + aim_camera(bpy.context.object, (0.0, 0.0, 0.0)) + bpy.context.object.data.type = "ORTHO" + bpy.context.object.data.ortho_scale = 18.0 + + bpy.ops.object.camera_add(location=(-0.8, 9.5, -7.5)) + detail_camera = bpy.context.object + detail_camera.name = "Camera_Interior_World" + aim_camera(detail_camera, (0.0, 0.0, 0.0)) + detail_camera.data.type = "ORTHO" + detail_camera.data.ortho_scale = 9.0 + + bpy.context.scene.render.engine = "BLENDER_EEVEE" + if hasattr(bpy.context.scene, "eevee"): + bpy.context.scene.eevee.taa_render_samples = 24 + bpy.context.scene.render.resolution_x = 1400 + bpy.context.scene.render.resolution_y = 1000 + bpy.context.scene.view_settings.view_transform = "Filmic" + bpy.context.scene.view_settings.look = "Medium High Contrast" + + +def main(): + import bpy + + # Force Geometry Script group creation before scene objects reference it. + vg_bloom_light_spine() + build_scene() + + out_dir = Path("experiments/generated/aetheria_bloom") + out_dir.mkdir(parents=True, exist_ok=True) + blend_path = out_dir / "aetheria_bloom_habitat.blend" + render_path = out_dir / "aetheria_bloom_habitat.png" + detail_render_path = out_dir / "aetheria_bloom_interior_world.png" + bpy.ops.wm.save_as_mainfile(filepath=str(blend_path.resolve())) + bpy.context.scene.camera = bpy.data.objects["Camera_Bloom_Cutaway"] + bpy.context.scene.render.filepath = str(render_path.resolve()) + bpy.ops.render.render(write_still=True) + bpy.context.scene.camera = bpy.data.objects["Camera_Interior_World"] + bpy.context.scene.render.filepath = str(detail_render_path.resolve()) + bpy.ops.render.render(write_still=True) + print("AETHERIA_BLOOM_BLEND", blend_path.resolve()) + print("AETHERIA_BLOOM_RENDER", render_path.resolve()) + print("AETHERIA_BLOOM_INTERIOR_RENDER", detail_render_path.resolve()) + group = bpy.data.node_groups.get("VG Bloom Light Spine") + if group: + print("AETHERIA_BLOOM_GN_GROUP", group.name, len(group.nodes), len(group.links)) + + +if __name__ == "__main__": + main() diff --git a/experiments/generated/aetheria_bloom/aetheria_bloom_habitat.blend b/experiments/generated/aetheria_bloom/aetheria_bloom_habitat.blend new file mode 100644 index 0000000..a8d863f Binary files /dev/null and b/experiments/generated/aetheria_bloom/aetheria_bloom_habitat.blend differ diff --git a/experiments/generated/aetheria_bloom/aetheria_bloom_habitat.png b/experiments/generated/aetheria_bloom/aetheria_bloom_habitat.png new file mode 100644 index 0000000..3076955 Binary files /dev/null and b/experiments/generated/aetheria_bloom/aetheria_bloom_habitat.png differ diff --git a/experiments/generated/aetheria_bloom/aetheria_bloom_interior_world.png b/experiments/generated/aetheria_bloom/aetheria_bloom_interior_world.png new file mode 100644 index 0000000..cfedf3f Binary files /dev/null and b/experiments/generated/aetheria_bloom/aetheria_bloom_interior_world.png differ diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index fd516ee..3475dad 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -56,6 +56,15 @@ structural atlas lives at mechanism study lives at `docs/research/translations/ircss-french-houses-node-mechanisms.md`. +First from-scratch build test: `examples/geometry_script/aetheria_bloom_habitat.py` +generates an Aetheria Bloom whole-habitat study using Bloom lore plus Eric +Bruneton's Rama making-of as a cylindrical-world reference. It now emphasizes +whole-cylinder mapped spaces: water band, plains, farms, forests, city clusters, +roads, rivers, clouds, spokes, hub/spine, and shell layers. Kappa is only a +small service marker. Build notes live at +`docs/research/builds/aetheria-bloom-habitat.md`; verification lives at +`tools/verify_aetheria_bloom_habitat.py`. + Current authoring prior: use the full Python stack. Python structures intent, tables, loops, variants, cleanup, validation, docs, and scene/render orchestration; Geometry Script emits inspectable Geometry Nodes groups; `bpy` @@ -75,10 +84,10 @@ The GameCult fork is intentionally pruned to `main` plus VibeGeometry-owned tooling branches. Do not copy upstream branch soup forward unless a future patch actually needs it. -The current next action is to continue IRCSS French Houses with a behaviorally -verifiable city-organ target from the atlas, preferring `GenerateArc`, `Switch -On Roof Type`, `Is Edge Manifold`, or `Generate Windows` unless deliberately -attacking repeat/foreach/gizmo support. +The current next action is to continue the Aetheria Bloom build by moving one +whole-habitat repeated subsystem, preferably wrapped roads/rivers or region +patches, into reusable Geometry Script groups and improving the whole-cylinder +render evidence. ## Important Invariants diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 8b63b36..46cd047 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -34,3 +34,4 @@ {"ts": "2026-05-04T22:09:04+00:00", "type": "research", "status": "accepted", "note": "IRCSS final result is object-level scene composition, not a single master town graph: visible collections combine generated houses, church/cathedral parts, walls/gate/bridge, farms, terrain, river, and set-dressing roots; top evaluated roots are HousesOnCurves and Geometry Nodes.002 cathedral."} {"ts": "2026-05-04T22:19:41+00:00", "type": "research", "status": "accepted", "note": "Accounted for all 108 IRCSS French Houses geometry node group datablocks in a structural node atlas, including modifier use, dependencies, feature pressure, asset bindings, and translation posture. This upgrades corpus knowledge from scene-level map to per-graph coverage, while preserving the boundary that only accepted translations have behavioral equivalence proof."} {"ts": "2026-05-04T22:31:47+00:00", "type": "research", "status": "accepted", "note": "Studied IRCSS French Houses below the group level: 16,889 inspected nodes, 138 unique node types, 844 artist frame labels, 273 nested group nodes, and complete mechanism tables for all 108 groups. Distilled the file into reusable translation doctrine: edge-first architecture, curves as attachment rails, capture before domain changes, Python tables for orchestration, and repeat/foreach/gizmo/closure as toolchain grammar rather than incidental noise."} +{"ts": "2026-05-04T23:10:37+00:00", "type": "implementation", "status": "accepted", "note": "Built a from-scratch Aetheria Bloom habitat study after reading Bloom lore and Bruneton Rama making-of references. Refocused from Kappa detail to whole-cylinder spaces: layered shell, axial hub/light spine, spokes, central water band, plains/farms, forests, city clusters, wrapped roads/rivers, cloud patches, utility routes, and one small service-ring marker. Blender verification passes with VG Bloom Light Spine at 21 nodes/31 links and 98 geometry/text objects."} diff --git a/state/map.yaml b/state/map.yaml index d368846..662776a 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -71,6 +71,7 @@ current_artifacts: - docs/research/translations/ircss-french-houses-system-map.md - docs/research/translations/ircss-french-houses-node-atlas.md - docs/research/translations/ircss-french-houses-node-mechanisms.md + - docs/research/builds/aetheria-bloom-habitat.md tools: - tools/vibegeometry_state.py - tools/vibegeometry_prepare_compaction.py @@ -80,6 +81,7 @@ current_artifacts: - tools/verify_fieldvalue_translations.py - tools/geometry_script_loader.py - tools/smoke_nodes_to_script_converter.py + - tools/verify_aetheria_bloom_habitat.py pending_contracts: - schemas/scene-brief.schema.json - schemas/node-graph-manifest.schema.json @@ -94,8 +96,8 @@ data_flow: - If state grows faster than understanding, cut it back. current_status: - summary: VibeGeometry has an initial persistence scaffold plus verified Geometry Script translations for local math/utility samples, a first official Blender demo tranche, and two IRCSS French Houses city-scale footholds. The IRCSS pass verified MakeSpiral as an architectural spine and PointyGothicCone as ornament grown from a structural host, and now includes a file-level dependency map, an all-node atlas, and a node mechanism study for the 108-group town kit. The remaining large-system blockers are repeat-zone feedback, repeat Top outputs, foreach zones, and gizmo nodes. The repo-local Geometry Script fork includes a Blender 5.1 nodes_to_script converter port plus nested-group, menu-socket, and duplicate-key fixes needed by these translations. - next_action: Continue IRCSS French Houses with a behaviorally verifiable city-organ target from the atlas, preferring GenerateArc, Switch On Roof Type, Is Edge Manifold, or Generate Windows unless deliberately attacking repeat/foreach/gizmo support. + summary: VibeGeometry has an initial persistence scaffold plus verified Geometry Script translations for local math/utility samples, a first official Blender demo tranche, IRCSS French Houses city-scale graph doctrine, and a first from-scratch Aetheria Bloom whole-habitat build. The IRCSS pass verified MakeSpiral and PointyGothicCone, then mapped the 108-group town kit through a dependency map, all-node atlas, and node mechanism study. The Bloom pass used Aetheria lore plus Bruneton's Rama making-of to generate a layered cylindrical world study with shell anatomy, mapped interior regions, spokes, hub/light spine, roads/rivers, forests, city clusters, clouds, and service markers. The remaining large-system blockers are repeat-zone feedback, repeat Top outputs, foreach zones, and gizmo nodes. + next_action: Continue the Aetheria Bloom build by moving one whole-habitat repeated subsystem, preferably wrapped roads/rivers or region patches, into reusable Geometry Script groups and improving the whole-cylinder render evidence. remotes: vibegeometry: https://github.com/GameCult/VibeGeometry geometry_script_fork: https://github.com/GameCult/geometry-script diff --git a/tools/verify_aetheria_bloom_habitat.py b/tools/verify_aetheria_bloom_habitat.py new file mode 100644 index 0000000..12cb028 --- /dev/null +++ b/tools/verify_aetheria_bloom_habitat.py @@ -0,0 +1,76 @@ +"""Verify the generated Aetheria Bloom habitat study scene.""" + +from __future__ import annotations + +from pathlib import Path + +import bpy + + +ROOT = Path(__file__).resolve().parents[1] +ARTIFACT_DIR = ROOT / "experiments" / "generated" / "aetheria_bloom" + + +REQUIRED_OBJECTS = { + "01_open_civic_inner_surface", + "02_utility_mat_service_interlayer", + "03_pressure_structural_shell", + "04_outer_aggregate_shielding", + "despun_axial_hub", + "traffic_light_spire_core", + "GN_Light_Spine_Modifier_Carrier", + "rotating_spoke_02_transfer_trunk", + "spoke_base_transfer_collar_02", + "service_ring_kappa_human_gallery", + "kappa_operations_gallery_badge_route", + "octopoid_support_rig_prep_station", + "kappa_crawl_throat_1", + "kappa_crawl_throat_2", + "kappa_crawl_throat_3", + "kappa_seal_lung_1", + "kappa_air_return_to_filters", + "kappa_coolant_heat_exchanger", + "kappa_condensate_drain", + "central_civic_sea_band", + "wrapped_road_graph_0", + "wrapped_river_0", + "forest_region_0", + "district_city_region_0", + "interior_cloud_patch_0", + "Camera_Bloom_Cutaway", + "Camera_Interior_World", +} + + +def assert_true(condition: bool, message: str): + if not condition: + raise AssertionError(message) + + +def verify_scene(): + missing = sorted(name for name in REQUIRED_OBJECTS if name not in bpy.data.objects) + assert_true(not missing, f"Missing required objects: {missing}") + + group = bpy.data.node_groups.get("VG Bloom Light Spine") + assert_true(group is not None, "Missing Geometry Script node group VG Bloom Light Spine") + assert_true(len(group.nodes) >= 20, f"Unexpectedly small light-spine graph: {len(group.nodes)} nodes") + assert_true(len(group.links) >= 25, f"Unexpectedly sparse light-spine graph: {len(group.links)} links") + + carrier = bpy.data.objects["GN_Light_Spine_Modifier_Carrier"] + assert_true(any(mod.type == "NODES" and mod.node_group == group for mod in carrier.modifiers), "Light-spine carrier lacks expected geometry-nodes modifier") + + for filename in ("aetheria_bloom_habitat.png", "aetheria_bloom_interior_world.png", "aetheria_bloom_habitat.blend"): + path = ARTIFACT_DIR / filename + assert_true(path.exists(), f"Missing generated artifact {path}") + assert_true(path.stat().st_size > 10_000, f"Generated artifact is suspiciously small: {path}") + + mesh_objects = [obj for obj in bpy.data.objects if obj.type in {"MESH", "CURVE", "FONT"}] + assert_true(len(mesh_objects) >= 95, f"Expected a populated whole-Bloom study scene, found {len(mesh_objects)} geometry/text objects") + + print("AETHERIA_BLOOM_VERIFY ok") + print("AETHERIA_BLOOM_VERIFY group", group.name, len(group.nodes), len(group.links)) + print("AETHERIA_BLOOM_VERIFY objects", len(mesh_objects)) + + +if __name__ == "__main__": + verify_scene()