Archviz Daylit Pavilion
Install
npm install -g @lmctl-ai/lmctl
lmvideo 0.1.38 is released. Source examples are pinned to public commit aab2677.
900x560 original enclosed 6x6x3 metre room with true left-wall window aperture, grounded table/chairs/cabinet, authored plaster/concrete/wood, Hosek daylight plus matching explicit sun; direct-vs-eight-bounce alcove GI witness.
Verified acceptance capture, reproducible with the lmvideo 0.1.38 prerelease runtime.
Run this example
lmctl autorun https://raw.githubusercontent.com/lmctl-ai/lmvideo/aab2677a4b6264ae6afae8ad64a1d7c1dcd3a052/examples/showcase/bench-25-archviz-daylit-room.lms
Source
# B25 / G.9-G.10: original enclosed daylit room with a real left window.
# All geometry, materials and lighting are procedural and MIT under LICENSE-examples.
mkdir("build"); program=_lmcode_ cli="lmvideo" install="github:lmctl-ai/lmvideo@v0.1.38";
let scene=scene3d().threads(4).background("#1a2430").ambient(0.0).sky_hosek(35.0,200.0,2.2,0.3,2.0,true).tonemap("aces",2.5);
let camera=camera3d().look_at(2.4,1.7,2.5,-0.4,1.2,-0.8).perspective(62.0,0.05,30.0);scene.camera(camera);
let plaster=material("#d6d0c4",0.0,0.88);let concrete=material("#737b82",0.0,0.92);
let grain=texture_from_image(image_pattern(128,64,"0.55+0.05*sin(110*y+5*sin(7*x))","0.35+0.025*sin(110*y+5*sin(7*x))","0.18+0.02*sin(110*y+5*sin(7*x))","1"),"srgb");
let wood=material("#ffffff",0.0,0.65).albedo(grain);let floor=material("#9a8062",0.0,0.82);
scene.add(mesh_box(6.0,0.1,6.0),floor).position(0.0,-0.05,0.0);scene.add(mesh_box(6.0,3.0,0.1),plaster).position(0.0,1.5,-3.0);scene.add(mesh_box(0.1,3.0,6.0),plaster).position(3.0,1.5,0.0);scene.add(mesh_box(6.0,0.1,6.0),plaster).position(0.0,3.0,0.0);scene.add(mesh_box(6.0,3.0,0.1),plaster).position(0.0,1.5,3.0);
# Left wall opening x=-3, y=.8..2.5, z=-2..1: real frame and mullions.
scene.add(mesh_box(0.1,0.8,6.0),plaster).position(-3.0,0.4,0.0);scene.add(mesh_box(0.1,0.5,6.0),plaster).position(-3.0,2.75,0.0);scene.add(mesh_box(0.1,1.7,1.0),plaster).position(-3.0,1.65,-2.5);scene.add(mesh_box(0.1,1.7,2.0),plaster).position(-3.0,1.65,2.0);scene.add(mesh_box(0.1,0.1,3.0),wood).position(-3.0,0.8,-0.5);scene.add(mesh_box(0.1,0.1,3.0),wood).position(-3.0,2.5,-0.5);scene.add(mesh_box(0.1,1.7,0.12),wood).position(-3.0,1.65,-1.25);scene.add(mesh_box(0.1,1.7,0.12),wood).position(-3.0,1.65,0.25);
scene.add(mesh_box(0.12,1.7,0.1),wood).position(-2.96,1.65,-2.0);scene.add(mesh_box(0.12,1.7,0.1),wood).position(-2.96,1.65,1.0);
# Grounded original furniture: .75 m table, two .45 m seats with legs/backs, cabinet.
scene.add(mesh_box(1.6,0.12,0.8),wood).position(0.0,0.81,-0.6);for(x in range(0,2)){for(z in range(0,2)){let tx=-0.65+float(x)*1.3;let tz=-0.9+float(z)*0.6;scene.add(mesh_box(0.1,0.75,0.1),wood).position(tx,0.375,tz);}}
let chairmat=material("#cb8d66",0.0,0.72);for(side in range(0,2)){let cx=-1.15+float(side)*2.3;scene.add(mesh_box(0.9,0.1,0.75),chairmat).position(cx,0.45,0.6);for(leg in range(0,2)){let lx=cx-0.32+float(leg)*0.64;scene.add(mesh_box(0.08,0.45,0.08),wood).position(lx,0.225,0.35);scene.add(mesh_box(0.08,0.45,0.08),wood).position(lx,0.225,0.85);}scene.add(mesh_box(0.9,0.8,0.08),chairmat).position(cx,0.85,0.9);}
scene.add(mesh_box(0.8,0.05,0.45),concrete).position(1.8,0.025,-2.725);scene.add(mesh_box(0.8,0.05,0.45),concrete).position(1.8,1.575,-2.725);scene.add(mesh_box(0.05,1.6,0.45),concrete).position(1.425,0.8,-2.725);scene.add(mesh_box(0.05,1.6,0.45),concrete).position(2.175,0.8,-2.725);scene.add(mesh_box(0.8,1.6,0.05),plaster).position(1.8,0.8,-2.975);scene.add(mesh_box(0.7,0.04,0.4),wood).position(1.8,0.8,-2.73);
scene.add(mesh_box(0.12,0.36,0.22),material("#bc6c4c",0.0,0.9)).position(1.58,1.0,-2.74);
scene.add(mesh_box(0.12,0.32,0.22),material("#658b94",0.0,0.9)).position(1.74,0.98,-2.74);
scene.add(mesh_box(0.12,0.38,0.22),material("#dfcba2",0.0,0.9)).position(1.90,1.01,-2.74);
scene.directional_light(-0.769,0.574,-0.280,"#fff1d5",3.6);
let direct=scene.render_image(900,560,"cycles",128,0,20261103,true);let gi=scene.render_image(900,560,"cycles",128,8,20261103,true);let probe=scene.projection(900,560).at(1.8,0.35,-2.948);image_assert_true(probe.visible());let px=int(probe.x());let py=int(probe.y());
fn linear(v: float) -> float { let q=0.0;if(v<=0.04045){q=v/12.92;}else{q=pow((v+0.055)/1.055,2.4);}return q; }
let direct_sum=0.0;let gi_sum=0.0;for(y in range(-2,3)){for(x in range(-2,3)){let dx=px+x;let dy=py+y;for(c in range(0,3)){direct_sum=direct_sum+linear(direct.pixel(dx,dy,c));gi_sum=gi_sum+linear(gi.pixel(dx,dy,c));}}}
let direct_mean=direct_sum/75.0;let gi_mean=gi_sum/75.0;image_assert_true(gi_mean>direct_mean*1.25+0.001);out.print("B25 alcove probe x="+str(px)+" y="+str(py)+" direct_linear="+str(direct_mean)+" gi_linear="+str(gi_mean)+" ratio="+str(gi_mean/max(0.000001,direct_mean)));
gi.save("build/bench-25-archviz-daylit-room.png");out.print("B25 original enclosed room | left window aperture | Hosek 35deg azimuth 200 | 128 spp OIDN | measured alcove GI");
end _lmcode_
r=run_lmcode(program);assert(r.ok,(r.ok ? "" : r.message));println(json_stringify(r.result));