Make Your Own Terrain Chunk
RustEdit PlusYou can make your own terrain chunks and place them like the built-in ones. A chunk is a folder with a chunk.json file and some PNG pictures. Put your chunk folders in your Terrain Chunks folder.
Where your chunks go
- Open , then Paths, and set Terrain Chunks to a folder. When no folder is set, RustEdit uses the
TerrainChunksfolder in its own folder. RustEdit does not make that folder: make it yourself. - Make a folder for each chunk inside it, for example
TerrainChunks/my_mountain. - Put the chunk's files in that folder.
- Restart RustEdit. It reads the chunks when it starts, so restart it each time you add a chunk or change its files. Your chunk shows in the Terrain Chunks folder of the Content Browser, under its kind.
The folder's name is the chunk's ID: scenes remember a chunk by it. Do not rename the folder of a chunk that your scenes use.
A chunk whose folder has the same name as a built-in chunk's ID takes that chunk's place, also in scenes that use it. A built-in chunk's ID is its name in small letters with _ for each space, such as mountain_peak for Mountain Peak. Only Sand Dunes is different: its ID is dunes. The built-in chunks are packed inside RustEdit, so you cannot copy their files.
The files
| File | Needed | What it holds |
|---|---|---|
chunk.json | Yes | The chunk's name, kind, size and own settings. See chunk.json. |
height.png | Yes, or splat0.png | The shape, in gray. Black is the lowest point, white the highest. |
splat0.png | No | Ground textures: red is Dirt, green Snow, blue Sand and opacity Rock. |
splat1.png | No | Ground textures: red is Grass, green Forest, blue Stones and opacity Gravel. |
biome.png | No | Biomes: red is Arid, green Temperate, blue Tundra and opacity Arctic. There is no channel for Jungle. |
mask.png | No | Where the chunk changes the map, in gray. White is full, black is not at all. The edge Fade works on top of it. |
A chunk needs height.png or splat0.png. Without height.png, it has no Apply Height switch and only paints. Without a splat picture, it has no Apply Splat switch. RustEdit does not read other files in the folder.
How RustEdit reads the pictures
Chunk pictures are read a little differently from brush and stamp pictures (see How RustEdit reads your pictures):
- The top of a picture is north, before you turn the chunk. Its width runs along the chunk's Width (X), its height along the Length (Z).
- Each picture is stretched over the whole chunk, so the pictures can have different sizes.
- Save
height.pngas a 16-bit grayscale PNG, not interlaced, for smooth slopes. An 8-bit picture also works, but its slopes show steps. In a color picture, RustEdit reads the red channel as the gray. - In
mask.png, RustEdit reads the gray, or the red channel of a color picture. - In the splat pictures, the eight amounts at each pixel should add up to full. Where all eight are 0, the map keeps its own ground textures. Where they add up to less than full, the chunk's textures mix with the map's.
- The biome picture works the same way: where its four amounts are 0, the map keeps its own biome.
- The fourth amount of a splat or biome picture is its opacity. A PNG saved without opacity (transparency) has no fourth amount. To use Rock, Gravel or Arctic, save the picture with opacity.
chunk.json
An example:
{
"Name": "My Mountain",
"Category": "Mountains",
"Description": "A tall peak with a snow cap.",
"Width": 800,
"Length": 600,
"Height": 200,
"Base": 0,
"Mode": "Raise",
"EdgeFade": 0.03
}
| Key | Default | What it does |
|---|---|---|
Name | The folder's name | The name in the Content Browser and the Chunk list. If two chunks have the same name, one of them gets its folder's name after it, in parentheses. |
Category | Other | The kind: its folder in the Content Browser and its name in the Kind list. Use a built-in kind, such as Mountains, to add the chunk to it, or a new name for a new kind. New kinds come after the built-in ones, A to Z. |
Description | None | A few words about the chunk. RustEdit gives them to AI apps that list the chunks. |
Width | 500 | The size in meters along X at scale 1. It must be above 0. |
Length | The Width | The size in meters along Z at scale 1. It must be above 0. |
Height | 100 | The meters from black to white in height.png at Y scale 1. It must be above 0. |
Base | 0 | The gray of height.png, from 0 (black) to 1 (white), that sits at the chunk's position. Use 0 for a mountain, so its foot is on the ground. Use 1 for a canyon, so its rim is on the ground. For an island, use the gray of its beach. |
Mode | Raise | The chunk's own Mode: Blend, Raise, Lower or Add. See Modes. |
EdgeFade | 0.03 | The chunk's own Fade, from 0 to 0.5. |
Write the keys as they are in the table: capital letters count. Write numbers without quotes. A key that is missing, or a number in quotes, gets the default.
Troubleshooting
| Problem | What to do |
|---|---|
| Your chunk is not in the Content Browser. | Restart RustEdit after you add a chunk. Check that its folder is right inside your Terrain Chunks folder. In the Notifications panel, look for a line that starts with "[TerrainChunks]": it says why a chunk was left out. For example, Width, Length and Height must be above 0, and the folder must have a height.png or a splat0.png. |
| The slopes of your chunk look like steps. | Save height.png as a 16-bit grayscale PNG that is not interlaced. |
| Someone else's scene uses your chunk, but it puts no ground there. | Send them the chunk's folder. They copy it into their own Terrain Chunks folder and restart RustEdit. |