Physical Sky Atmosphere — Sun Elevation Sweep

Contents Previous Next

Install

npm install -g @lmctl-ai/lmctl

lmvideo 0.1.38 is released. Source examples are pinned to public commit aab2677.

Download lmvideo 0.1.38

Original seven stone monoliths on terrain; stacked 2-degree golden-hour and 45-degree noon panels under an analytic Hosek-Wilkie sky.

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-22-physical-sky.lms

Source

# B22 candidate: original obelisk terrain, analytic Hosek dome + explicit direct sun.
mkdir("build"); program=_lmcode_ cli="lmvideo" install="github:lmctl-ai/lmvideo@v0.1.38";
let sheet=layout_sheet();
for(k in range(0,2)){
  let elevation=2.0;if(k==1){elevation=45.0;}
  let angle=elevation*0.017453292519943295;
  let scene=scene3d().threads(4).background("#142437").ambient(0.0).sky_hosek(elevation,0.0,2.2,0.3,1.0,true).tonemap("aces",1.0);
  scene.camera(camera3d().look_at(10.0,3.0,16.0,0.0,1.5,0.0).perspective(45.0,0.1,150.0));
  let earth=material("#b5aa95",0.0,0.9);
  scene.add(mesh_box(200.0,0.15,200.0),earth).position(0.0,-0.075,0.0);
  let hills=image_pattern(65,33,"0.15+0.7*sin(3.14159265*x)*sin(3.14159265*x)*sin(3.14159265*y)*sin(3.14159265*y)","0.15+0.7*sin(3.14159265*x)*sin(3.14159265*x)*sin(3.14159265*y)*sin(3.14159265*y)","0.15+0.7*sin(3.14159265*x)*sin(3.14159265*x)*sin(3.14159265*y)*sin(3.14159265*y)","1");
  scene.add(mesh_heightfield(hills,70.0,35.0,3.5),earth).position(-5.0,-0.5,-35.0);
  let stone=material("#d8d0bc",0.0,0.6);
  for(i in range(0,7)){
    let x=float(i%3)*4.0-3.0;let z=float(i/3)*5.0-5.0;
    let h=2.2+float(i%3)*0.7;
    scene.add(mesh_beveled_box(0.65,h,0.65,0.05),stone).position(x,h/2.0,z);
  }
  scene.directional_light(cos(angle),sin(angle),0.0,"#fff4df",3.0);
  let image=scene.render_image(900,280,"cycles",64,6,20261102,true);
  let title="02 degrees / long shadows";if(k==1){title="45 degrees / noon shadows";}
  image.text(20.0,28.0,title,20.0,0.95,0.96,1.0,1.0);
  sheet.add(image);
}
sheet.render(1,0,0.0,0.0,0.0,1.0).save("build/bench-22-physical-sky.png");
out.print("B22 candidate: Hosek-Wilkie Y-up sky, 2/45 degree sun; explicit artistic direct sun, no solar-disc claim");
end _lmcode_
r=run_lmcode(program);assert(r.ok,(r.ok ? "" : r.message));println(json_stringify(r.result));

Raw LMScript source

Stone monoliths shown under low and high sun lighting.
Compare the warm low-sun view with the higher-sun view.