我们使用此网站上的 Cookie 增强您的用户体验

Importing Terrain Data

Importing Terrain Data

In addition to manual terrain generation outlined in /articles/Intro To Terrain|Environments and Terrain Tools, you may create terrain by importing heightmaps and colormaps.

Importing a Heightmap

A heightmap is a 2D representation of a 3D terrain map, as viewed directly from above. Brighter areas of a heightmap will result in higher terrain like mountains, while darker areas will result in lower regions like valleys.

To import a heightmap in Roblox Studio:

  1. From the Home tab, click on the Editor button in the Terrain section.
  1. From the Terrain Editor window, click the Import button.
  1. In the Map Settings section, click the Asset ID field to select a moderated heightmap image which you’ve uploaded via the Game Explorer.
  1. If desired, enter new values for Position (the center of the generated terrain) and its Size in studs. Note that there is no enforced maximum on terrain dimensions and the system has been tested up to 16384×16384×1024 studs.
  1. When ready, click the Import button to generate a region of terrain from “Asphalt” material.

Using a Colormap

To specify terrain materials like grass or ice when importing a heightmap, you may include a colormap. Based on the colors “painted” on the image file, Roblox will generate terrain of the corresponding type.

To include a colormap when importing a heightmap:

  1. Once you select a heightmap, toggle on the Use Colormap switch in the Material Settings section.
  2. Click the Asset ID field below the switch and select an uploaded colormap image.
  3. When ready, click the Import button to generate a region of terrain using materials interpreted from the following RGB values. Colors not found in this table will be interpreted as the closest match.
Color RGB Value Material
[115, 123, 107] Asphalt
[30, 30, 37] Basalt
[138, 86, 62] Brick
[132, 123, 90] Cobblestone
[127, 102, 63] Concrete
[232, 156, 74] CrackedLava
[101, 176, 234] Glacier
[106, 127, 63] Grass
[102, 92, 59] Ground
[129, 194, 224] Ice
[115, 132, 74] LeafyGrass
[206, 173, 148] Limestone
[58, 46, 36] Mud
[148, 148, 140] Pavement
[102, 108, 111] Rock
[198, 189, 181] Salt
[143, 126, 95] Sand
[137, 90, 71] Sandstone
[63, 127, 107] Slate
[195, 199, 218] Snow
[139, 109, 79] WoodPlanks
[12, 84, 92] Water

Scaling Tips

Understanding the underlying terrain unit system can help with achieving specific features on your landscape:

  • Terrain is built on a system of voxels that have dimensions of 4×4×4 studs.
  • The importer settings are in studs.
  • When importing a heightmap/colormap, the default scaling factor is 1 pixel = 1 voxel = 4 studs. For example, a heightmap with a 5×5 pixel square will create a 20×20 stud square on the terrain.
  • If you provide map dimensions at a different scale, the importer will use scaling and smoothing to respect these dimensions. If you want sharp edges or steep drop-off in your terrain, it’s helpful to stay close to the default scaling factor.