Wang set with "empty" color?

Hello,
Is there any way to create wang set with one color “empty”
In terrain you can mark terrain like that:
image

sides that are not marked as terrain are automatically treated as connector to empty neighbor.

Is there any way to do something like that with wang sets? It would allow to draw walls and paths easily. Or terrain types that contains one-tile width paths as well.

1 Like

Currently, no ): It would be great to be able to include “none” as a colour, or to mark the theoretical empty tile with wang colours, but it’s not currently possible.

Then Bjorn please consider this as feature request.

Bumping this post up because there’s been no reply regarding the feasibility of this request (also, it needs to be moved to #suggestion).

Having a special “empty” colour that matches to itself and to empty tiles would be a big step towards making this tool practical.

There are two flaws with the tool that currently make it borderline useless for most real-world tilesets (as opposed to the perfect ones used for demos):

  1. The inability to match empty tiles.

  2. The inability to use a flipped version of a tile. Many tilesets do not include every side of a terrain because they expect the user to flip and rotate tiles, but the Wang Tile and Terrain tools in Tiled don’t take flips (nevermind rotations) into account at all.

Hi

I got this to work by setting up a wang tile set of 16 tiles, one of these tiles was an “empty” tile that I filled the layer with before using the tiles, this worked great as a way to do road over lays on top of other terrain layers.


This might help

MrB

1 Like

Yeah, filling a layer works great when your Wang tiles are indeed on a separate layer, though it does not work if you need the tiles to occupy the same layer as various other tiles that are not relevant for the terrain.

I guess an alternative would be to “fill” the tiles in the tileset with a specific “other” Wang color. However, I agree that ideally doing this should not be necessary and will look into what’s currently preventing this from working. If it’s an easy fix then I’ll include it in Tiled 1.4.

Regarding handling of flipped and rotated tiles, indeed this should be supported as well and on the data and algorithm level it actually is (though, I haven’t tested it). Where it is definitely not supported is in the UI, and this is a little bit more tricky to do. I can look into that after currently prioritized features for Tiled 1.4 are done. In the meantime I would suggest testing it by editing the files by hand (see flipping related attributes at https://doc.mapeditor.org/en/latest/reference/tmx-map-format/#tmx-wangtile).

An “other” colour would be helpful for many scenarios, but a actual proper “empty” colour would be useful too, particularly for sidescroller terrain. An “empty” tile could be a replacement, but it would require making space in the tileset for such a tile, and then remembering to delete it when everything is done (an invisible tile still requires rendering, a true empty tile does not)

Thanks for that link, bjorn! I’m confused though, the documentation sounds like it’s just whether the tile itself is flipped, not whether it can be flipped in order to stand in for multiple Wang tile arrangements, which is the more useful feature.
Just to clarify, I’d like to be able to just have this one tile:
image
also usable as
image image image
by enabling some “allow hflips”, “allow vflips”, and maybe even “allow dflips” toggles while using the Wang Fill mode and Wang Brush tool (although if the list of Wang tiles is only generated once, having this be a tileset property would be fine. That would also allow easier peviewing whether the set is “complete” once flips are taken into account.)