# Guidance for setting up Terrain Brush with advanced tiles?

**URL:** <https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403>\
**Category:** Questions\
**Created:** [May 31, 2016, 6:33pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403 "2016-05-31T18:33:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![drinfernoo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/drinfernoo/32/2004_2.png) [@drinfernoo](https://discourse.mapeditor.org/u/drinfernoo)\
**Post date:** [May 31, 2016, 6:33pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/1 "2016-05-31T18:33:10Z")

</div>

I’m currently in the process of a “universal” LPC tileset repack for OpenGameArt, but I’m having trouble setting up the Terrain Brush to work correctly with the tiles from [this pack](http://opengameart.org/content/lpc-terrain-extension).

I’m trying to create a tileset in which any terrain could tile with any other, in any configuration, but I don’t really know how Tiled handles various corners and such with regards to the Terrain Brush.

For example, if I’m using Sand with various Water tiles, do I create a brush for Sand, highlight all the corners with Sand, and then create the different Water tiles and highlight all of them, even on the Sand tiles?

Enlighten me?

---

<div class="post-metadata">

**Author:** ![Ablu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ablu/32/1496_2.png) [@Ablu](https://discourse.mapeditor.org/u/Ablu)\
**Post date:** [June 1, 2016, 12:26pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/2 "2016-06-01T12:26:03Z")

</div>

Hi,

we already have a sand \<-\> water transition for the lpc tilesets. Feel free to use it (or look at it to understand how to do it for yourself):  
[https://github.com/tales/sourceoftales/blob/master/tiles/terrain.tsx](https://github.com/tales/sourceoftales/blob/master/tiles/terrain.tsx) and [https://github.com/tales/sourceoftales/blob/master/tiles/terrain.png](https://github.com/tales/sourceoftales/blob/master/tiles/terrain.png).

Credit for creating those goes to @bjorn btw. He wrote a [tool](https://github.com/tales/sourceoftales/tree/master/tools/brushgenerator) for this.

Regards,  
Ablu

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [June 1, 2016, 2:06pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/3 "2016-06-01T14:06:22Z")

</div>

> [@Ablu](#):
>
> Credit for creating those goes to @bjorn btw. He wrote a tool for this.

To which I have to add, that the terrain generator tool is meanwhile merged to master and shipping along with Tiled since version 0.15. But documenting it is still something I need to get around to…

---

<div class="post-metadata">

**Author:** ![drinfernoo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/drinfernoo/32/2004_2.png) [@drinfernoo](https://discourse.mapeditor.org/u/drinfernoo)\
**Post date:** [June 1, 2016, 4:08pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/4 "2016-06-01T16:08:17Z")

</div>

> sand ↔ water

But not things like sand ↔ lava, pink sand ↔ ice, etc… I’m going for transitions we don’t have yet.

> shipping along with Tiled since version 0.15

So the two-sided and three-sided tiles are generated on the fly like any other?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [June 1, 2016, 7:05pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/5 "2016-06-01T19:05:36Z")

</div>

> [@drinfernoo](#):
>
> So the two-sided and three-sided tiles are generated on the fly like any other?

The tool combines the terrains by stacking individual transitions onto each other, grouped and ordered as specified on the command-line. You could in theory have it make a tileset where all terrains meet all terrains, but that would generate a way too large tileset due to the shear amount of combinations.

Instead, what we did with that tileset was to consider which transitions make sense and look good, and to specify groups of terrains that are allowed to occur together on a single tile.

The tileset was actually generated before the tool had proper command-line arguments, so the groups and stacking order were hard-coded at that point. Hence unfortunately there is no example, but I will work on this when I get around to documenting that tool.

---

<div class="post-metadata">

**Author:** ![drinfernoo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/drinfernoo/32/2004_2.png) [@drinfernoo](https://discourse.mapeditor.org/u/drinfernoo)\
**Post date:** [June 1, 2016, 8:31pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/6 "2016-06-01T20:31:17Z")

</div>

So, if I make my own transitions (the normal tiles), how can I set up my tileset to use the right ones for the other corners?

I’m noticing the sets [here](https://github.com/tales/sourceoftales/tree/master/tools/brushgenerator) show hose corners in the upper-left, if I’m not mistaken?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [June 1, 2016, 8:53pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/7 "2016-06-01T20:53:23Z")

</div>

The source tilesets often did not include those opposite corner versions, so I’ve edited the tilesets a little to add them.

---

<div class="post-metadata">

**Author:** ![drinfernoo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/drinfernoo/32/2004_2.png) [@drinfernoo](https://discourse.mapeditor.org/u/drinfernoo)\
**Post date:** [June 1, 2016, 9:37pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/8 "2016-06-01T21:37:22Z")

</div>

How can I, if I make my own tiles, convince Tiled to use them with the Terrain Brush?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [June 1, 2016, 9:55pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/9 "2016-06-01T21:55:48Z")

</div>

> [@drinfernoo](#):
>
> How can I, if I make my own tiles, convince Tiled to use them with the Terrain Brush?

For that I wrote the [Using the Terrain Tool](http://doc.mapeditor.org/manual/using-the-terrain-tool/) page in the documentation. 🙂

---

<div class="post-metadata">

**Author:** ![drinfernoo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/drinfernoo/32/2004_2.png) [@drinfernoo](https://discourse.mapeditor.org/u/drinfernoo)\
**Post date:** [June 1, 2016, 10:24pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/10 "2016-06-01T22:24:43Z")

</div>

That guide doesn’t make any mention of how to mark the opposite corner tiles 😕 I’ll have to post one of my maps to illustrate the problem, I guess.

My understanding is that they show up when a tile is bordered by multiple different types of terrain, is that right?

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [June 1, 2016, 11:07pm UTC](https://discourse.mapeditor.org/t/guidance-for-setting-up-terrain-brush-with-advanced-tiles/1403/11 "2016-06-01T23:07:38Z")

</div>

> [@drinfernoo](#):
>
> That guide doesn’t make any mention of how to mark the opposite corner tiles 😕
> 
> My understanding is that they show up when a tile is bordered by multiple different types of terrain, is that right?

That’s just because the tileset used in the example does not have such corner tiles. The terrain tool will generally also work without them.

If you do have them, it’s just a matter of annotating them using the same approach as for all the other tiles.
