Skip to main content

Posts

Showing posts from June, 2016

Procedural 2d Hex Based Terrain

Back in May of 2015 I made a post about making terrain with Perlin noise. Since then I have done a lot of experimenting with different techniques and algorithms. This was all mostly done for a project that I decided to quit working on about 4 months ago. Since at this point I'm pretty certain I'm not going to finish it, I decided I'll share the results of this experimenting and show off the mostly finished terrain generator. Here is another image with an improved river algorithm

Water Effect

This purpose of this post is to give some insight in to my 2d water effect. The effect  was made in unity and consist of one C# script and two shaders. Additionally this effect can be be broken down in to two parts. The reflection and the distortion. First we will look at the reflection Reflection A lot of the work of the reflection is done through the C# script. The script creates a new game object with the sprite renderer of the original object, mirrors it, and puts our water reflection shader on it. You can see it below. A couple things to note with this technique. First, everything done in this script could be done manually through the editor. It is only for convenience and does not have to be done at run time. You might want to add [ExecuteInEditMode] to this script if you plan on using it. Second, this is kind of a crude way of doing things. Animations, lighting, or anything else that effect your sprite will not get reflected. For animations you could use the s...