<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dillon Barrass</title>
    <description>The latest articles on DEV Community by Dillon Barrass (@dbarrass).</description>
    <link>https://dev.to/dbarrass</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3707368%2F10f4c47c-551d-4235-82b4-01560109e7eb.png</url>
      <title>DEV Community: Dillon Barrass</title>
      <link>https://dev.to/dbarrass</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dbarrass"/>
    <language>en</language>
    <item>
      <title>A Procedural Terrain Adventure in Unity pt.1</title>
      <dc:creator>Dillon Barrass</dc:creator>
      <pubDate>Mon, 12 Jan 2026 17:56:31 +0000</pubDate>
      <link>https://dev.to/dbarrass/a-procedural-terrain-adventure-in-unity-pt1-3gmm</link>
      <guid>https://dev.to/dbarrass/a-procedural-terrain-adventure-in-unity-pt1-3gmm</guid>
      <description>&lt;p&gt;This is a little blog I'm writing to keep track of my development progress, along with a sort of tutorial for others. I find that if I can explain a concept to other people, I understand it better myself. I am by no means an expert in any of the topics I will talk about, this is just me learning as I go. Some things may be wrong or inefficient, and hopefully I will discover these eventually.&lt;/p&gt;

&lt;p&gt;Since completing a university project that involved Unity's terrain system, I got quite interested in various ways of procedurally generating terrain. For context, I'm using Unity and will try to reference sources of information where appropriate. So let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Noise
&lt;/h2&gt;

&lt;p&gt;Noise is a pattern of values that seem somewhat random but remain smooth and continuous. When generating terrain, we need a way to determine the heights of each point on the landscape. To achieve this, we can generate noise as a simulation of elevation values. There are many different noise algorithms available, but here we'll just use perlin noise, one of the most popular and widely-used approaches.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feh7ooml1a5qtf9n9iqch.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feh7ooml1a5qtf9n9iqch.png" alt="An image of perlin noise" width="533" height="532"&gt;&lt;/a&gt;&lt;br&gt;An image of perlin noise
  &lt;/p&gt;

&lt;p&gt;In this image, the brightness corresponds to height. Black represents a height of 0.0 and white represents a height of 1.0. However, this doesn't create very interesting terrain on its own. To make our heightmap more visually compelling and realistic, we can introduce octaves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Octaves
&lt;/h2&gt;

&lt;p&gt;Octaves are multiple layers of noise at different scales, all combined together. Each layer progressively adds finer detail, giving the heightmap much more complexity and realism.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fua18vw656lye1c90pcfa.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fua18vw656lye1c90pcfa.gif" alt="A GIF of perlin noise moving from 1 to 8 octaves" width="522" height="526"&gt;&lt;/a&gt;&lt;br&gt;A GIF of perlin noise moving from 1 to 8 octaves
  &lt;/p&gt;

&lt;p&gt;Notice how each additional octave introduces finer detail. With just one octave the terrain looks smooth and simple. By eight octaves we have a much more natural, complex landscape with detail at multiple scales. However, there are diminshing returns; after a certain point (here around 5 octaves) additional octaves add very little noticeable detail while still impacting performance. Finding the right balance between visual quality and computational cost is an important consideration we'll experiment more with later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Persistence and Lacunarity
&lt;/h2&gt;

&lt;p&gt;The behaviour of these octaves is primarily controlled by two important parameters: persistence and lacunarity.&lt;/p&gt;

&lt;p&gt;Persistence controlls how much each successive octave contributes to the final noise.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High persistence means that later octaves remain strong in their contribution, leading to more detailed, rough and chaotic terrain.&lt;/li&gt;
&lt;li&gt;Low persistence means that later octaves contribute less to the final result, producing smoother, gentler terrain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a comaprison of low versus high persistence: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fesawwv3788ivh1e1cj99.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fesawwv3788ivh1e1cj99.png" alt="Noise with a persistence of 0.3 and lacunarity of 2" width="514" height="515"&gt;&lt;/a&gt;Noise with a persistence of 0.3 and lacunarity of 2  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7vwjtdd31vcf3dp8o6o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7vwjtdd31vcf3dp8o6o.png" alt="Noise with a persistence of 0.7 and lacunarity of 2" width="514" height="514"&gt;&lt;/a&gt;Noise with a persistence of 0.7 and lacunarity of 2  &lt;/p&gt;

&lt;p&gt;Lacunarity controls how much the frequency (how "zoomed in" the noise is) increases between each octave. A lacunarity of 2.0 means each octave doubles in frequency. Higher lacunarity creates bigger jumps in detail size between octaves, while lower lacunarity values create more similar sized features across octaves.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9h3tx8bm3wdxi5fra6yj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9h3tx8bm3wdxi5fra6yj.gif" alt="Noise with a persistence of 0.5, lacunarity increasing from 1 to 4" width="510" height="512"&gt;&lt;/a&gt;&lt;br&gt;Noise with a persistence of 0.5, lacunarity increasing from 1 to 4
  &lt;/p&gt;

&lt;p&gt;We now have a good baseline for creating our own terrain. Now to enhance your imagination a bit, we can create a colourmap from this heightmap, assinging different colours to different height bands, giving us a better idea of what the landscape will look like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fps3irmjmy6f3mh006n71.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fps3irmjmy6f3mh006n71.png" alt="Colour map" width="399" height="397"&gt;&lt;/a&gt;&lt;br&gt;Colour map with water, grass, rock and snow
  &lt;/p&gt;

&lt;p&gt;In the image heights from 0 - 0.4 become water), from 0.4 - 0.55 become grass, from 0.55 - 0.65 become rock, and from 0.65 - 1.0 become snow.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>unity3d</category>
    </item>
  </channel>
</rss>
