Skip to content

Creating new regions

Artyom Zuev edited this page Dec 15, 2025 · 20 revisions

This article will demonstrate how to create a mod expanding the world of Phantom Brigade. It'll cover the recommended workflow for creating the 3D landscape, configuring the landscape in the SDK, extending the province database to place your landscape in the world and setting up a mod utilizing the AssetBundle system to sideload your assets. Make sure to read the Creating asset mods article before proceeding.

t11_00_header.png

Asset structure

Before we get to setting up the mod, we need to learn the parts that regions (provinces) in PB are built from. Let's start with the visual assets and go over the data (configs) later. As covered in Creating asset mods, the assets will be located in the Assets/User/ folder. The highest level asset is a Prefab with a special component called OverworldLandscapeRoot:

t11_01_asset_prefab.png

The OverworldLandscapeRoot component provides a number of references to the landscape system. They include the main terrain mesh (3D model of the playable area), the skirt mesh (3D model of the background area extending to horizon), textures (albedo, normal, splat map) and some optional values. With the data from this component, the landscape system can display the terrain to players at runtime.

Let's take a closer look at the two 3D models:

t11_04_meshes.png

Finally, let's take a look at the textures. The main textures used by majority of landscapes are:

t11_02_asset_tex.png

  • Main texture (usually named tex_color_out):
    • Usually an 8-bit RBGA PNG with 2048x2024px resolution
    • Unity import settings: Default type, sRGB on
    • RGB stores albedo color
    • A stores the water mask
  • Splat texture (usually named tex_splat_out):
    • Usually an 8-bit RBG PNG with 1024x1024px resolution
    • Unity import settings: Default type, sRGB off
    • R stores mask of flat areas
    • G stores mask of slopes
    • B stores mask of smooth areas like snow
  • Optional normal texture (usually named tex_detail_normal):
    • Usually an 8-bit RBG PNG with 2048x2048px resolution
    • Unity import settings: Normal map type
    • RGB stores a tangent normal map

Now that we know what assets we need (meshes and textures), we can look into ways to make them using external software like Gaea 2. Once we're done with the assets, we'll return to the SDK to continue setting up the landscape.


Creating assets in Gaea 2

t11_05_gaea0.png

The assets for the terrains can be created in any 3D software such as Blender, but we recommend using Gaea 2: it is the software that was used for built-in terrains in Phantom Brigade and it produces highly realistic results with minimal setup. The free version is limited to 1024x1024px exports, but it should be sufficient modding purposes. You can download Gaea 2 here.

This tutorial will cover the specifics of using Gaea 2 to generate terrains for Phantom Brigade. We recommend getting familiar with the fundamentals of Gaea 2 (like camera navigation, general UI, basics of node use) before continuing this tutorial. Check out the Learning portal on their official website, look up quick start tutorials on YouTube (such as this one). You can also check official templates installed with Gaea 2 for inspiration.

Project settings

Let's go over setting up a Gaea 2 project file. There's a number of details that we need to get right to get the exports in the right place and to get the results matching built-in terrains. Start by selecting File > New option and choose a folder for your project. Make sure to set up the project within the SDK folder, under Assets/Users/. For example, create Assets/Users/mod_landscape_02, like so:

t11_05_gaea1.png

Choose a filename matching the folder name:

t11_05_gaea2.png

With the project created and open, go to the project build settings (Project > Build Settings) and change Build destination to <FileLocation>\Build\. Make sure File overwrite mode is set to Overwrite:

t11_05_gaea4.png

Next, go to the Terrain tab of project settings, set Width to 16834 and set Height to 2048:

t11_05_gaea3.png

Finally, check the terrain resolution on top of the main window. If you're using the free version, set it to 1024x1024, otherwise set it to 2048x2048.

t11_05_gaea5.png

Node graph: Terrain shape

With the initial setup done, let's create a very minimal node graph. Our goal here is to learn what it takes to generate all the necessary assets, so we'll keep the node graph simple and focus on its outputs, not on producing a particularly complex terrain. You can always extend the graph later to give it a more intricate shape and texture.

Quick reminder: you can select a node and press F to force Gaea to render it in the viewport. If you can't see the output of a given node, make sure you're not focusing another node, select the one you want to see and press F. You can exit focus mode by pressing F again.

To start, create a simple Mountain node. Click the Autolevel button at the bottom to make the mountain span 100% of height range of the terrain. Set its scale to 0.25 to leave some flat ground for players to drive on. Then, add another node called Rugged: it will be a layer that adds visual interest to the flat area around the mountain. The graph should look like this:

t11_06_nodes1.png

Next, let's combine both features we made into one terrain. Create a Combine node and connect Mountain and Rugged to it. This is a very common operation and you can speed it up by simply dragging from one Out port to another Out port. To keep things simple, keep Ratio at 0.50, keep blend mode at Blend and just add Autolevel at the bottom to keep the terrain tall. If you're interested in more precise mixing, try Hypotenuse and other blend modes later on:

t11_06_nodes2.png

Next, let's add an EasyErosion node and connect the Combine output port to it. Our goal here is to go through each common node type, so particular settings do not matter, but Simple mode on EasyErosion is a quick way to get an appealing eroded terrain. If you're interested in fine tuning erosion, consider Erosion2 node. The graph should look like this once you're done:

t11_06_nodes3.png

Next, let's add a Rivers node to the chain. Rivers are a great way to break up the landscapes: water catching the light makes the terrain much more believable and stops it from looking like a matte plastic model. The specific settings do not matter for now:

t11_06_nodes4.png

Next, we need to set up portals. As the graph grows, you will have a large number of places that need the height of the terrain or depth of the water as inputs. You can keep dragging connection lines between outputs and inputs, but the graph can quickly start looking like spaghetti and will become harder to read. The portals are essentially variables. You can turn any output port into a named variable and make any input port read that variable, resulting in a much neater graph.

To start, create Adjust nodes (shortcut fx) connected to the Out node and Depth outputs of the Rivers node (toggle Autolevel on the Adjust node connected to Depth to make it a useful 0-1 mask for water). Once these Adjust nodes are created, select them, press F2 to rename them and name them Height and RiverDepth respectively. The variable names are based on the name of the node they start at, so naming them is an important step. Once the names are set up, select each node, press P to enter portal menu and press Convert to Portal > Out to turn the output node into a portal (variable):

t11_06_nodes5.png

If everything was done right, you should see this in your graph, with Out ports of both nodes lit up to indicate they've been turned into portals:

t11_06_nodes6.png

Node graph: Texturing

Next, let's move onto texturing this landscape. To start, create a TextureBase node. It provides a foundation for painting that other color nodes can rely on. To make the node work, you'll need to give it terrain height as an input. Select the node, press P, choose Connect to Portal > In and you're done:

t11_06_nodes7.png

Next, create a SatMap node linking to the TextureBase node. SatMaps are a powerful way to color your terrain: they use a lookup table that can turn a grayscale mask into color resembling real-world satellite images. Focus the SatMaps node with F and play with the different options until you find the right look. You can also adjust settings in the TextureBase if you'd like to adjust with how how much influence different features like erosion flows or ridges have on the color.

t11_06_nodes8.png

The next step is blending your colors. Let's keep it simple and simply blend your SatMap based color with a fixed color for the rivers. Create a Mixer node: this is a powerful tool for compositing different colors, similar to layer menu in Photoshop. Connect the In input port to your SatMap (this is similar setting the Background layer in Photoshop). Press P and connect the Terrain input port to the Height portal variable you created earlier.

The mixer starts with a single layer as an example. Select that layer in the mixer inspector. Set its masking mode to None (not Height or Slope). In the graph, create a Constant node, set it to Color mode and give it a dark blue color. Connect that Constant to Layer 1 input port on the mixer. Finally, select the mixer, press P and connect the Layer 1 Mask input port to the RiverDepth portal variable you've created earlier. You should get a result that looks like this, with rivers overlaid on top of your original colors.

t11_06_nodes9.png

You can keep creating more TextureBase + SatMap nodes and can keep adding layers to the mixer to create very complex looks. The mixer allows you to quickly mask layers by slope and height, so it's easy to set up differently colored cliff faces, greenery in the low lying areas, snow capped peaks etc. But we'll move on to the last type of texture treatment for now: adding ambient occlusion.

Create an AO node. Use the P to give it Height portal variable as input. Create a Combine done and combine the output port of the mixer with the output port of the AO node. Set Combine node mode to Multiply. You should end up with something like this:

t11_06_nodes10.png

With base color, water color and shadows in place, you have a very respectable looking terrain that can be expanded into a much more complex graph later on. For now, we need to move on to setting up export nodes. The graph you should end up with by this point would look like this:

t11_06_nodes11.png

Node graph: export

...


Configuring the landscape

t11_03_landscape_scene.png

Configuring the mod

...

Testing in the game

...

Clone this wiki locally