HOW-TO: Import and export terrain tiles

 

 

2024-03-13_13-13.png

Learn how to export and import your terrain tiles from other projects or in some cases, even from external tools.


Export terrain tiles

Here’s how you can export some or all of your tiles.

  1. Open the Terrain Edit Tools.

  2. You can export terrain by selecting either a specific selection of your tiles or all of your tiles. Don’t have any yet? Create your terrain tiles (if you haven’t already), and assign a material for them in the Material tab:

 

image-20240311-140841.png

It’s important to keep in mind the resolution and LOD config that you are currently using, as it will be important to have your exported and imported tiles in the same resolution and settings later!

  1. You can select the tiles that you want to export by either individually selecting by Ctrl + LMB or by choosing the Select all tiles button at the bottom left corner of the Terrain edit dialog.

  1. Once you have your tiles selected, head on over the Import / Export tab and at the middle, under the Export Tiles button, select the Heightmap and colormap mode, then click on the Export Tiles button.

  1. In the Open-File-Dialog select the desired location for your exports. Once the editor is done exporting the tiles, you will see the following structure at your export path location:

 

  • t_output.csv: The filename may vary based on the name you gave at the Open-File-Dialog. This file is responsible for stating the offset and resolution of the exported tiles at the very top row. e.g. 0 - 0 - 32 - 32
    Where each digit does the following from left to right:

  1. There is 0 offset on the X axes. This number can be added to each tile's x coordinate as an offset value.

  2. There is 0 offset on the Y axes. This number can be added to each tile’s y coordinate as an offset value.

  3. The next two digits is basically the resolution X, Y axes wise. So the resolution is 32x32.

The rest of the rows are exact path info of all the exported tiles:

  • The two folders above the csv file,
    <filename>_input: Here you can add all the tiles that you want to import into the engine.
    <filename>_output: This is the place where all the exported tiles are located, each tile is in a png format, where the name states the x and y coordinate of the current tile.


Import terrain tiles

Imagine you have another project with an empty world, but you want to import all of the tiles exported from the previous one to import full terrain.

1. Open the Terrain Edit Tools,

Remember to set the exact same LOD config and resolution options as it was in the previous project.

  1. Then select Import full terrain. Now select the folder where all the exported tiles are located from the previous project, so that we can import them in here:

 

  1. You’ll be presented with the following dialog stating with some information before the import process:

  1. Click on Yes and wait until the process if finished.

  1. If you only want to import some of the tiles but not all of them from a previous world next to your already existing terrain, put the tiles that you want to import inside the <filename>_input folder, then navigate to the Import / Export tab, and select Import Tiles.

  1. Then select the previously exported .csv file that is located next to the <filename>_input folder.

______________________________________
The Witcher 3: Wild Hunt Complete Edition © 2024 CD PROJEKT S.A. Published by CD PROJEKT S.A. Developed by CD PROJEKT RED. CD PROJEKT®, The Witcher®, REDengine® are registered trademarks of CD PROJEKT Capital Group. All rights reserved. The Witcher game is set in the universe created by Andrzej Sapkowski in his series of books. All rights reserved.