Invocation

legaia-engine export-glb --scene town01 --out glb-export       # one scene
legaia-engine export-glb --all-scenes --out glb-export         # everything
legaia-engine export-glb --items --out glb-export              # every equipment item
legaia-engine export-glb --party --out glb-export              # Vahn, Noa, Gala field forms

It reads extracted/ or --disc <image.bin>. --scale sets glTF metres per PSX unit (default 1/128: one 128-unit walk tile is one metre, which reads right against a headset's real player scale). --include-sky keeps the sky shells the site viewers hide; --no-npcs and --no-props drop those families. --all-scenes skips cutscene labels, reports each scene's yield and continues past failures.

What one scene exports

glb-export/town01/
├── town01.glb        the assembled world (+ baked morph animation)
├── npcs/*.glb        one animated glb per catalogued placement
├── props/*.glb       animated placed props (windmills, doors)
├── music/bgm_*.wav   the scene's entry BGM as a seamless loop
└── manifest.json     transforms, labels and conventions

Everything is composed by the same kernels the browser viewers render with, so the export matches the on-screen pages.

Equipment items and the party

The manifest and its frame

manifest.json carries the scale and axis conventions, a suggested spawn (the median of the placed objects - the village centre, not the map's), and the placement arrays:

ArrayHolds
npcs[]file, kind (talk / door / prop), the dialog's first line, position on the retail floor sampler, clips. The position is where retail's spawn prologue actually puts the actor under fresh-game flags, not the raw placement tile.
doors[]portal placements with their target map
animated_props[]file, frame count, whether retail leaves the clip free-running (the windmill) or holds it for a script (a door), each instance's position and rotation, and door tags
teleports[]retail's intra-scene doorways, both families, as trigger boxes with a floor-sampled destination and arrival facing: a house interior is an unused corner of the same map
scene_portals[]town exits and overworld entrances: trigger box, target scene, arrival point in the target's frame
music, world_animthe BGM loop and the baked morph clip
PSX world X right Y down Z into the screen (x, y, z) → (x, −y, −z) Rx(180), determinant +1 Export (glTF) X right Y up Z toward the viewer a rotation, not a mirror: winding is reversed so retail's front faces stay front-facing
Both frames are right-handed, so one rotation is the whole conversion: stand at the eye retail's camera uses, look where it looks, and a glTF viewer draws what retail draws. The world glb, the NPC and prop files and every number in the manifest share this frame (conventions.world_frame: "psx_rx180"), and placement rotations carry all three authored angles, so a leaning plank keeps its tilt.

Verification, and what is approximated

Disc-free tests pin the handedness on a synthetic pitched, rolled and yawed record; a disc-gated test assembles town01, validates every glb container, and checks the sky filter, the prop split, both doorway families and the world-map gate portal, the door tags, the shoreline morphs, the ground's up-facing winding and every animated prop instance against its world twin.

Geometry, textures, packet-colour shading, placements, floor heights, the walk surface, the doorway data, the shoreline morphs and the BGM render are retail-parity kernels. A static export approximates the rest by design: NPCs loop a clip instead of running their scripts, non-door props free-run, a door swing becomes open-on-approach, and script doors are frozen at the cold-entry story state. The Unity kit layers optional realism passes (lighting, day and night, fog, grass, interiors, ambience) and furniture (a mirror, a video screen, a card table) on top, each generated from scratch; switching them all off restores the faithful build.

The playable slot machine

The kit also builds the casino slot machine as an in-world cabinet from a separate feed: asset slot-art decodes the slot overlay and its art pack into images and a manifest with the payout table, the scene-geometry tables and the retail projection constants. An editor menu composes the whole retail screen onto a cabinet's screen face through the retail software projection, and an UdonSharp port of the engine's slot rules drives it, checked against a committed rules-parity fixture. The cabinet model is the one thing you bring.

See also

Reference VRChat world guide Characters VR mode Full doc