Editor setup guide

PCG House Details Guide

A practical reference for the Details controls on BP_PCG_ModularHouse / ALambeerPCGBuilding: author one footprint and every floor with wall, room, opening and stair guides; then set the roof and materials, generate and read the result. Values below are class defaults unless a saved-map example is named.

Status: implemented; owner PIE pendingUpdated: 2026-10-05Units: cm unless labelled metres

Guide-only workflow

Select the house actor's Self Details in /Game/Lambeer/World/Maps/L_PCG_BuildingPreview/L_PCG_BuildingPreview, or place /Game/Lambeer/World/Environment/Procedural/BP_PCG_ModularHouse. The house uses one footprint on every floor. A newly placed house with no guides first generates an exterior shell with full slabs and a roof; an empty gable-wing list receives the fitted starting roof. It adds no rooms, openings or stairs. Add guides incrementally: missing rooms, entrances and stairs do not block generation; invalid supplied guides retain the previous output. There is no automatic interior room, wall, door, window or stair layout: you author the guides and regenerate. A closed Room Guide describes a zone; only an open Wall Guide produces an interior wall. Two rooms sharing a boundary use the same physical wall.

  1. Set Number of Floors; edit the closed FootprintSpline. Every house always uses this spline.
  2. On each floor, draw open Wall Guides and closed Room Guides; place Door and Window Guides. Add a Stair Guide only for a transition that should contain stairs; missing transitions retain complete slabs.
  3. Set roof, finishes and construction types (non-roof: Wood/Brick/Concrete; roof: Wood/Tile/Metal), then select named appearances. Click Regenerate Building, fix the first Validation Status error, then save the level.

Spline-only authoring verified on 2026-10-05: Editor/Game builds, 29 distinct PCG/persistence checks, fresh Blueprint placement and edited-house save/reload passed. See verification and remaining owner-only checks.

All guide coordinates are house-local centimetres. Floor 0 is the ground floor; Floor 1 is 320 cm above it and Floor 2 is 640 cm above it. Guides are Editor authoring actors. Generated geometry is saved for runtime; the house does not regenerate at BeginPlay.

House outline and floors

Details controlWhat it doesHow to use it
FootprintSplineThe closed spline always defines the exterior outline on every floor. There is no Rectangle mode or Width/Depth override.Select the FootprintSpline component, edit its points, then Regenerate Building. Old rectangular inputs migrate once to spline points; existing edited splines remain unchanged.
Layout → Number of Floors1–3 storeys at a fixed 320 cm floor rise.Author guides on Floors 0, 1 and 2 as needed; optional Stair Guides use From Floor 0 and 1.
Make Footprint Linear And PlanarSets footprint points to straight segments and local Z=0.Use after a dragged point becomes curved or changes height, then regenerate.
Apply Footprint PointsExplicit application of the advanced Footprint Point Import buffer.Use only when you intend to replace the current outline; normal viewport edits do not read that buffer.

Walls, room zones and openings

Guide/controlMeaningExample
Add Wall Guide / Wall GuidesAdds a linked, open WallSpline. Every straight segment is a physical 25 cm thick interior wall, emitted once. Moving/editing the guide snaps its points to the nearest existing house floor, preserving X/Y, and updates zero-based Floor. Regenerate also snaps before validation. Selecting Floor explicitly moves it there. Points must remain open and Linear; Make Linear And Set Floor Height repairs curve types explicitly.Draw one line between a bedroom and bathroom. Do not draw the same shared wall twice.
Add Room Guide / Room GuidesAdds a linked, closed RoomSpline that classifies a zone as Bedroom, Bathroom, KitchenLiving or Corridor. Zone boundaries are independent of wall centrelines and never generate walls. Wall Guide endpoints may remain free inside the house. Set Floor and, if needed, use Make Linear And Set Floor Height.Shorten a partition without redrawing its Room Guide. An open-plan floor may use one room zone and freestanding partitions.
Add Door Guide / Add Window Guide / Opening GuidesLinked markers centred on the selected floor's wall centreline. Doors are 100 × 200 cm with a separate frame and open leaf; exterior entrance doors belong on Floor 0. Windows are 100 × 150 cm with a 75 cm sill and only belong on exterior walls. Every connection and window position is explicit.Put a Door Guide in each wall needed to reach a room. Place a Window Guide away from wall junctions and doors.
Layout → WindowsEnables authored Window Guides. The house does not repeat windows automatically.Turn off for a window-free layout; keep on when any Window Guide is present.
Snap Opening To Nearest Valid Wall / Auto Snap Invalid Opening GuidesSnap a selected marker, or calculate invalid opening markers together during regeneration. Opening-only snapping changes position/yaw only if the complete house validates.Use the selected guide's Snap action for an individual edit; inspect Snap Status. For footprint edits, keep the adaptation option below enabled.
Auto Adapt Guides To FootprintPreserves interior points and free ends; adapts exterior contacts and parts outside a changed footprint. Plans Wall/Room/Opening Guides together, plus an out-of-bounds stair or roof-wing centre, then commits only a valid complete house. Guide moves are undoable.Keep enabled, edit FootprintSpline, then Regenerate Building and save the level. Opening sizes and stair dimensions remain fixed. Disable for fully manual footprint adaptation.

Angled wall ends are cut automatically during Regenerate Building to follow the exterior structural wall envelope. The cut stays concealed inside the exterior wall; free ends inside the house keep square caps. Guide splines are not moved. Save the regenerated map: mesh and collision use the same cut triangles, with no per-frame cutting at runtime.

Room zones may touch but not overlap and must retain valid polygon/footprint clearance; no minimum room area or bedroom side is enforced. Full wall coverage of zone boundaries is not required; partitions may end inside the house. Duplicated walls, invalid opening placement and windows crossing partition junctions still produce Validation Status errors; rejected generation retains the previous valid house.

Stairs and floor transitions

Add Stair Guide creates one linked marker. Set From Floor to the lower floor (0 for 1→2, 1 for 2→3), choose its position/yaw and Compact type. Compact uses the 225 × 350 cm U stair; otherwise it uses the 300 × 400 cm L stair. Each authored transition uses its own guide and may have a different position or angle. Stair Guides are optional; no guide means no stair and no slab hole. The slab above leaves a hole for that transition. Generation checks containment of the stair footprint, lower approach and upper landing without silently relocating the guide. Connected circulation is not validated.

Example: to connect every floor of a three-floor house, add two Stair Guides at From Floor 0 and 1; it also generates with zero or one. A single-floor house needs none.

Roof, finish layers and material roles

Details controlEffect
Layout → Roof / Roof Pitch, Roof Overhang CmFlat or gable roof; gable pitch defaults to 30°, overhang to 50 cm. For a spline gable, Spline Roof Wings Centre/Yaw control ridge directions; Fit Roof Wings To Footprint supplies an editable starting fit.
Layout → Floor Finish / Ceiling Finish / Exterior Wall FinishSeparate 1 cm finish geometry and gameplay pieces. Floor Finish is above each slab; Ceiling Finish is below room ceilings; exterior finish covers the outside face and gables.
Building → Piece TypesNon-roof parts choose Wood/Brick/Concrete; Roof chooses Wood/Tile/Metal. Gable infills follow wall resources. Self and SplineSurfaces expose the same controls; no raw MI override or pool is editable on a house.
Floor / Ceiling / Exterior Wall Finish TypeThe chosen type determines both the finish MI and its gameplay resource tier.
Building → AppearancesChoose a stable named variant per part, filtered by its resource. Floor Finish Appearance controls the walking finish. Regenerate retains choices; Randomize Appearances explicitly rerolls. Save the level after selection.
Building Piece Data AssetsUnder /Game/Lambeer/World/Environment/ModularKit/Data/Pieces, edit Resources: permitted resource, Required Units, Default Variant Id and shared Appearance Set. Sets live in the sibling Data/Appearances folder and own named variants, previews and MI slots. Fixed Slot Materials preserves glass. Regenerate and save the house after changing definitions.
Building → Inspection → Hide Roof / Hide Floor 1–3Editor visibility only, without regeneration. Hide Roof includes gables, louvers and top ceiling. A hidden floor includes its walls, openings, outgoing stair, slab and finish, so the floor below remains visible. The generated geometry and collision stay intact.

Regenerate, inspect and recover

Window zone boundaries: a 100 cm window plus 25 cm clearance on each side currently cannot partly cross a Room Guide boundary, even without a physical partition. See the exact example and remaining decision.

Wall Guides snap to the nearest existing floor after editing and on regeneration. User-authored circulation does not block generation. See the remaining validation audit for zone overlaps, opening fit and stair containment; room size minimums are retired.

Regenerate Building validates guides, updates baked surfaces and PCG mesh instances, and reports the first blocking problem in Validation Status. A guide's Regenerate House calls the same house action. Auto Regenerate responds to committed house Details changes and finished house moves; edit a guide spline or marker, then regenerate explicitly. Generated Room Summary reports the authored room counts; Planned Piece Count reports the planned pieces. Clear Generated Building removes the existing output. Keep Building Graph set to PCG_ModularHouse.

Typical validation corrections
  • Overlapping Wall Guides: draw each physical wall once; adjacent rooms share that line.
  • Disconnected or narrow walking space: generation is allowed; review gameplay access yourself.
  • Window conflict: move or snap the Window Guide away from a corner, door, partition junction or stair.
  • Invalid height/curve: set the guide's Floor, use its Make Linear And Set Floor Height action, then regenerate.

Worked setups

Saved one-floor preview

PCG_GuidedRooms_Example uses a five-point Spline footprint, six open Wall Guides, three closed Room Guides (Bedroom, Bathroom, KitchenLiving), and explicit door/window markers. Select any guide, adjust its spline or marker, run Regenerate House, and read the house's Validation Status. The former Rectangle and two L preview houses were removed when guide-only authoring replaced their automatic layout.

New two-floor L

  1. Place a house, draw one closed L footprint and set Number of Floors to 2.
  2. Draw the ground-floor and upper-floor Wall/Room Guides at local Z 0 and 320 cm. Place every required Door/Window Guide on its floor.
  3. Add one Stair Guide with From Floor 0, then set roof wings/construction types. Regenerate, resolve any validation message and save the map.

Source and validation boundary

Implementation: Source/Lambeer/Building/PCG/LambeerPCGBuilding.h/.cpp, LambeerPCGRoomGuide.h/.cpp, LambeerPCGGuideAdaptation.h/.cpp, LambeerPCGSplineLayout.cpp and LambeerPCGGuidedRooms.cpp. The canonical gameplay decisions are in FEAT-BUILDING. Finish tiles use the existing world persistence path; structural HP and locks remain separate later work.

Editor/Game Win64 Development builds and all 41 scoped automation tests pass with zero errors/warnings as of 2026-10-05, including 25 PCG Building tests. Shared appearance sets, filtered Roof/Gable resource menus, actual selected surface materials, stable Regenerate, explicit reroll and both preview houses' save/reload were verified. See the shared appearance verification. Earlier footprint-adaptation evidence had one unrelated Editor HTTP timeout warning. The owner's edited footprint regenerates successfully, preserving interior guides and adapting boundary contacts. See the footprint verification record and angled-cut coverage. Only the owner starts PIE; inspect both sides of angled junctions and walk every route. Visual Undo, multi-floor stair adjustment, client appearance/rejoin and multiplayer finish removal require owner acceptance.