Real Castle Generator - Procedural Medieval Castle & Fortress Generator
u3d
$64.90
(no ratings)
Jump AssetStore
Generate a complete medieval castle from a seed — curtain walls, hollow towers with cones, pyramids and turrets, a gatehouse with working gate leaves and a portcullis, a keep, inner buildings, baileys and an optional hand-dug moat with a working drawbridge — and walk it from the road to the top of its towers. Right in the Editor without Play mode or live at runtime, for the Universal Render Pipeline (URP) in Unity 6.3 (6000.3.21f1).Two styles in one asset: switch the finished castle between Realistic (full PBR stone without visible tiling, dirt, damp, moss and wear, real water in the moat) and Cartoon (low-poly, hand-painted) with one setting, and pick the wall stone and roof colours - the materials change on the spot, nothing is rebuilt.Pick a preset or set your own parameters and press Generate. Every seed gives a new, believable castle, and the same seed always gives the same one, in the Editor and in your builds. Drag a slider and the castle rebuilds while you drag: size, corners, wall height, the number of towers, storeys, baileys, the moat, ruin.New in 1.1- An enterable keep in every Realistic castle that has one, built floor by floor to the plan: a vaulted undercroft with a well, a guard room up a forebuilding stair, the great hall, the solar with a chapel oriel, lodgings, and a wall head with hoarding and corner turrets. Every room is furnished - stores and a wine rack, armour and weapon racks, the high table with its throne under chandeliers and tapestries, the lord's bed, desk and books, an altar, beds, a cradle and a loom - and lit by its windows, hearths and candles. A spiral stair joins the floors, a passage leads onto the wall walk, and the first-person walker climbs it all.- Detailed architecture: buttressed curtain bays, machicolated parapets, string courses, towers with batter and turrets, a vaulted gatehouse, halls with porches and chimneys, lean-tos against the curtain and a lived-in court. One switch brings back the lighter 1.0 shapes on the same plan.- A tiling PBR material library with weathering from the geometry: grime at the foot, drips under ledges, moss and damp.- 195 props placed by the castle's structure, 129 of them new: stores, carts, a market with awning stalls and trade tables, the smithy and stables, court life, trades in the lean-tos, war machines, a boat on the moat and a camp outside the gate - each with four levels of detail and shaped colliders, movable where it makes sense.- Five looks on the F3 Look panel (Natural, Cinematic Warm, Crisp Clear, Soft Storybook, Dramatic) with sliders, and two lighting presets, Day and Golden Hour.- The Cartoon style is unchanged from 1.0.A whole fortification, not a kit of parts- Curtain walls of 3 to 8 corners, regular or irregular, 28 to 160 m across and 4 to 14 m high, with a wall walk, battlements and an inner parapet.- Round, square or mixed towers at every corner and along the walls, of varied height: crenellated platforms, conical roofs on round towers, pyramid roofs on square ones, and small corner turrets on the keep, the gatehouse and square towers.- Every tower is hollow: a ground room, a chamber at the level of the wall walk, a vice (spiral stair) up to the roof platform, and arrow loops with splayed embrasures in every room.- A gatehouse with an arched passage and double timber gate leaves on strap hinges with a draw bar; where the hall above the passage is tall enough, a portcullis in its slot, raised by a windlass with chains and a counterweight. The gatehouse faces any compass bearing.- Posterns through the wall and open stone stairs up to the wall walk from every ward.- A keep of 2 to 7 storeys (enterable in the Realistic style), a great hall, a chapel, a timber gallery, stables, a kitchen, houses and workshops, a garden and a well.- Sub-castles: up to two baileys, walled courts against the main ring with their own towers and a gate tower from the main court.- Age from intact to ruin: breaches in the walls, collapsed tower tops and roofless buildings.Walk your castle- The wall walk runs on through every tower chamber and through the gatehouse hall, with doors from the courtyard and onto every wall; colliders sit under every step, stair and vice.- Tour camera (F5): a ride from the road through the gate and the courtyard, up a stair, along the walls and through the towers, scriptable frame by frame for trailers.- First-person walker (F4): a CharacterController sample that starts on the road at the gate: walk, run, look and hop, and hand the camera back with F4.- Always walkable: every building door, stair, postern and breach stays reachable from the gate.Moat, bridges and the gate at work (optional)- A dry ditch or a water moat around every ward, 5 to 18 m wide and 1.5 to 6 m deep — surveyed with parallel banks, or hand-dug with wandering banks, uneven slopes and a spoil heap.- At the main gate a drawbridge of oak planks that raises on its chains, a deck that rolls back into the gate passage, or a stone bridge; timber footbridges at the posterns and earth causeways at the breaches.- Work the gate from code, from the runtime panel or with the keys: F9 the bridge, G the gate leaves, P the portcullis, and Shift+F9 seals or opens the whole gate in order — leaves, draw bar, portcullis, bridge.Realistic and Cartoon materials- Realistic: tiling PBR materials, stochastically sampled to break up the repeat; the 1.0 shapes keep the procedural masonry shader. Dirt gathers at the foot of walls, rain streaks run down from ledges, moss and damp sit low, edges wear, and a waterline marks the moat. Full PBR oak for the gates and bridges.- Moat water with small waves, wind ripples, reflections of the sky and the castle, refraction, depth absorption and foam along the banks.- Cartoon: the same castle as low-poly, hand-painted stone with bold mortar, bright roofs and flat stylised water.- Wall stone (Natural, Limestone, Sandstone, Granite, Red Sandstone, Whitewashed) and roof colour (Natural, Slate, Terracotta, Copper, Blue, Charcoal) in both styles.- Simple versions of every material for low quality levels, and material sets you can duplicate and restyle.Light, sky and colour grade- Five looks for the Realistic style and a brighter Cartoon grade; a bokeh depth of field with auto focus (F10). They change only their own Volume.- An HDR sky of a clear day with fair-weather cumulus, rendered for this package in Blender Cycles.- Rolling hills out to the horizon, a meadow around the castle, and grass that keeps off the paths, the moat and the buildings (Low, Medium, High or off).Six presetsCourtyard Castle, Square Fortress, Hill Fort Ruin, Fortified Manor, Bailey Castle and Grand Fortress. A preset is only a starting recipe: every setting stays editable, and any castle can be copied as a small JSON recipe and pasted back.In the Editor and in your game- Editor: a generator inspector with Generate, New seed, a seed lock, the preset, Live and one foldout per settings group; every change is undoable. Save to scene turns the castle into meshes, materials and a prefab that live without the generator, with optional lightmap UVs.- A baked demo castle included - bake your own in one click: Save & Bake Lighting saves the castle and bakes its lightmaps, light probes and reflection probes.- Runtime: a uGUI panel (no IMGUI) with presets, seed, every setting, a Gatehouse row and an Explore row (Tour, Walk). Plan and geometry run on a worker thread and the objects are created in time slices, so the frame rate holds.- Export the plan of any castle as an SVG drawing: walls, towers, gates, buildings, stairs, doors and routes.Built for your code- Engine-free C# for the planner, the geometry compiler and the walking tour (no UnityEngine reference), deterministic and testable.- One component, CastleGenerator, with a small public API: LoadPreset, SetParam, Generate, Randomize, RecipeJson, the bridges and the gate (SealCastle, OpenCastle, CloseGate, DropPortcullis), the Built and MaterialsChanged events and a build report.- Every generated castle carries its plan ids and tags on each element, colliders, and markers for gates, the spawn point, camera spots and the moving bridges.AI Ready. Built to be driven by AI coding agents as well as by hand. Documentation/AGENTS.md gives Claude Code, Codex, Cursor or a Unity MCP bridge the exact entry points: the CastleGenerator component and its public API (LoadPreset, SetParam, Generate, RecipeJson, the gate controls), the six presets and every setting as plain data in CastlePresets and CastleParams, the tour camera, the walker and the colour grade, the Tools > Real Castle Generator menu commands, task recipes, and a Verify section with a ready batch check that plans, compiles and checks every preset and ends in a PASS line. An agent can build, tune and check castles without guessing.Media note: the background forest in the video is Real Millions of Trees 2D (sold separately). This package contains no trees; its landscape has hills and grass.CreditsThe interface uses the font Source Sans Pro by Adobe under the SIL Open Font License 1.1; see ThirdPartyNotices in the package.SupportQuestions and bug reports: the Real Castle Generator thread on Unity Discussions, or cgteamorg@gmail.com. Please include your Unity version and the recipe (Copy recipe).More from this family- Real Horror Hospital — procedural hospital and asylum horror level generator, the same live-generator architecture: https://assetstore.unity.com/packages/slug/415078- Real Underwater — the screen-space underwater effect whose water surface the moat builds on: https://assetstore.unity.com/packages/slug/406038- Dynamic Ivy — grow climbing plants over your castles: https://assetstore.unity.com/packages/slug/407934- Real Earth Planet — real-world terrain, roads and railways generator: https://assetstore.unity.com/packages/slug/412072

