0
\$\begingroup\$

I drew a pixel art tree using GIMP. My problem is, how can I cut out the white background, because if I want to build a tile map with it, in my case with tiled, it always has the white background with it.

I know you can cut it manually, but I want to know whether there is an easier way.

\$\endgroup\$
  • \$\begingroup\$ I’m voting to close this question because it is a question about a graphical tool unrelated to game development. \$\endgroup\$ – Charanor Jul 11 at 21:49
  • \$\begingroup\$ I think the problem of removing a coloured background from a sprite sheet is a common enough task in game development that I wouldn't call this off-topic, though I do think it shows little research effort, given that there are lots of good search hits on this topic from other sites. \$\endgroup\$ – DMGregory Jul 11 at 23:36
  • \$\begingroup\$ @DMGregory So is setting up your IDE and creating music for your game. But I would consider "How do I setup [IDE] so I can create games with it" and "How do I create music for my game using [music editor]" off-topic. Just because the question contains "game development" doesn't mean that the problem is completely unrelated to game development. If this question was asking about how you can remove the background while reducing the aliasing on the edges in-game then I would consider it on-topic since that sort of technique is something a game developer/designer might be better suited to answer. \$\endgroup\$ – Charanor Jul 12 at 1:54
3
\$\begingroup\$

You need to right click the layer and select "Add Alpha Channel"

Then you can do one of 2 things...

  1. Use the "Fuzzy Select Tool" to select the white color (you can adjust the tolerance to select more or less of it) and delete the area.

  2. Go to "colors > color to alpha" select white and hit okay.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I can not recommend "color to alpha" in this case, because it makes everything transparent depending on the similarity of the selected color. So you will end up with a sprite where some pixels are not 100% opaque. \$\endgroup\$ – Philipp Feb 25 '18 at 17:17
  • \$\begingroup\$ That's true. There are more complicated techniques, but usually a mix works well. Fuzzy select the white, expand the selection by 1 or 2px, then color to alpha the selection. \$\endgroup\$ – Kyy13 Feb 26 '18 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.