Layer Masking Ability

I would love to have the ability to add a mask to a layer and paint grayscale values on it to mask out the artwork on the layer -- like photoshop.

Why?  Let's say I have a base tile for grass.  When I create terrains in Tiled, I often need only half of the grass tile, combined with half of another tile (let's say a water base tile).  but I still want the water half and the grass half to update when I change their base tiles.  Masking would be a great benefit in this scenario.

Let me know if there is a way to do this now.  Just trying to make those base tiles update everywhere so that I don't have to go in and tweak transition tiles when I have a lot of them.


  • DanikDanik Posts: 897
    This would indeed be a really useful thing to have. Unfortunately I don't see a way to easily implement it the way tiles and layers are structured currently.

    Layers masks might not be super hard to implement, and would be very useful on their own, but I think that wouldn't be enough to support the workflow you speak of. The problem is that tiles are simple bitmaps at the moment. The Canvas has Layers that have Tile instances placed in them, but Tiles can't have layers. 

    If Tiles could have multiple layers, then it should be more feasible, but I will have to think about it if this is a good idea or not.
  • Ah -- I see there might be some confusion.  I only meant the ability to add a mask to a canvas layer, not to a tile.

    Here's a description to clarify.

    I create artwork in Pyxel Edit for use in Tiled.  Tiled has an awesome terrain drawing tool, that works great.  When I create tiles in Pyxel Edit, I'm not creating them to use as tiles in Tiled. I create tiles in Pyxel Edit to serve as the base for transitional tilesets for use as "terrains" in Tiled.

    Here's a workflow example:

    In Pyxel Edit, I create a base grass tile and a base dirt tile, which look like this:

    Because I need transitions from grass to dirt to use in terrains in Tiled, the actual artwork I create on the canvas in Pyxel Edit looks like this:

    I can use a canvas layer for the dirt, and a canvas layer for the grass, but you can see that the transition from grass to dirt requires converting the transitional grass tiles to bitmaps, which means that they don't update when I edit the base grass tile.

    Here's an example showing how I would mask out the "grass" canvas layer in order to reveal the dirt layer below.  The pink represents paint on a canvas layer mask.

    Doing this would allow the grass tiles I placed in Pyxel Edit to update automatically when I edit the base grass tile.

    By the way -- I just want to say that Pyxel Edit is truly excellent.  There are so many subtle interactions that are designed so well compared to other pixel art tools.  Great work, man!
  • NeznaikaNeznaika Posts: 35
    You can use 2 layers. Buttom layer for dirt, top - for grass. If you need new dirt - create 4x4 tiles plane and just cut pixels you need for grass. How? Select grass layer and click MagicWand's tool an emply center space. It create selection where dirt should be.  Select new dirt layer and press delete key button. That's all.
  • NeznaikaNeznaika Posts: 35
    One more universal tip - draw all things separately on different layers. ALL things! )))
    For example
    1. Grass base.
    2. Grass highlights.
    3.Dirt shadow
    4. Dirt base.
  • DanikDanik Posts: 897
    Ah ok, sorry, I see how you mean now. Yes, in that case layer masking should be beneficial for sure... I'll add it to my list of things to think about when I get some dev time in.

    Thank you for the kind words!
Sign In or Register to comment.