sourceextensions/blender/demos/city.xtl
1⍝│ Blender, ray-traced: a city at night after rain, flown through. The
2⍝│ city is arrays (NeonCity.xtl): 240 lots, each tower's height,
3⍝│ footprint and skin from a hash of its number; screens, neon, lamps,
4⍝│ steam, bridges, cars and fliers, all rows of tables that Cycles.xtl
5⍝│ writes into Blender's Python. Here: four stills along the camera's
6⍝│ flight, 1280 by 720, ray-traced by Cycles (the graphics card when
7⍝│ there is one), written to work/city/out.
8⍝│ Run: just demo blender city (about five minutes)
9⍝│ Title: The neon city, ray-traced: four stills
10⍝│ Link: three/live/ the same city, live: fly and walk through it
11
12"bl:" u̲se< "Blender"
13"bp:" u̲se< "Bpy"
14"cy:" u̲se< "Cycles"
15"nc:" u̲se< "NeonCity"
16
17script ← (((1280, 720, 30, 64, "GPU") ⁿᶜs̲cene 0) c̲at
18 (("skyline.png", 0.5) ᶜʸs̲till 0) c̲at (("descent.png", 6.0) ᶜʸs̲till 0) c̲at (("street.png", 10.5) ᶜʸs̲till 0) c̲at ("screen.png", 14.5) ᶜʸs̲till 0)
19_ ← "work/city/run.py" ᵇˡw̲rite! ᵇᵖlauncher
20_ ← "work/city/scene.py" ᵇˡw̲rite! script
21"ray tracing four stills with Blender (Cycles) ..."
22r ← "work/city/run.py" ᵇˡr̲un! "work/city/scene.py work/city/out"
23"the run, and the error lines in Blender's log:"
24lines ← (n̲ot r = f̲irst "\n") p̲artition r
25d̲isclose 1 s̲elect lines
26d̲isclose 2 s̲elect lines
27"what Blender made:"
28ᵇˡr̲ead "work/city/out/report.txt"
29"the files (bytes, path):"
30ᵇˡf̲iles "work/city/out"