---
title: "Colonial"
date: 2017-02-15
comments: true
---
import Image from "@components/Image.astro";
import YouTube from "@components/YouTube.astro";

import T_MacroVariation from  "./images/T_MacroVariation.png";

<YouTube id="s9Z9Yh6Yu0I" />

This project kind of went a little further than i first anticipated, I first thought of it just as a little 3D modelling practice. At the same time i played around in WorldMachine to create some sort of northern atlantic style Island. After i brought the House into Unreal, i simply added the island heightmap as a Landscape and went on from there. 

Gladly i still had a Landscape Material which i created a while ago, so i didnt need to set up a whole new one. The landscape utilizes a set of slope, paint and perlin noise masks to determine which parts of the landscape are grass, rock, forest, and gravel. Every single material blends between two texture sizes based on distance to the actor in the level to avoid texture tiling on distant materials. After that another layer of textures is overlayed, to add some variation to the color.

<div class="center">
  <Image src={T_MacroVariation} alt="T_MacroVariation" />
</div>

I learned this technique from the materials that Unreal provides with the startup content, and it really adds to the realism of materials, i also used it in the roof material. With UnrealEngine it's also possible to create material instances to manipulate attributes of the material at runtime, i also included an option to preview the mmask live, green represents the near tiling and the pebbles, red represents the distant texture.

<video src="/blog/colonial/Mask_01.webm" mute controls/>

The material also utilizes Unreal engines Foliage Type feature to distribute foliage like Grass, Rocks, Forest Plants and Flowthaton their according ground. The material also blends the material according to their heightmaps which produces a very natural gradient. Notice how the grass, expand to the cracks of the rock material first.

<video src="/blog/colonial/Mask_02.webm" mute controls/>

The heightmap can be used to displace the physical vertices of the Landscape mesh  together with adaptive tesselation that will make the material look fucking amazing, but this feature takes a huge hit on the performance and is for live gameplay, atleast on my pc, not feasable.

<video src="/blog/colonial/Pebbles.webm" mute controls/>

Another material that im really proud of is the ocean material, there is no physical displacement happening, just a lot of normal map magic. Another difficulty that i faced was the animation of the butterflies, as i am more used to the particle systems in Blender, 3DSMax and C4D Unreals so called Cascade System was not very intuituve for me.

After some time i found a solution which looks, atleast to me, natural. Now the Butterflies spawn in a small radius around a sphere which moves to a random position every two seconds, the sphere also poses as a force to the Butterflies, so they fly towards it.

<video src="/blog/colonial/Butterflies_1.webm" mute controls/>



