Unreal Game Prototype
I stopped working on a Unity game prototype quite a while back for a game idea I really wanted to make. One of the reasons I stopped development was because I was becoming dissatisfied with the direction Unity was being taken in. I had always wanted to sink my teeth into an Unreal game project and develop those skills, and the pinch point was the Unity licensing debacle. After that I had decided I wouldn’t focus my energy on Unity anymore and any new personal projects I develop would be using the Unreal Engine. However, I’m not going to turn my back on over 10 years of Unity experience, that would be very shortsighted and naive. I still love the Unity Engine. It is incredibly easy to use, quick to prototype with and (as I would come to learn and understand) much easier to navigate than Unreal Engine.
So let’s begin. What am I working on? Well, with a lot of my ideas I like to keep them close to my chest until the parts I want to talk about are ready. That being said, I am starting with the development of a hex-based chunking system for an infinite procedural terrain. The great thing about hexagons is that they tile perfectly and are built from six regular equaliteral triangles, so it is incredibly easy to subdivide the hexagon to increase the detail of the procedural terrain.
I started prototyping using Unreal’s Blueprint system to see how easy it was to use and what was available to me. I managed to get the hexagon subdivision and the Perlin noise height calculation done pretty swiftly. I fully intend to rewrite all of this in C++ as I assume it will be much faster but for now I wanted to experiment and prototype with Blueprints.
And because I have already done this in Unity before I can show that version as well for a comparison. Very similar but with a few visual discrepancies.
I always find that Unreal is always much more shinier than Unity, but that’s because its lighting system is just so much better (to a fault in some cases). Most of my projects are procedural in some way and I’ve never had runtime global illumination in Unity. However for this project I want it to have lofi low poly style and disabling Lumen (Unreal’s runtime global illumination) was a bit of a pain. Then there were other visual artifacts caused by TAA that I didn’t need nor want. Finally I ran into an issue with a flat shading lighting model on my material that I struggled to get working on my custom wireframe shader. These all contributed to shiney and smoothness that I didn’t want in my low poly project.
Once I overcame these obstacles I duplicated the mesh and disabled the height calculation for it for a quick ocean and altered my shader to sample a gradient based on vertex height. Voilá! Instant procedural terrain (and sorry that this one is off centre, I didn’t have any other videos).
But we’re not done yet. That gradient is obviously far too smooth and detailed for our low poly terrain. I changed the shader to take the average height of the three vertices that make up the triangle to sample the gradient. I also punched up the colour saturation of the gradient itself. We’re not going for realism here, we’re going for colourful. Finally we end up with a solid terrain prototype and a visual style I’m really pleased about.
Looks pretty good doesn’t it? Not bad considering this is all done with Unreal Blueprints and zero code!
Thanks for reading!