Terrain Editor changes – FAQ

Posted

by

Last Friday, we released an update that included major changes to the legacy map editor as we work to merge the two different map editors (the legacy editor, and the devkit) together.

In retrospect, it was an obvious oversight to not have made any new guides or videos explaining how the merged terrain tools work. In the meantime, we have compiled a list questions that have been frequently asked, along with the answers to those questions.

What is the “Tiles” tab for?

Maps are split up into tiles (sometimes called “chunks”). Each tile can support up to eight unique materials. This is useful for biome variety, as the old terrain tools only allowed for eight materials across the entire level (rather than per tile/chunk).

The Tiles tab is used to manage the materials assigned to a tile.

Q: Why is material painting only working with a few materials?

Each terrain tile/chunk can have up to eight unique materials, but auto-converted maps will have all of the eight layers filled already. When you try to paint a ninth material onto the tile, it cannot find an empty slot. The solution is to reassign an unwanted layer.

  1. Open the Terrain > Tiles tab.
  2. Click on a terrain tile to select it. In the bottom right of the screen, you can see the eight layers and which materials have been applied to the tile.
  3. Click on one of the eight layers to select it. The selected layer is shown in the top right of the screen. You can now click a material from the material list to replace it.
  4. Painting the reassigned material should now work!

Q: How to bake materials?

Baking the entire terrain at once has been replaced with “auto foundation” and “auto slope” options. While not as immediate a result, this scales much better for large maps with a variety of biomes and elevation.

If you want to quickly use settings per-material you can configure them in a custom material asset and then paint with the Auto [W] brush. Some of the core/vanilla materials have these settings pre-configured. For an example, open the Peaks_Dirt_00_Material.asset in a text editor.

Q: How to bake trees (or grass)?

Tree baking is still available! The Details and Resources tabs were merged into the Foliage tab. With the Terrain > Foliage > Bake [E] tool, automatic grass and tree placement works the same as before.

Q: How to manually place trees (or grass)?

Trees can either be indiscriminately painted over an area (based on your Density Target), or placed exactly.

  1. Open the Terrain > Foliage tab.
  2. Equip the Paint [Q] tool for bulk placement over large areas, or Exact [W] for individual placement.
  3. Select a foliage asset from the list on the right side of the screen.
  4. Click on the terrain to add, or hold [Shift] to remove.

Q: How to fix red checkerboard or other incorrect materials?

If a material on your map’s terrain has been replaced with a checkerboard pattern or some other incorrect material, this means that the game was unable to figure out which material was originally being used.

An example of a map whose terrain has been replaced by checkerboard materials.

Unfortunately, the old terrain only stored the name of the texture—for example, “grass.png”. In which case, maybe PEI’s grass material ended up being the wrong match for your map’s terrain, or if the texture name was entirely unknown then a checkerboard material was used.

Fortunately, all of the material placement has been preserved. So, it should be a relatively easy fix to correct the materials.

  1. Open the Terrain > Tiles tab.
  2. Click on a terrain tile to select it. In the bottom right of the screen, you can see the eight layers and which materials have been applied to the tile.
  3. Click on one of the eight layers to select it. The selected layer is shown in the top right of the screen. You can now click a material from the material list to replace it.
  4. When you are happy with the fixed materials you can click “Copy Layers to All Tiles” to apply your changes across the entire level. This button will replace the layers of all other tiles, so it may only be useful for newly-created or newly-converted maps.

Q: How to convert custom Materials.unity3d file?

If any of the textures in your file were from official maps, it should be an easy fix of re-assigning them in the Tiles tab. Refer to “How to fix red checkerboard or other incorrect materials?” for more instructions.

If you had custom textures in your Materials.unity3d file, then there are more steps to the conversion process. On the bright side, once finished you will be able to utilize more than the original limit of eight custom textures.

  1. The Materials.unity3d file needs to be converted to the “master bundle” format. The easiest option, especially if you don’t still have the Unity project, is to simply rename the file. Just rename the file to something such as “MyCustomMapMaterials.masterbundle” and create a MasterBundle.dat file.
  2. Move these files into your map’s Bundles folder. For more information on master bundles, refer to our official documentation on Asset Bundles.
  3. Create a Landscape Material Asset in your map’s Bundles folder for each custom material on your map. An easy way to do this would be to copy one of the materials from Unturned‘s Bundles/Assets/Landscapes/Materials directory, change the GUID to a newly-generated one, and then update the “Name” and “Path” paths to your master bundle and texture name respectively.
  4. For example, the core/vanilla master bundle name is “core.masterbundle“. Your custom master bundle name might be “MyCustomMapMaterials.masterbundle“.
  5. If you cannot remember exactly what the texture names were, you can open the .unity3d file in a text editor (such as Visual Studio Code or Notepad++), and use Ctrl+F to search for “assets/“. For example, in the old PEI map’s Materials.unity3d it looks like one of the texture names was: assets/game/bundles/terrain/devtest/materialspei_current_tweaked_alpha/grass.png
  6. Your texture name’s file path should be relative to the Assets_Prefix set in your MasterBundle.dat file. For example, if I had set Assets_Prefix to “assets/game/bundles/terrain” then I would set the “Path” path to “devtest/materialspei_current_tweaked_alpha/grass.png“.

Q: How to convert hole volumes?

Converting hole volumes to painted holes is recommended, but optional. The main benefits are that painting holes is easier and unlimited. When you delete a hole volume the auto-painted area is preserved.

Tidying up a converted hole volume on the Germany map.

So, what we did for Germany, Hawaii, and Greece was delete all of the hole volumes, save, and then tidy up the edges with the Terrain > Materials > Cut [R] tool, and add some boulders to cover any gaps.

Q: Why are hole edges jagged now?

Previously, each pixel of the terrain was tested against the hole colliders which meant they had pixel-perfect precision, but did not scale well with larger numbers of holes. Now the holes are represented as a texture which has approximately the same resolution as the heightmap. The loss of precision is unfortunate, but in my opinion getting rid of all the hacked-together physics workarounds and limitations was worth it.

You can use objects such as boulders to cover up the edges of a hole, and help blend them more seamlessly into the environment.

Q: How to fill holes in the terrain?

Hold [Shift] while clicking with the Terrain > Materials > Cut [R] tool.

Upcoming changes

We’ve received much feedback regarding this latest round of changes to the map editor. We hope to further improve on these changes soon, based on your feedback.

Manually removing individual baked trees and grass will be added in the next update with a new hotkey. By default, they are filtered out from the removal brush because there are often so many compared those that have been manually placed.

Upcoming updates will also contain various minor quality-of-life improvements as well. Such as, a search bar for foliage, or per-tool strength settings for brushes.

Categories

Archives

Discover more from Smartly Dressed Games Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading