Analytic Area Light Caustic Ball Lens

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

900x560 CPU Cycles still: original clear ball lens above a original neutral checker receiver floor, one rectangular analytic area emitter, explicit MNEE caster/receiver roles and focused floor caustic.

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-18-caustic-ball-lens.lms

Source

# B18 / G.10: analytic-area CPU MNEE caustic lens candidate.
# All geometry, materials and lighting are original procedural content.
mkdir("build"); program=_lmcode_ cli="lmvideo" install="github:lmctl-ai/lmvideo@v0.1.38";
let scene=scene3d().threads(4).background("#11151d").ambient(0.0);
scene.camera(camera3d().look_at(0.0,4.5,6.0,0.0,0.0,0.0).ortho(4.2,0.1,30.0));
let tiles=texture_checker("#9c9c9c","#bcbcbc",6).bake(256,256,"srgb");
let floor=scene.add(mesh_box(5.0,0.1,5.0),material("#ffffff",0.0,0.72).albedo(tiles)).position(0.0,-0.05,0.0);
let lens=scene.add(mesh_sphere(0.72,32,48),material("#ffffff",0.0,0.08).transmission(1.0).ior(1.52));
lens.position(0.0,1.2465,0.0).cast_caustics(true); floor.receive_caustics(true);
scene.area_light(0.0,8.0,0.0,0.0,-1.0,0.0,0.5,0.5,"#ffffff",80.0,20.0); scene.light_caustics(0,true);
let image=scene.render_image(900,560,"cycles",512,8,991,true);
image_assert_true(image.width()==900&&image.height()==560&&image.stddev(0)>0.01);
image.save("build/bench-18-caustic-ball-lens.png");
out.print("B18 analytic-area CPU MNEE lens | 512 spp | 8 bounces | seed 991 | OIDN | floor ROI/normal-mask proof in native gate");
end _lmcode_
r=run_lmcode(program);assert(r.ok,(r.ok ? "" : r.message));println(json_stringify(r.result));

Raw LMScript source

A clear sphere above a checker floor with a concentrated patch of light.
The focused light on the floor is formed through the ball lens.