-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to import and create palette indexed sprites from GIFs #18269
Comments
Just a note, with shader you not only have fine grained control (changing all colors if you want and dynamically), you also have non-destructive control, as in, no need to have separate sprites per palette (where a palette is just a texture listing colors in its pixels in the end). It just needs a bit more work upfront, though. So, while a shader allows all this, that request mostly sounds like adding tools to do the same thing more easily, as well as supporting GIF. |
I've not looked into shaders too deeply, but I was under the impression that a shader wouldn't be able to change just one color at a time, instead changing the whole palette. |
@Two-Tone it's certainly possible to change a single (or more) specific colors in a shader, either by doing a simple |
It would certainly be very beneficial to have editor support to swap palettes of sprites that support it It is a very easy and useful way to create variation in a game, without bloating it with more resources I think Opentoonz can export images with indexed colors. One of the layer types that it uses (Toonz Raster) supports indexed colors and it's brilliant! Old games have heavily used the technology to a point where they even animate the color palette of static image files to fake animation on huge background images It can be done in html5 too A lot of games use it to create a day and night version of the same levels - without having to make any new sprites and having great artistic control over the result. According to wikipedia PNG files support 8bit indexed color palette The question is wether we can have godot import that data and give the draw API/editor the capability to do some interesting things with it (such as swapping the palette) without too many lines of code (or writing a shader from scratch - which is still a workaround,limited and has been done already) I wouldnt personally use gif as the filetype to do that myself. Png is better imo Similar requests here: |
@blurymind GIFs and PNGs should both be supported as while PNG is compressed, most people export their actual animations as GIFs since APNG is not widely supported. |
The use of indexed color images and pallette swapping without using shaders would make my life so much more easier. I really do hope this is done sometime in the future :) In the meantime, we can use this for palette swapping https://godotengine.org/asset-library/asset/239 |
I want to state that the ability to import GIFs into Animated Sprite node or AnimationPlayer would speed up any pixelart workflow and most other 2D workflows a thousandfold. And therefore would make the engine a lot more suitable for fast prototyping. Right now I have to do set timing any keys twice: Once in the Animation tool I use and then again in the Godot Editor. Color cycling would be also a very very appreciated feature, benefitting everyone doing pixelart, which is a large portion of Godot users. Shaders are really complicated and hard to get into especially for beginners. |
I think GIF importing into If GIF importing will be a thing, there would be one issue with extracting palette from imported frames, as they will lose palette information in custom Each palette entry could be modified, and reimported. |
Ported this over to godotengine/godot-proposals#475, closing here. |
I recently found out that some engines, like MUGEN, have the ability to import GIFs and automatically convert them into animated sprites. This makes creating and adding 2D animations into the engine incredibly easy and fast.
Mugen also expands on this by allowing the user to edit the indexed palette of sprites to very quickly create palette swapped sprites. Example
You could recolor a sprite with a shader, but it doesn't allow for the same level of fine grained control.
The text was updated successfully, but these errors were encountered: