mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Custom Tile Render Size #3683

eishiya posted onGitHub

Problem

With the addition of the Tile Render Size: Map Grid Size option, using mixed-size tilesets in Tiled became a lot easier. However, this is still not enough for some tilesets - sometimes one needs to scale some tiles relative to others, but without necessarily making them the size of the tile grid - the tiles might still need to protrude from their cells rather than being scaled to fit within the cells.

Proposal

Two additional Tile Render Size options: Custom Size and Custom Scale. Custom Size would let the user set a pixel size to which the tiles are scaled, and Custom Scale would instead let the user set a custom scale factor (possibly independently in x and y). For the Custom Size option, the Fill Mode setting should still be respected, while for the Custom Scale, that setting would be irrelevant, just like it is irrelevant for the "Tile Size" option.

The actual custom size and scale input fields would be additional fields. To start with, they can be fields on the Tileset. Ideally, however, they should be per tile, with the Tilesets' properties just providing a default - not all tilesets have their tiles at the same visual scale, or the user may want to change the relative scales of some tiles.

UI-wise, the size/scale fields can be the same "Custom Render Width/Height" fields, with their type (int or float) and meaning changing based on the Tile Render Size setting. It would also be acceptable to make them completely separate fields, with the appropriate one used based on the current Tile Render Size setting.

Alternatives

Currently, users have to scale their original artwork to achieve the exact sizes they need. This makes it more difficult to iterate, and if the tiles are all in one tileset and need to be scaled by different amounts, it may requite completely rearranging the tileset. Another option is to use Tile Objects instead of tiles, as those can be resized freely, but that misses out on all the tile layer-exclusive tools and optimisations.

This feature was suggested by a user on Discord.


I'm the original requester of this feature. I've been using the Forgotten Adventures Mapmaking Pack to make a map for a tabletop RPG. Most of the assets here are work quite well with the default mode, but the "textures", including flooring, are provided as very high res (1000x1000) files. In addition, many assets are not provided as sets of 1:1 ratio images but as "compounds" (1x2, 1x3, etc.). Neither Tile Render Size options works for these scenarios without requiring the external scaling of the assets:

  • Tile Size - Large Asset: Placing such a tile fills significantly more area than is reasonable
  • Map Tile Size - Large Asset: Placing such a tile compresses the asset too much, unnecessarily losing detail and clashing with the rest of the assets.
  • Tile Size - Non-Square Asset: Using this only works as long as the "tile size" of the asset is the same as the "tile size" of the map.
  • Map Tile Size - Non-Square Asset: The asset is crushed into a 1:1 square. Using preserve aspect ratio is not a solution because the asset should take up more than one tile (visually).
posted by BenjaminHolland almost 2 years ago

I'm the original requester of this feature. I've been using the Forgotten Adventures Mapmaking Pack to make a map for a tabletop RPG.

What a crazy huge pack at 9 GB in size! I can imagine it would be nice to have #3083 available to avoid having to add all those images manually. On the other hand, we'd have to be careful not to try loading all those images into memory and the tileset view would need to use thumbnails rather than just scaling the original images.

Regarding the feature request, I'm not sure how common this need is so it'll be rather hard to prioritize this vs. other much more common requests. Of course, contributions are always welcome!

posted by bjorn almost 2 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests