mapeditor / mapeditor/tiled

"Pixel perfect tile object selection" should work on semi-transparent areas as well

Open
#3,404 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
In https://github.com/mapeditor/tiled/issues/1477, you implemented an improved object selection mechanism that ignores transparent pixels so that one can select objects positioned below the transparent areas of other objects. I still have issues selecting objects below semi-transparent areas, for example shadows, fog, glass, etc. See attached screenshot for an example.

**Describe the solution you'd like**
Hopefully a simple modification to your existing code, change the alpha pixel check to consider anything less than 100% opaque as transparent for the purpose of selecting objects.

![image](https://user-images.githubusercontent.com/45011262/177202072-d1b3c1a3-6c77-4176-9672-5f75d0590257.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the improved object-selection mechanism from issue #1477 and inspect the existing alpha-pixel check. Verify the behavior in the editor with objects beneath semi-transparent areas such as shadows, fog, or glass; done means those objects can be selected while fully opaque pixels still block selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.