jalagar / animated-art-engine

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file
MIT License
166 stars 64 forks source link

artifacts on step3 (pixel art) #42

Closed HanBaichuan closed 2 years ago

HanBaichuan commented 2 years ago

Hey there. In step3 where I'm converting the temp folder to gif using gifski, I'm seeing bad-coloured pixels on random frames of the exported gif like this (I'm also setting the quality to 100):

Or this

Step2 runs perfectly and the temp folder looks great. Here's my 8400*400 spreadsheet spritesheet

Using MichaPipo's script.js to convert to gif doesn't seem to have this issue, but it is a bit slow and has some transparency issues.

Any ideas on what might be causing this 🙁 Or did I miss some configuration parameters for gifski.

jalagar commented 2 years ago

That is super strange! I ran it on my M1 mac and it looks great 0

It might be an issue with gifski on Linux (I assume that's what you're using). I pushed some latest changes to use imageio Python library, which for your pixels should be fine. imageio has issues with blended layers, but it should be fine with pixel art.

Please run make first_time_setup or reinstall the Python dependencies (there's a new imageio library). Then in global_config.json set gifTool to imageio. This one is not as good overall as gifski but will work for your case! The more options the better in my opinion :)

Here's the PR if you're interested: https://github.com/jalagar/Generative_Gif_Engine/pull/43. Please reopen this issue if you still have issues!

HanBaichuan commented 2 years ago

@jalagar I can confirm that imageio works perfectly on my Ubuntu 18.04.6 LTS . The artifacts are completely gone. Thank you so much for your excellent work :)

jalagar commented 2 years ago

Great that is awesome! Please follow me on Twitter https://twitter.com/jalagar_eth or my project https://twitter.com/FitFriends_NFT for more updates :)