Summer Work (Day 12)
Procedural Terrain Generation pt.1
Since I have moved past the color settings debacle of this week I have started working on making the planets more planet-like and not just boring old spheres.
I knew I would have to use perlin noise for this and so I went looking around for some way to implement it in Unreal. I eventually found though that Unreal's math library already contains functions to generate 3D noise. This system is quite simple though and some of the plugins and stuff that I found would give more control of the noise, this will work for what I want to do.
The next step was to create some more classes that would deal with this noise. One of these was a class that didn't inherit from anything. When I tried to compile it though it had the same problem as before where it wouldn't recognise the syntax. The fix for this as I found before was to regenerate the VS project files. It seems that this is some sort of bug with the version of Unreal that I have where making a blank C++ class will not generate correctly.
Once I got that out of the way it was pretty easy going. After all I have learned over the process of making this game about data assets, blueprint, and procedural meshes, I was able to get a disfigured sphere that looks more like planetary terrain.
The basic idea is that there are multiple layers of noise, each with decreasing strength and increasing frequency to add more detail. This is controlled by the persistence and roughness values. Next to do will be making the generation more interesting with multiple noise filters and coloring the planet.
Comments
Post a Comment