I been thinking of having Dungeon Architect also support more organic dungeons (e.g. caves) and realized that with some tweaks to the existing builder, it can be done to generate something like this:
Since it goes through the same pipeline, all the tooling (volumes, paint tool etc) will work seamlessly
The colorful grid based shot is from my C# prototype which I built before starting Dungeon Architect.
The Red squares are the rooms, red lines are the delaunay triangulation of the rooms, and the green lines is the minimum spanning tree of the triangulation (with some loop tolerance), which defines how the rooms are connected
The organic layout you see above is mostly in photoshop, but those actions can be performed in code.
's how I plan to go about it:
#1 The dungeon builder builds this kind of layout, if the Grid Builder is selected
http://i.imgur.com/ptEpR13m.png
#2 If the organic builder is selected, it would produce the exact same layout, except the rooms would be connected through a straight line (instead of being constrained to the XY axis)
It would also rasterize the layout in a 2D float array (to emulate the photoshop filters I’ve applied in the next steps) with cells as ellipses and corridors as thick lines
http://i.imgur.com/CUAUBXfm.png
#3 Apply a blur filter on the rasterized data grid
http://i.imgur.com/Wv2zJ3sm.jpg
[Photoshopped]
#4 Apply difference Clouds (Perlin noise applied on top of the existing data)
http://i.imgur.com/SyASzKPm.jpg
[Photoshopped]
#5 Adjust Levels (Add a multiplier and throw out data outside a certain range)
http://i.imgur.com/zkZ446Tm.jpg
[Photoshopped]
#6 Run this data through a marching square algorithm to create a polyline
#7 Add Wall markers through out this polyline, so you can define how your cave walls look in your theme definition file
#8 Triangulate the polyline using constrained delaunay triangulation to create the ground mesh (since I’m not sure if it will be a good idea to have ground markers)
http://i.imgur.com/OayjUTz.gif