# Level Step System

The Level Step system is the key aspect of terrain generation in World Creator and the main reason behind its fast terrain generation speed (aside from utilizing heavily GPU-optimized filters). This article briefly explains what the system is and how to make the most out of it.

## **What exactly is the Level Step system?**

When selecting a 1k terrain with 1/4th precision, World Creator does not only compute the terrain on a 4k map and display it to you. Instead, it iteratively works with an upsampling algorithm: starting on a 2x2px grid and increasing to 4x4px, 8x8px, and so on; doubling the resolution at each step.

This is the basis of the level-step interface that is present in each filter and various other UI elements throughout World Creator. As such, adjusting the strength of a filter at level 8 modifies the influence of that filter on the 8th texture in the upsampling chain, which equates to the 8th or 256x256px texture.

Upsampling allows World Creator to work with different resolution versions of a terrain, which significantly reduces rendering time. For example, with particle-based erosion, the sediment must move from where it is being eroded to where it settles. Sediment may have to travel considerable distances depending on the surrounding terrain. If this process is calculated on a high-resolution image, the sediment may have to travel several hundred pixels, all of which will need to be processed. Working at lower resolutions means that the algorithm requires fewer steps to cover the same distance on the map, resulting in a significant reduction in computation time.

An additional advantage of the upsampling workflow is the impact the lower terrain levels have on the shape of the entire terrain. This effect can be observed in the following pictures where the low and medium terrain levels mainly impact the overall shape of the generated terrain, whereas higher levels contribute minor details to the final terrain.

<div><figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2Ft3Uqd2bqyqjlcrcChFiY%2Fwalkthrough_levelsteps_01.webp?alt=media&#x26;token=64e84cf5-c4aa-4bc0-b009-f388b854316c" alt=""><figcaption><p>base terrain</p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2F6MIZzl5NNAJTgm9LOhbi%2Fwalkthrough_levelsteps_02.webp?alt=media&#x26;token=2290a862-217e-4f6f-ac0b-d60986284b25" alt=""><figcaption><p>low levels</p></figcaption></figure></div>

<div><figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FkGoSquVGOqpU4sSBNltw%2Fwalkthrough_levelsteps_03.webp?alt=media&#x26;token=24cf96ef-eaf7-4104-a42b-b951dd8f3df9" alt=""><figcaption><p>medium levels</p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FC8StcSfn38cG55svWOwR%2Fwalkthrough_levelsteps_04.webp?alt=media&#x26;token=ab65fd15-4730-442f-98fa-bcc85d2c784b" alt=""><figcaption><p>high levels</p></figcaption></figure></div>

This can again be observed clearly in the two merged images below. Although the combination of low and medium levels makes the most significant contribution to the final terrain form, the extra high levels are primarily useful for producing a more defined effect on the ultimate resolution.

{% hint style="info" %}
It's worth noting that this depends significantly on the filter and its settings. For instance, in this erosion process, the rain strengths used for each level are lower for the higher ones, which has a considerable impact on the outcome.
{% endhint %}

<div><figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2F06Vc7jQrvjuFVetoDSXh%2Fwalkthrough_levelsteps_05.webp?alt=media&#x26;token=1dc83272-cb72-4f1b-a87c-9983ea0dd614" alt=""><figcaption><p>low &#x26; medium levels combined</p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FhD2OcSUuj14fIws1ABgs%2Fwalkthrough_levelsteps_06.webp?alt=media&#x26;token=90e616a9-ff90-46d9-94ec-a0a88824eedb" alt=""><figcaption><p>final erosion</p></figcaption></figure></div>

## **Proper usage of the Level Step system**

### **Filters**

In general, filters operate more quickly on lower levels. That is because just about all filters/layers operate on a per-pixel basis. On level 8, it would represent 256x256px, i.e., 65,536 pixels. On the other hand, a texture at level 11 measures 2,048 x 2,048px, i.e., a total of 4,194,304 pixels.\
Even though modern GPUs are very efficient at executing such parallelized processes and World Creator employs highly optimized and sturdy algorithms, you can observe how the higher levels may become more expensive.\
To achieve maximum performance, try decreasing the higher levels to maintain a visually pleasing result and avoid unnecessary computational overhead. This is particularly true for the erosion and simulation filters because they frequently run multiple iterations per level per pixel, making higher levels even more costly.

### **Shape Layers**

Shape layers generally have a lower performance hit with the level system. When working with shape layers, the main consideration is how much detail you want to include in your terrain and how strong the filter effects should be.

By looking at the images below, it's clear that the shape layer becomes sharper as the level step increases because it's blended with the terrain at a higher resolution.

On the other hand, if you look at the same terrain with filters, you'll see that the effect the filter stack has on it diminishes at a higher level step. This occurs because the filters have fewer levels to carry out their work, and they tend to overlook the lower levels, which frequently have more significant effects on the general terrain shape. This was already explained above.

<div><figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FU0H0jzX5C18TLfxyfJ6r%2Fwalkthrough_levelsteps_07.webp?alt=media&#x26;token=c44a054c-2206-40c2-bb5f-97791cc4162f" alt=""><figcaption><p><em>low level base</em></p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FjOYsMuzByj2Na2JMJcDa%2Fwalkthrough_levelsteps_08.webp?alt=media&#x26;token=5df0a840-85a4-4ae1-8d84-3aa4e2b2eac3" alt=""><figcaption><p>medium level base</p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FU1qcdupDR0QhQBWlvrVw%2Fwalkthrough_levelsteps_09.webp?alt=media&#x26;token=3b5c3a3a-0f89-44a7-a49e-a4db1a3e437e" alt=""><figcaption><p>high level base</p></figcaption></figure></div>

<div><figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FXZ9kv60jZV8jBk39Fjy6%2Fwalkthrough_levelsteps_10.webp?alt=media&#x26;token=14bcffbb-792f-41b7-bfb1-43cbb698b73b" alt=""><figcaption><p>low level filter</p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FwX4gVOyEe10NWGgX3nVJ%2Fwalkthrough_levelsteps_11.webp?alt=media&#x26;token=28ef80df-56a1-42b1-b491-0f6279dae1ce" alt=""><figcaption><p>medium level filter</p></figcaption></figure> <figure><img src="https://2837684122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM6zsxw2jbMYEZbKqEwpa%2Fuploads%2FMOc2qRpLj9506vqHTkaz%2Fwalkthrough_levelsteps_12.webp?alt=media&#x26;token=39cb9413-7ffb-4a80-a8e4-6fce369acf03" alt=""><figcaption><p>high level filter</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.world-creator.com/walkthrough/terrain-setup/level-step-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
