Skip to content

best_effort_import.h

Ludus Wiki · API overview · Browse API

File

Best-effort scene importers: pbrt-v4 (profile pbrt-best-effort-v1), glTF 2.0 and GLB (gltf-best-effort-v1) and Wavefront OBJ with MTL (obj-best-effort-v1), and the importer of Ludus's own scene source format (ludus-scene-v1), which shares their planner and report.
Unlike the frozen pbrt-reference-v1 staircase2 cooker, these importers accept general scenes with reported approximations: unsupported features become documented fallbacks, and the scene is fitted to the LUSCN limits in Ludus::SceneFormat's import profile (256 meshes/materials/textures, 1024 objects, 256 MiB texels and 384 MiB encoded bundle). Complete geometry is retained or rejected against the byte budget. Version 7 retains linear base-color factors independently of decoded textures; constant swatches already include their factor. Every compromise is recorded in a deterministic, versioned JSON import report. Authored pbrt lighting that cannot fit without losing sources or energy rejects explicitly; decorative glTF/OBJ emission is dropped with a diagnostic instead. All front-ends share one format-neutral intermediate representation and budget planner. See docs/development/best-effort-scene-import.md.

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/best_effort_import.h