Navigation

Mondstadt buildings

A Mondstadt house is generated from its parameters by createMondstadtBuildingGeometries, one of the world's region kits, built on the engine's kit primitives. It returns one merged geometry per material, so a building is one draw for each of its four materials. Nothing is read from the game: every part is a box or an extruded gable, placed by the parameters alone. Mondstadt City's first house stands in the region's data as a building landmark.

flowchart TD
  OP[MondstadtBuildingOptions: footprint, storeys, jetty, roof rise, dormers] --> GF[Stone ground floor and chimney]
  OP --> ST[Each storey: plaster box, overhanging by the jetty]
  ST --> TF[Timber corner posts and top beams, standing proud of the plaster]
  OP --> RF[Gable prism from the top storey's eaves, plus dormers at each slope's middle]
  GF --> OUT[MondstadtBuildingGeometries: stone, plaster, timber, roof]
  TF --> OUT
  RF --> OUT

Parameters

  • Footprint. The width runs along the gable walls and the depth along the front and back walls, in metres.
  • Ground floor. A stone box of the given height, the footprint's full size.
  • Storeys. Each storey is a plaster box. The front and back walls of each storey extend the jetty beyond the storey beneath it, so the overhang accumulates by one jetty per storey. The gable walls do not overhang.
  • Timber frame. Each storey has a timber post at each corner and a beam along the top of each wall. A timber member's outer face stands a few centimetres proud of the plaster so it reads as a frame.
  • Roof. A gable whose ridge runs along the width, with eaves overhanging the top storey by a fixed amount. Its rise is a parameter.
  • Dormers. A count per slope, spaced evenly along the width and set at each slope's middle, with their bases sunk slightly into the roof.
  • Chimney. A stone column a quarter of the way along the width, rising past the ridge.

Key files

FileRole
packages/genshin-world/src/services/mondstadt/createMondstadtBuildingGeometries.tsThe house from its parameters: four materials, one geometry each
packages/genshin-world/src/services/mondstadt/constants.tsThe eave, timber, dormer and chimney dimensions
packages/genshin-world/src/models/mondstadt/MondstadtBuildingOptions.tsThe parameters a house takes
packages/genshin-world/src/models/mondstadt/MondstadtBuildingGeometries.tsThe four geometries a house returns, one per material
packages/genshin-engine/src/kits/mergeGeometryParts.tsMerges each material's parts into its one geometry

Not built yet: the house's dressing (window boxes, shutters, lanterns and banners), the windmill, and the city wall, gate bridge and cathedral. The windmill, the walls and the cathedral are landmark-tier pieces that need their reference poses.

Details

Command palette

Keyboard shortcuts