π Topographical Maps in Unity: Edge Detection (2/2)
Hi everyone! π
The second part of the tutorial series about topographical maps in Unity is finally out! This article will cover the edge detection, which is the first step necessary to create real-time maps:
This is a technique that shares a lot of similarities with games such as "Sable" and "Bird Alone" (below):
The source code and resources are also available for download to all $25+ patrons here.
As always, thank you for your support and feel free to get in touch if you have any question!
π
π§π»
Comments (2)
This is wonderful! I'm using an adapted version of this to render gravitational fields. I had a question though - what's the best way to control line thickness with this approach?
Hi! π It's... tricky! π Because technically speaking, those are not lines! The shader has no idea that there are lines, as they only work at the pixel/fragment level. So for a well defined edge, you should get a line of 1 or 2 pixels. If you want it to be bigger, the best thing is to use a second level of postprocessing to "expand" on that line. For instance, any black pixel nearby a white pixel becomes white. And this effectively makes all lines one pixel thicker. There are probably more esoteric solutions, but this is pretty easy to code given the existing scripts!
