How to Create Consistent Pixel Art Animation with AI
People & Blogs
Introduction
Last night, while working with data sets for pixel art animations, I came up with an idea to use the same technique I used for creating front and back views of characters to create an entire character sheet for 8-bit games or GIFs. In this article, I will share my workflow and show you how to achieve consistent pixel art animation using AI.
Step 1: Extracting Animation Frames
To begin, you'll need to find good animations or basic animations that can serve as a reference for creating your character sheet. You can find these animations on platforms like YouTube. Once you've found the animations, capture a few frames from each animation. In this case, fewer frames are sufficient since we're only interested in extracting the skeleton data.
To extract the skeleton data, you can use the "Automatic Eleven Eleven" tool. Load each image containing the animation frames and enable the "Control Net" option with the "Ctrl OpenPose" model. A resolution of 768 by 768 is recommended. Save the skeleton data and repeat this process for all the frames in each animation.
Step 2: Organizing the Frames
After extracting the frames, it's time to organize them into a character sheet. Calculate the dimensions of your character sheet based on the resolution you want, while keeping in mind the number of frames you have. Each frame should be allocated a spot in the sheet, and you should arrange them accordingly.
In Photoshop, create a larger canvas that fits the character sheet dimensions. Place all the extracted frames in this canvas and organize them in the proper order and arrangement. Ensure that each frame is positioned correctly and at the right time.
Step 3: Generating the Character Sheet with AI
Once you have the frames properly organized in Photoshop, it's time to generate the character sheet using AI. Return to the "Automatic Eleven Eleven" tool and load the large sheet you created. Choose the desired resolution, depending on your GPU capabilities. For higher-end GPUs, 2048 by 2048 produces the best results, but you can go as low as 1500 to 12500 for lower-end GPUs with limited VRAM.
Choose the appropriate settings for processing and model parameters, and provide a prompt that describes the desired style and purpose of the character sheet. Ensure that "OpenPose" is not selected as the preprocessor to avoid confusion. Generate the character sheet using AI.
Splitting the Character Sheet
Once the character sheet is generated, clean up any inconsistencies or artifacts in the frames, ensuring that each frame looks clean. Export the cleaned character sheet as a PNG image. Next, use an online tool like EasyGif to split the character sheet into individual frames. Provide the appropriate settings, such as the number of rows and columns, and split the sheet into frames.
Creating Animated GIFs
Finally, create animated GIFs for each animation. Select the frames for each animation, adjusting delays and resizing if necessary to achieve a consistent look. Save each GIF with an appropriate name, such as "walk," "idle," or "attack," corresponding to the animation it represents.
Keywords
Pixel art animation, character sheet, consistent animation, AI-generated frames, splitting frames, animated GIFs
Introduction
Q: Can I use this technique for any style of animation, not just pixel art? A: Yes, you can use this technique for any style of animation as long as you have the skeleton data extracted from the frames. However, keep in mind that this workflow is specifically designed for achieving a consistent pixel art look.
Q: Is a higher GPU resolution necessary for better results? A: A higher GPU resolution, such as 2048 by 2048, generally produces better results. However, if you have a lower-end GPU with limited VRAM, you can still achieve decent results by choosing a lower resolution, such as 1500 to 12500.
Q: Do I need to clean up the frames manually? A: The frames may require some manual cleaning to remove artifacts or inconsistencies, especially if the AI-generated output has minor issues. Spending time on cleanup will ensure a better final result.
Q: Are there any recommended tools for splitting the character sheet into frames? A: There are various online tools available for splitting a sprite sheet into separate frames. EasyGif is one such tool mentioned in the article, but you can also explore other options based on your preferences.
Q: Can I customize the settings in the AI model for better results? A: Yes, you can experiment with different model parameters and settings to achieve better results based on your specific requirements. However, the settings provided in the article are a good starting point.