don-tnowe / godot-sprite-painter

Image editor right inside Godot 4.
MIT License
84 stars 8 forks source link

Add layers to images #5

Open seafiish opened 1 year ago

seafiish commented 1 year ago

GOALS:

1) Provide intuitive layer functionality to some capacity 2) Preferably, be able to use layers on many types of images, while still being non-cumbersome to use 3) Not overly difficult to implement coding-wise

Not sure how this would work since you're directly editing the image. Some ideas:

Option 1: Add the layer data to the .import file

1) I don't know if you can just superimpose properties on Godot imports like that 2) Even if you can, that would probably be cumbersome to implement

Option 2: Store the layer data in a custom file type (See: #3)

1) For example, you can create images with a custom .gsp (Godot Sprite Painter) extension, which would support layers 3) Requires either exporting to filetypes that are supported by Godot importing (see points 1 and 2 in next section), 4) Or adding Godot import support to .gsp images via the plugin

Option 3: Create an extra resource file in order to store the layer data

1) Takes up more space 2) Kind of defeats a big benefit of built-in editors (not needing multiple files per image like you do with Aseprite for example) 3) But I don't see why it wouldn't work

Conclusion

Layers are incredibly helpful in sprite editing and it would be awesome to have them in this plugin. Though, it may be hard to implement given the direct-editing nature of it. You would need to decide how to store the data before deciding how to implement it.

Lastly, if you could add layers to any image, it could potentially fix the alpha part of issue #2 via adding a bottom alpha layer to images that don't have it.