Skip to content

Automapping: Output objects don't contribute to output region #3473

@eishiya

Description

@eishiya

When determining what parts of a rule to output, Automapping only seems to look at tiles, and if objects are present, they are only output if they overlap an output tile as well. This is unintuitive and feels like a bug.

For example, these two rules that look for "NonEmpty" on the input layer and have just an object output layer will output nothing:
image
My input, unmodified by this rule:
image
But this is what I expect:
image

And this rule that outputs a tile in a location other than the object's location will output the tile, but not the object:
image
image

However, this rule, which outputs both an object and a tile at the same location, will work correctly:
image
image

If I want to make a rule that outputs only an object at some location, I have to have a tile output layer with a tile on it that will be ignored:
image
image

I think any tile touched by an output object should count as part of the output region. For example, this small object would add the selected tile to the output region:
image
Care would need to be taken with non-rectangular objects. For example, these are the total regions I expect these two rules to have:
image
But if the bounding box of the object is used instead of checking whether a tile actually overlaps the object, then the regions would be like this, and considered a single rule:
image

Alternatively, if it's intended that objects don't contribute to the output region (e.g. to avoid specifically this kind of weirdness with the shapes), then the fact that they don't contribute and may need output Tile Layers with Ignore tiles to output should be documented (I can add it to my rewrite draft).

Metadata

Metadata

Assignees

Labels

bugBroken behavior.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions