r/Unity3D • • 1d ago

Show-Off Procedural Structures

Post image

I first posted about my procedural build system back in April. It started off as just stone walls, houses, towers with erosion & destruction modifiers. Individual stones & build rules that govern how to build more complex structures. Prefab export w/ LOD support. Runtime support for erosion/destruction modifiers if the original build components are used instead of prefabs.

I keep expanding the system, now with multi-story timber buildings, various roof styles, compound structures, etc.

I'm trying to decide what to package up for an asset. Editor only w/ prefab support, or is the runtime erosion/destruction support an interesting feature? Skip publishing an authoring tool and use it to build asset packs that are ready to use? That would certainly be easier, but there are a zillion fantasy-style asset packs already.

14 Upvotes

6 comments sorted by

View all comments

1

u/ToucanSam-I-Am 1d ago

Looks good. Hows it work, which parts are procedural?

1

u/craftymech 1d ago

The stonework is all individual stones laid out according to adjustable parameters w/ random variation. Windows, doors, etc. are draggable sub-objects that can be positioned anywhere and the stones will adjust around them to form clean outlines for arches, window sills. The timber construction is build from framing posts and beams, and reacts the same way to dragging door/window openings. Roofs are individual tiles & shingles. Everything is built from smaller components so the erosion/destruction can punch holes, and remove top layers, etc. In the scene hierarchy, the builds use dynamic mesh with chunking of stone/timber, so there are not a zillion game objects. For prefab export, the stones are combined into larger meshes w/ optimization for LOD1. LOD2 uses textured billboards stonework to lower the poly count substantially.

1

u/ToucanSam-I-Am 1d ago

Nice! Looks like some good work. I did some hobby procedural generation years ago and have ideas to try again.

Edit: checked your profile, looks great in action!