Tag: chunk management

  • Understanding Unreal Engine Landscape Units

    Understanding Unreal Engine Landscape Units

    I’ve created many landscapes in Unreal Engine and never fully understood each unit. I just went by the Epic guidelines and never thought about it in depth until now. Here are my notes for posterity:

    Resources:

    Unit Hierarchy

    Ignoring world partitioning for now, these are the basic units of a landscape:

    Quads make up a section,

    which make up a component,

    which make up a landscape.

    Or

    A landscape is made up of components,

    which is made up of sections,

    which is made up of quads.

    Each quad is roughly 1 m x 1 m (this isn’t precise for some reason; see note below)

    Section Size: The number of quads which make up each section

    Sections Per Component: The number of sections which make up each component. (the above image is 2×2 sections)

    Number of Components: The number of components which make up the landscape.

    Each of these multiply to determine the final Overall Resolution of the landscape.

    Note: why doesn’t the math work out exactly? If we do the math on the default 4033 x 4033 landscape numbers, we get:

    🤷‍♂️

    The “Total Components” number in Unreal is simply the result of multiplying the number of components. For example, 32 x 32 = 1,024.

    See the Epic Landscape Technical Guide for Epic’s recommendation for best practices.

    World Partitioning

    World Partition Grid Size: Number of components per landscape streaming proxy per axis. These are represented by the yellow squares in the Unreal editor landscape window.

    World Partition Region Size: Number of components per Landscape World Partition Region per axis. These are the regions/chunks that are loaded and unloaded based (typically) on player location. This is not indicated in the editor window (for some reason?)

    The number of partition regions is calculated as:

    For example, 32 x32 components and a World Partition Region Size of 8 will result in 4×4 partition regions (32 / 8 = 4 regions per axis = 16 total regions)

    The default settings for a 4033×4033 landscape has a World Partition Size of 16 with 32×32 components, which results in 2×2 partitions (4 total partitions). That’s probably not enough for most use cases.

  • Creating an Infinite World – Chunk Management in Unreal Engine

    Creating an Infinite World – Chunk Management in Unreal Engine

    Recently I’ve been diving more into game design and development and learning Unreal Engine. I’ve always wanted a low-key driving game where I could just get on and drive forever, with no timers or missions or races. I set out to see if I could create it for myself as a small project.

    The first task was to figure out how to generate (and destroy) terrain on the fly as I drive. I started with the “Vehicle” template game included with Unreal Engine and then created my own empty level. After some (ok, a lot) of trial and error I was able to write a script that continuously loads chunks around the player given a specific chunk size and load distance. It also unloads chunks that are far enough away from the player that they are no longer needed.

    Obviously the chunk size and load distance would be greater than in the above image in an actual game, but I made them small so I could see what was happening.

    Next, I’ve been exploring noise algorithms to procedurally generate terrain.

    Comments are disabled here because tracking multiple sites is agonizing. If you want to chat about this, join me on Discord.