Marcus asked to apply A Pattern Language concepts, start as a multigenerational home that can grow by modules, raise the ceiling, add alcoves and refine the overall design. - Common room +0.6 m (Ceiling Height Variety 190), door-head transom - South study nook and west window-seat alcoves (179, 180) - Children's realm wing beside the couple's realm, bed alcoves, covered deck linked to the verandah (137, 188, 108, 119) - Step-free elder cottage on the garden court (155, 40, 138) - Entrance arbour on the arrival walk (112) - Future shadows: teen cottage/studio (N), elder cottage 2 or rooms to rent (NE); tour chapters 33-36 (36 total, 3 min) - New plan SVG, layout JSON, renders, decision record, docs Concept geometry on unsurveyed terrain; not engineered. Private licensed model, Unreal and the v007 film not updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
2.7 KiB
Python
69 lines
2.7 KiB
Python
"""Render the v010 study views from a saved v010 model.
|
|
|
|
blender --background MODEL.blend --python render_views.py -- --out DIR [--percent 60] [--samples 48] [--only NAME]
|
|
Cycles/Metal on macOS. Captions and FAST proxies are excluded; DETAIL renders.
|
|
"""
|
|
import argparse
|
|
import bpy
|
|
import sys
|
|
from pathlib import Path
|
|
from mathutils import Vector
|
|
|
|
p = argparse.ArgumentParser()
|
|
p.add_argument('--out', required=True)
|
|
p.add_argument('--percent', type=int, default=60)
|
|
p.add_argument('--samples', type=int, default=48)
|
|
p.add_argument('--only')
|
|
a = p.parse_args(sys.argv[sys.argv.index('--') + 1:])
|
|
out = Path(a.out).resolve()
|
|
out.mkdir(parents=True, exist_ok=True)
|
|
s = bpy.context.scene
|
|
detail = bpy.data.collections['DETAIL - full geometry for renders']
|
|
fast = bpy.data.collections['00 FAST TOUR - lightweight viewport']
|
|
detail.hide_viewport = False
|
|
fast.hide_viewport = True
|
|
for ob in bpy.data.collections['22 PLAY - guided camera tour'].objects:
|
|
if ob.type == 'FONT':
|
|
ob.hide_render = True
|
|
s.render.engine = 'CYCLES'
|
|
s.render.resolution_x, s.render.resolution_y = 2560, 1440
|
|
s.render.resolution_percentage = a.percent
|
|
s.cycles.samples = a.samples
|
|
s.cycles.use_denoising = True
|
|
prefs = bpy.context.preferences.addons['cycles'].preferences
|
|
prefs.compute_device_type = 'METAL'
|
|
prefs.get_devices()
|
|
for d in prefs.devices:
|
|
d.use = d.type == 'METAL'
|
|
s.cycles.device = 'GPU'
|
|
|
|
# name: (location, target, lens or None for ortho, ortho_scale)
|
|
views = {
|
|
'v010-pattern-overview': ((-6, 64, 50), (-1, 2, 0), None, 62),
|
|
'v010-common-room-alcoves': ((-5.3, 2.75, 2.65), (3.4, -3.6, 2.2), 18, None),
|
|
'v010-study-alcove': ((3.3, -0.35, 2.45), (3.4, -4.2, 1.75), 21, None),
|
|
'v010-verandah-link': ((-1.5, 13.5, 3.0), (-6.2, 2.6, 2.6), 22, None),
|
|
'v010-window-seat-alcove': ((2.6, -.6, 2.35), (-7.0, 1.6, 1.9), 22, None),
|
|
'v010-childrens-realm': ((-17.0, 11.2, 4.4), (-12.0, 2.4, 2.0), 22, None),
|
|
'v010-elder-cottage': ((3.2, 18.6, 3.4), (13.0, 11.8, 1.0), 26, None),
|
|
'v010-entrance-arbour': ((3.6, -14.5, 2.4), (6.0, -7.9, 1.7), 28, None),
|
|
}
|
|
for name, (loc, target, lens, ortho) in views.items():
|
|
if a.only and a.only != name:
|
|
continue
|
|
data = bpy.data.cameras.new(name)
|
|
cam = bpy.data.objects.new(name, data)
|
|
s.collection.objects.link(cam)
|
|
cam.location = loc
|
|
cam.rotation_euler = (Vector(target) - Vector(loc)).to_track_quat('-Z', 'Y').to_euler()
|
|
data.clip_end = 1000
|
|
if lens is None:
|
|
data.type = 'ORTHO'
|
|
data.ortho_scale = ortho
|
|
else:
|
|
data.lens = lens
|
|
s.camera = cam
|
|
s.render.filepath = str(out / (name + '.png'))
|
|
bpy.ops.render.render(write_still=True)
|
|
print('RENDERED', s.render.filepath, flush=True)
|