Search Unity

Tile Map Accelerator : Shader Based Tile Map Renderer

Discussion in 'Assets and Asset Store' started by r3eckon, Jul 10, 2019.

  1. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    395

    Tile Map Accelerator is a shader based tile map renderer capable of delivering stellar performance on massive tile maps thanks to a technique known as "Texture Bombing". Get 1000+ FPS and the lowest possible render thread times for even the largest of tile maps!


    See the difference between a Native Tile Map VS Tile Map Accelerator. Tile Map Accelerator can deliver better performance than a native tile map that is 8 times as large. While Native Tile Maps usually destroy FPS when zooming out over the whole map, TMA handles it with no problem!


    The asset is more than a powerful tile map rendering shader. It also includes a bunch of utility scripts to help you getting started. Some of those utilities include tile type based collision / trigger detection, mouse cursor tile map interaction, active layer baking script to allow for runtime edits of tile maps as well as a simple top down 2D character controller.


    The asset also includes an integrated version of AutoTileset Generator, a free utility allowing users to quickly turn AutoTile atlas files into individual transition sprites. It has been used to generate the simple grass to water transition tiles used in the screenshots & included demo scene.


    The asset has released to the asset store at a starting price of $20 but will be continually updated with new feature and will likely see price increases as features are added. Below are some links to the asset store page and the demo build. To finish up, if anyone has any comments or questions about the asset, feel free to leave a reply in this thread or contact me directly at r3eckon@gmail.com.

     
    Last edited: Aug 18, 2019 at 7:53 AM
    Griz and joshcamas like this.
  2. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    395
    Here is a video demonstration of map wide animation, a feature I have just added to the asset that will be featured in version 1.1 of the shader.



    It works by creating multiple frames of animations by duplicating the main tile map mesh a bunch of times and by using the [PerRenderData] tag assigns a slightly different tile set to each "frame" or mesh rendering the tile map. By storing animation frames as extra tile types and using a simple script to switch between frames depending on a set animation framerate and style, can animate tile types on a map wide basis, although it may be hard to tell from a very zoomed out view.
     
  3. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    395
    After a few weeks away from work I have finally been able to implement Auto Chunking to the asset! This new feature allows for basically seamless map edit baking thanks to the splitting of the map rendering mesh into multiple sub meshes or chunks. As you can see below, the map is divided into smaller meshes each rendering a portion of the full map.


    The amount of chunks generated by this system can be tweaked to work with any tile map sizes. Of course, since the main role of this system is to make edit baking faster, it may not be beneficial to use it on map sizes below 512. The above map is 2048 x 2048 and 8 x 8 chunks are used, each being 256 x 256 tiles in size.


    This feature as well as the animation controller will be releasing with version 1.1 of the asset. ETA on release is currently before the end of the month :)
     
  4. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    395
    Here is a quick video to go with the last post, showing off the auto chunking feature in action. Active Change Baking happens when the Live Edit Count goes to 0. Both times this happens in the show off, the framerate only dips to about 500 for a few frames, which is still very comfortable and will fit perfectly with max FPS values. Tile map size is 2048 x 2048 and the amount of chunks used is 8 x 8, which means each chunk contains 256 x 256 tiles.


    You can also observe the triangle count increasing and decreasing as the camera is panning over now optimized quad based renderer objects, which use quite a few triangles less than the typical mesh plane does. Auto Tiling of grass to water transitions is disabled for this show off since it still happens over the full map and induces a bit of lag, but it should be simple to allow auto tile passes on certain chunks only to speed it up.
     
  5. SirStompsalot

    SirStompsalot

    Joined:
    Sep 28, 2013
    Posts:
    78
    I'm really digging what you're doing here. What's next?
     
    r3eckon likes this.
  6. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    395
    Thanks! I'm currently working on transparency so that multi layered rendering is a possibility. This will allow for things like player walking behind certain elements, sprites containing glass or other semi transparent colors, multi layer rendering for things like only drawing certain floor of an office building depending on player position and also isometric rendering support.

    That last one might take a while to work out, as I'm still a bit confused on how I'm going to handle sprites that take lots of isometric tiles. Extra full tiles on other Z layers is fine, it's the half tiles that are going to be a bit of a challenge since my sprite fetching code is made to work with full square tiles. Also, the only example of isometric texture bombing I have found was handled in a way that did not allow "tall" isometric sprites, which span more than a single tile.