Holidays are over, and we are back at our computers, working on Johnny's adventures. Last week I've been trying to recreate the intro using OpenToonz. Here's what I have learned.
Animation problems in Unity
Some time ago, I had a bit of a problem with the intro animation that you might have already seen, if you have played the game jam version. We felt that the easiest and quickest way to add some cutscenes to the game is to use Unity's animations. After all, we only needed some simple transitions between different opacity levels, position or scale. It was all fine in the game jam, but since then we've been rearranging a lot of things. One day I opened the Main scene in Unity and hit play, and the intro was completely messed up! I couldn't figure out why, but it has gone completely nuts. Pictures in the wrong place, wrong size, etc. All that, while according to source control, the intro scene has not been changed since the jam... Weird, huh...
Anyway, no biggie. I had my suspects regarding this weird occurrence, but I decided not to investigate. I wanted to switch all the cutscenes to video anyway. It was also a great opportunity to try out OpenToonz which is an open-source software based on Toonz (which is the animation software used and customised by Studio Ghibli).
Anyway, no biggie. I had my suspects regarding this weird occurrence, but I decided not to investigate. I wanted to switch all the cutscenes to video anyway. It was also a great opportunity to try out OpenToonz which is an open-source software based on Toonz (which is the animation software used and customised by Studio Ghibli).
The battle begins...
I know that there are some pretty good features in OpenToonz that I hope will become super useful and help us make amazing animations in the future. I want to keep the simplicity of our animations for the cutscenes, as a tribute to the Hungarian folktales cartoon I mentioned a few posts ago. So I thought it would be useful to start getting to know OpenToonz by recreating the existing intro animation with it.
I have to say I love the Function editor in OpenToonz. It's nothing fancy, yet I feel that this is a better UI that gives you more precise control over the values you want to animate.
I have to say I love the Function editor in OpenToonz. It's nothing fancy, yet I feel that this is a better UI that gives you more precise control over the values you want to animate.

So far I have only experimented with keyframes and moving stuff around (and changing scale). I know it can do more. I know there are other software that would do this job just as well, but I intend to find out about all the cool features of OpenToonz in the future. The editor is great, I am loving it.
There is just one problem though... rendering the actual video.
There is just one problem though... rendering the actual video.
I think I'm gonna cry now
Alright then, I've got some test animations in place, let's make a video and put it into Unity!
I got some simple and short animations in OpenToonz exported as uncompressed avi before, so I thought it was going to be a cakewalk, but boy, was I wrong...
First things first, because we had the story told by a storyteller recorded, I had to time the animations to the recording. So first I needed to import the audio in OpenToonz. Turns out it only works with 8 and 16 bit PCM .wav files.
I tested it with a few seconds long piece of the full animation and it was fine. Yay!
So I went ahead with the rest and finished the whole intro anim which is about 1:30 long. I hit render and waited... and waited... and waited some more... only to find out that something was seriously wrong. According to VLC the avi didn't have an index or it was corrupted. I tried playing it anyways but the video was complete nonsense, except for the last few seconds.
I tried changing the video codec, the render and camera settings, everything I could think of. After a few painful days of trial-and-error, I figured out that if the animation that I want to export is longer than about 500 frames it comes out as nonsense, except for the last 500 frames. I didn't find anything helpful about this online, but in my last moments of desperation I came up with a workaround so that I don't have to ditch OpenToonz.
Here's my ridiculously complicated work pipeline :D
1. Put animation together in OpenToonz (use 16bit .wav to time animations)
2. Export frames as pictures to a folder (that's about 2200 frames for the intro)
3. Import frames and good quality audio into a video editing software
4. Export .avi (because I can't get it to produce an .ogv)
5. Use ffmpeg2theora to convert it to .ogv (bacause Unity only deal with .ogv)
6. Put it into Unity
I got some simple and short animations in OpenToonz exported as uncompressed avi before, so I thought it was going to be a cakewalk, but boy, was I wrong...
First things first, because we had the story told by a storyteller recorded, I had to time the animations to the recording. So first I needed to import the audio in OpenToonz. Turns out it only works with 8 and 16 bit PCM .wav files.
I tested it with a few seconds long piece of the full animation and it was fine. Yay!
So I went ahead with the rest and finished the whole intro anim which is about 1:30 long. I hit render and waited... and waited... and waited some more... only to find out that something was seriously wrong. According to VLC the avi didn't have an index or it was corrupted. I tried playing it anyways but the video was complete nonsense, except for the last few seconds.
I tried changing the video codec, the render and camera settings, everything I could think of. After a few painful days of trial-and-error, I figured out that if the animation that I want to export is longer than about 500 frames it comes out as nonsense, except for the last 500 frames. I didn't find anything helpful about this online, but in my last moments of desperation I came up with a workaround so that I don't have to ditch OpenToonz.
Here's my ridiculously complicated work pipeline :D
1. Put animation together in OpenToonz (use 16bit .wav to time animations)
2. Export frames as pictures to a folder (that's about 2200 frames for the intro)
3. Import frames and good quality audio into a video editing software
4. Export .avi (because I can't get it to produce an .ogv)
5. Use ffmpeg2theora to convert it to .ogv (bacause Unity only deal with .ogv)
6. Put it into Unity
BUt wait, there's more
Now that we have the video in Unity, we only need to hit play and we're done... However, in code I need to start the video and the audio stream separately. So I am not sure if there is anything that makes sure that the video and audio will stay in sync whatever happens... Sigh... do I need to write my own video player too?
Comments
You need to be signed in to leave a comment.
Log in