[SUPPORT] Advanced Turn Based Tile Toolkit

Hey Robin! There are some experimental functions included in the current toolkit that I used for creating the outline effect I showed a few pages back. However that method was quite hacky and not very performant. I would instead suggest to use a post processing volume to create an outline effect. @elec2ron suggested this to me in this thread and I have since looked into how to get this working in ATBTT. I now have something that works great for flat grids, though it still needs some work for grids with height differences.

So first you need to add a post processing volume with an outline shader. The best one I’ve found is the one by Tom Looman (found here). Follow his instructions to create the post processing material and set up an unbounded post processing volume in your level that implements it. If you are using a flat grid your work is nearly done at this point. Just make sure that the meshes used to display tiles in move range are big enough to be completely flush with one another and enable “RenderCustomDepthPass” and disable “RenderInMainPass” in the meshes’ rendering settings.

If you use multi-level terrain this can look weird (though test it out for your game to make sure), especially if the tiles have height differences within the tile itself. If so you need to do some more work to make sure all the move meshes are perfectly connected with one another at all edges or you’re going to see holes between them. A way to do this suggested by @elec2ron is to use procedural mesh components. In the current method I’m using line traces to find the center points in height between adjacent tiles. This works great for some maps, but results may vary for multi-level grids depending on collision. It is also not terribly performant, though more so than my previous spline-based method. I’m working on finding a way to efficiently cache the height data to improve performance. But for now this is the best I got. Sorry for the godawful spaghetti, but this is very much a work in progress.

This should give you the following result. Note that whether or not you want the outline to be blocked by overlapping meshes can be adjusted in the shader.

https://i.imgur.com/abjc1vO.jpg

Hope that gives you the results you’re hoping for :slight_smile: