P57 Devlog 01 - Initial Worldgen


This is going to be an ongoing series of posts designed to archive the development of a game me and Ben Caffee are working on.

It started out as a side project I'd been working on for a while. I was still learning unity and I had quite a bit of fun playing with mesh generation. In particular, mesh generation with FastNoise. I'd highly recommend you check it out, it's some pretty amazing code.

The beginning steps involved generating a mesh with the default Unity render pipeline.

This worked quite well and was fairly fast considering the scale of the landscape. From here on I'm using chunks to split up the work, this way we don't have one massive mesh that unity has to deal with. This also helps with occlusion culling as each mesh is a separate gameobject that can be culled entirely.

The next step was to focus more on the details. I added a custom shader that would blend between textures based on slope and height. The grass is spawned using raycasts that are batched together for performance. The raycast will sample a pixel from the biome mask (which was generated procedural) and decide whether grass is required. This is using the Unity LWRP (but still looks pretty decent).