Class VillageDemo

java.lang.Object
eu.svjatoslav.aukio.e3d.examples.village_demo.VillageDemo

public class VillageDemo extends Object
GI scaling test bed: a night-time village of multiple houses, each one to three floors, on an open ground plane with streets, street lamps and a distant moon.

Purpose: the House demo bakes in seconds, so it cannot stress the GI bake scheduling. This scene is big enough (~10k lightmapped quads, ~45 lamps) that generation times are measurable, which makes it the playground for ideas about staying fast and incremental on big worlds (distance-based lightmap resolution, incremental rebakes, work ordering).

Structure: every floor of every house is the House-demo layout (three rooms, two partition walls with doorways), with window openings in the exterior walls so interior lamps spill onto the street. One colored lamp per floor. The whole scene takes the GI path: interiors AND exteriors (two-sided walls get lightmapped backs from the engine wrap), and the ground plane bakes in its own composite at coarse units-per-texel so street lamps pool on the asphalt and moonlight grades the grass. Only far houses (via --lm=N) take the plain per-polygon path. Street lamps and house lamps together exceed the engine's default tracked-light cap, so this demo sizes e3d.gi.maxLights to its lamp count before the bake starts.

Run:

java -cp target/aukio-3d-demos.jar eu.svjatoslav.aukio.e3d.examples.village_demo.VillageDemo \
     [--cols=4] [--rows=3] [--floors=3] [--units=6.0] [--threads=4] [--lm=all|N]

--lm=N lightmaps only the N houses nearest the village center (the rest get plain per-polygon GI) — the manual knob for distance-based GI resolution experiments.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Village scale knobs, parsed from command line.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    buildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera)
    Golden-harness entry: deterministic default village.
    static void
    buildVillage(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, VillageDemo.Spec spec)
    Builds the whole village: ground, houses, street lamps, moon.
    static void
    main(String[] args)
    Entry point.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VillageDemo

      public VillageDemo()
  • Method Details

    • main

      public static void main(String[] args)
      Entry point. See class javadoc for the accepted --flags.
    • buildScene

      public static void buildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera)
      Golden-harness entry: deterministic default village.
    • buildVillage

      public static void buildVillage(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, VillageDemo.Spec spec)
      Builds the whole village: ground, houses, street lamps, moon. Public so headless GI harnesses can construct the scene without a window.