I’m relatively new to Unity 2D so please bare with me if this question sounds ignorant, but is it possible to create a workflow in which you would make 2D animations in a third-party software like Krita or Adobe Animate, import those animations into Unity, and have those animations automatically update in Unity as you change them in the third-party software?
What I’m trying to achieve is exactly like Unity’s Aseprite Importer but for hand-drawn animations. I’d like to make fairly complex cutscenes but I still want to have Unity’s tools available to me (physics, particle system, etc). If there is a way to slightly alter animations in a third-party software and then have them automatically update in the Unity timeline just by saving them, that would speed up my workflow exponentially.
Krita does have an API that supports Python scripting and I could learn Unity editor scripting and take months to develop something janky that kind of works, but I feel like I’m overthinking all of this, haha.
I found out that Aseprite Importer actually goes as far as letting you import animations as .ase files and it updates them any time you change them in Aseprite, but I still haven’t found a way to do it with hand-drawn art.
Hand-drawn art is typically presented as a series of full-frame (or perhaps just partial-frame) textures.
This means that without special efforts to compress it, the data gets Really Big Really Fast™.
The most common way of encoding multi-frame animation is to use video.
Video is supported to a greater or lesser extent on various platforms that Unity targets. Check before you leap too far into it because particularly with mobile, the support is extremely limited by the underlying OS hardware.
You could make a custom delta-encoding scheme where you handle the “diffing” from one frame to the next and only encode / save the changes from one frame to the next. This is basically what video does, but most video codecs also avail themselves of decades of visual compression technology and motion estimation, etc. to keep data bandwidth low while maintaining the highest visual fidelity possible.
I’m not too worried about performance or anything like that since my main goal is to just make animations inside of Unity without having to switch back and forth between different workflows too much. In the end, the result will be just an mp4. I came up with a workaround where I could make a very big canvas in Aseprite and code my own antialiasing system to make it look like I’m making hand-drawn art as opposed to pixel art. Unity already has a ton of functionality for Aseprite like I mentioned before, but I’d only use it for character animation and not anything too crazy since Aseprite isn’t designed for digital painting. Thanks for the ideas everyone! I’ll try everything out. Let me know if you think of anything else
So I was right about me overthinking all of this. In order to fake non-pixel art in Aseprite, all you need to do is make a custom anti-aliased brush and paint on a really big canvas. It’s literally that simple. Didn’t even have to code a complex anti-aliasing system!
Just saw this thread, very interesting to read about your exploration and the final solution.
Do consider sharing the final result, I’m very interested in seeing how developers are using the Aseprite Importer for different use cases.
Woah!! I didn’t expect an actual Unity employee to see this. Hello!!
Even though making a custom anti-aliased brush like that worked in the short-term, it was way too tedious to be a real solution. Not only are you stuck with one brush size, but even if you make a complete set of anti-aliased brushes, there’s no real way to save or import them into Aseprite (you have to use Ctrl+B to turn them into brushes for each new project). Also, with custom brushes, you can’t use a lot of neat functionality that Aseprite offers for the default brush (pen pressure, brush stablization, etc).
The final solution I came up with was a complete accident. I was drawing on a 3840x2160 with the default brush in Aseprite and saved it into my Unity project’s assets folder. When I dragged it into the scene, I was shocked to see that the anti-aliasing happened on its own. It must be something in the import settings, because I later noticed that my 4K Aseprite file got imported in 1920x1080. It most likely got downscaled and the anti-aliasing happened as a result of that.
This is the approach I’ll be using from now on.
The 3840x2160 drawing in Aseprite:
The same drawing but downscaled to 1920x1080 with anti-aliasing right after saving it in my Unity project’s assets folder:
It’s not perfect, but it does the trick. Now I can draw non-pixel art while still having access to the insanely helpful Aseprite Importer.