Connected my two libraries together to get some awesome renders for the first time.
Azura – My DirectX Engine
ScaledC – My C++ Terrain Generator
I created a new GameObject
called Terrain
and used ScaledC to generate the terrain values and assigning colors.
Mesh mesh = Mesh(renderState);
BasicMesh cubeMesh = ShapesHelper::GetPlane(length, breadth, rowDivisions, colDivisions); // Get Default Plane Mesh from Azura
auto rowVertices = rowDivisions + 1;
auto colVertices = colDivisions + 1;
auto generator = Scaled::Generator(rowVertices, colVertices);
generator.SetNoiseOctaves(8);
generator.SetNoisePersistence(0.7f);
generator.SetAmplitude(512);
auto map = generator.GenerateMap(); // 2D Array
// After this, I modified the Y aspect of each vertex in the mesh.
// The Mesh and Perlin noise had the same amount of vertices, hence just translated them accordingly.
Renders
100×100 Resolution:
1000×1000 Resolution: