Dungeon Architect for Unity 1.20 Help

Landscape Transformer

Dungeon Architect supports non-destructive landscape transformations around the generated dungeon

To see this in action, clone the Landscape transformer sample from the launchpad

Ut 13 01

You can build your dungeons on top of an existing landscape that has painted textures and foliage

Ut 13 02

The heightfield, paint and foliage around the dungeon would be modified

Ut 13 03

This is non destructive, so when you destroy your dungeon, the original landscape data (height, paint, foliage etc) in that area is restored

Right now, the Grid Builder and City builder support landscape transformations

Setup Landscape Transformer

To add support for landscape transformations, perform the following,

  1. Move your dungeon game object to the location where you'd like to build your dungeon

    Ut 13 04
  2. Add the LandscapeTransformerGrid or the LandscapeTransformerCity component to your dungeon game object, depending on the builder

    Ut 13 05
    Ut 13 06
  3. This script requires the terrain game object reference so it can modify it.

    Ut 13 08
    Ut 13 07
  4. To support non-destructive landscape modification, Dungeon Architect needs to save the state of the landscape in the area where it modifies it, so that it can restore it later on (when the dungeon is destroyed or modified)

    Create a landscape restoration cache asset

    Ut 13 09
    Ut 13 10
  5. Assign this to the Lanscape Transformer script

    Ut 13 11
  6. Assign the Elevation curves so we have a smooth transition from the existing terrain to the dungeon

    Ut 13 12

    Click on blank area to open up the curve editor. Choose one of the values highlighted below

    Ut 13 13
    Ut 13 14

    Close the curve editor

    Ut 13 15

    Do the same for Corridor Elevation Curves

    Ut 13 16
    Ut 13 17
  7. Build the dungeon

    Ut 13 18

    Destroy the dungeon to restore the terrain back

    Ut 13 19

Setup Paint Support

You may paint your terrain around the rooms, corridor and cliffs by applying your existing terrain layers. Since you already have a terrain, you would have setup terrain layers to paint your terrain. If not, find more info about Terrain Layers here. We'll paint the rooms with a certain terrain layer

Ut 13 20

Create a new Texture entry and add an existing Terrain Layer

Ut 13 21
Ut 13 22
Ut 13 23

Set the Texture Type to Room or Corridor.

Set the Road Blur Distance to 1

Ut 13 24

Now build your dungeon

Ut 13 25

Add a corridor texture

Ut 13 26
Ut 13 27
Last modified: 24 January 2024