feat: add OBJ loader city demo with two bundled 3D Synthezier cities
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 27 Sep 2026 19:05:28 +0000 (22:05 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 27 Sep 2026 19:05:28 +0000 (22:05 +0300)
commitaec4e44c3bf66dd9d35b8f1d37b4f1280c0f9480
treee661d04a085ee2471bfc2361a18799bc107e1145
parentf06e2e09a190a7cdad47166847d8141875bd0e8c
feat: add OBJ loader city demo with two bundled 3D Synthezier cities

Add ObjLoaderDemo, showcasing the engine's Wavefront OBJ loader:
two city models generated by the "3D Synthezier" QBasic program
are bundled as classpath resources with their shared MTL library —
city1 (a block of high-rises, 27k faces, lit only by one hero
light south-east above the rooftops) and city2 (a district of
cylindrical towers, 211k faces, sun plus a hero light high east).
On startup a chooser dialog, or --city=1|2, picks the city.

The scene is self-framing: the model's bounding box is recentered
on the world origin and the camera and sun are placed relative to
its bounding radius, so either city is framed and lit identically
with no per-model magic numbers. The upright/scale transform (180°
around X for the +Y-up export, 60x uniform scale) is baked into
the vertices at load, keeping local space identical to world space
so engine lighting and GI see the real light positions. main()
enables lightmapping and progressive GI; the deterministic
buildScene overload stays GI-free for golden images. Each hero
light gets a scaled marker glow so its position — and thus the
shadow directions — is visible in the scene.

Register the demo in the launcher and in DemoGoldens with a raised
channel tolerance (40) for the dark high-frequency city render,
and regenerate the house goldens against the updated engine. Bump
the aukio-3d dependency to 1.1.0-SNAPSHOT.
12 files changed:
Documentation/Screenshots/OBJ loader city.png [new file with mode: 0644]
Documentation/index.org
goldens/house-flat.jxl
goldens/house-straddle.jxl
goldens/obj-loader-city.jxl [new file with mode: 0644]
pom.xml
src/main/java/eu/svjatoslav/aukio/e3d/examples/goldens/DemoGoldens.java
src/main/java/eu/svjatoslav/aukio/e3d/examples/launcher/ApplicationListPanel.java
src/main/java/eu/svjatoslav/aukio/e3d/examples/obj_loader_demo/ObjLoaderDemo.java [new file with mode: 0644]
src/main/resources/obj_loader_demo/city1.obj [new file with mode: 0644]
src/main/resources/obj_loader_demo/city2.obj [new file with mode: 0644]
src/main/resources/obj_loader_demo/result.mtl [new file with mode: 0644]