luv

Workshop wiki

reference-plates.lisp

captures/reference-plates.lisp

system luv/showcase · 11 definitions · on GitHub

in-package#:luv.showcase

Small source-owned recipes for the deterministic diagnostic gazetteer. Scene construction and rendering remain owned by luvcraft's named views; these wrappers only adapt their output to the capture manifest. #OK1OC8

defunrender-gazetteer-reference-plate
view-namepathname

Render gazetteer view-name to the capture protocol's exact pathname.

let*
directory
uiop:pathname-directory-pathnamepathname
unless
string=
uiop:native-namestringrendered
uiop:native-namestringpathname
uiop:rename-file-overwriting-targetrenderedpathname
pathname
defuncall-with-temporary-reference-frame-directory

Call function with a unique empty directory, then remove that directory.

uiop:with-temporary-file
:pathnamemarker:prefix"luv-showcase-reference-frames-":type:unspecific

WITH-TEMPORARY-FILE claims a unique name atomically. Turn only that exact claimed path into a directory for the consecutive PNG frames.

uiop:delete-file-if-existsmarker
let
directory
uiop:ensure-directory-pathnamemarker
ensure-directories-existdirectory
unwind-protect
funcallfunctiondirectory
when
probe-filedirectory
uiop:delete-directory-treedirectory:validatet:if-does-not-exist:ignore
defunrender-shadow-yard-motion
pathname

Render a short consecutive sun-motion proof from the shadow-yard view.

let
frame-count24
frame-rate12
call-with-temporary-reference-frame-directory
lambda
directory
formatt"~&capture shadow-yard-motion: rendering ~D consecutive frames...~%"frame-count
finish-output
let
frames
luvcraft:capture-luvcraft-gazetteer-sequence:shadow-yarddirectory:countframe-count:forward-step0.0:yaw-step0.0:day-start0.34:day-step0.0015
unless
=frame-count
lengthframes
error"Expected ~D shadow-yard frames, got ~D."frame-count
lengthframes
formatt"capture shadow-yard-motion: encoding ~D frames at ~D fps...~%"frame-countframe-rate
finish-output
ensure-directories-existpathname
uiop:run-program
list"ffmpeg""-hide_banner""-loglevel""error""-nostdin""-y""-framerate"
formatnil"~D"frame-rate
"-start_number""0""-i"
uiop:native-namestring
merge-pathnames"shadow-yard-%03d.png"directory
"-frames:v"
formatnil"~D"frame-count
"-vf""pad=ceil(iw/2)*2:ceil(ih/2)*2""-c:v""libx264""-preset""medium""-crf""18""-pix_fmt""yuv420p""-movflags""+faststart""-progress""pipe:1"
uiop:native-namestringpathname
:inputnil:outputt:error-outputt
formatt"capture shadow-yard-motion: encoded ~A~%"pathname
finish-output
pathname
luv:define-capturegazetteer-little-world-noon
:figureok1oc8:kind:image:extension"png":description"The original aerial gazetteer terrain view at pinned noon for inspection."
pathname
render-gazetteer-reference-plate:little-world-noonpathname
luv:define-capturelittle-world-dusk
:figureok1oc8:kind:image:extension"png":description"Generated little-world terrain under its deterministic warm dusk sky."
pathname
render-gazetteer-reference-plate:little-world-duskpathname
luv:define-captureshadow-forest
:figureok1oc8:kind:image:extension"png":description"Representative generated trees and terrain for cast-shadow inspection."
pathname
render-gazetteer-reference-plate:shadow-forestpathname
luv:define-captureglow-floor
:figureok1oc8:kind:image:extension"png":description"A placed crystal proving material emission and blocklight after dark."
pathname
luv:define-capturecrystal-seam
:figureok1oc8:kind:image:extension"png":description"A crystal lighting both sides of an exact chunk boundary."
pathname
luv:define-captureturtle-meadow
:figureok1oc8:kind:image:extension"png":description"Three deterministic turtle poses for model, material, and shadow review."
pathname
render-gazetteer-reference-plate:turtle-meadowpathname
luv:define-captureshadow-yard-still
:figureok1oc8:kind:image:extension"png":description"A low sun, flat receiver, and simple elevated casters for shadow review."
pathname
luv:define-captureshadow-yard-motion
:figureok1oc8:kind:video:extension"mp4":description"A two-second consecutive sun sequence across the deterministic shadow yard."
pathname