Sonic the Hedgehog: Intro parody

Hey everyone!

I finally finished my Sonic parody! It’s like 10 seconds long and yet it took me more than a year… Of course, accounting my daily job and all, but still a lot of time were spent on this one. With this parody I actually tried to do my best so do check it out here:

Okay, so what am I proud of:

  • Unlike my previous Spy vs Spy cartoon I made proper linework for Sonic model. Although, lines are not made in Synfig. What I did is, I rendered only regions with slight color offset to mimic Z Depth like so:

Then I created a Perl script that would process rendered png files through ImageMagick’s CannyEdge filter and create a separate set of images with lines (the color offset is needed for ImageMagick to see where one shape ends and other one starts). I combined those regions and lines in Pencil2D and then manually corrected them with my Wacom tablet which was much less suffering than working with lines in Synfig, believe it or not

  • Complex background with a lot of layers and parallax effect. I do think it looks very nice. Ah, it would have been even better to make the ribbon flutter like a flag in the wind but I don’t know how to implement it yet… Maybe with Dynamic converter, haven’t experimented with it
  • The special effects like waterfalls and water. Especially water. I made waves using dashed outlines with “Dash Items Offset” parameter animated. On top of it is Noise Distort layer that make those dashes look somewhat similar to ocean waves

Here’s a waterfall from the linked animation, done using the same technique:


Waterfall

And the source for it:
Waterfall.sifz (21.7 KB)

Oh, and by the way, Happy New Year! I am a bit late on this and the animation doesn’t have to do anything with it, but I am in a good mood and hopefully you are too! If you have an animated project in the works I wish you to finish it this year!

6 Likes

Bravo and Happy New Year to you too :slight_smile:
Good job (as always).
I’m missing the good old time of Sonic and other video games when they didn’t require a supercalculator and a bunch of GFX cards to run!

1 Like

Yeah, I no longer play anything modern. I need to upgrade my PC it’s like 15 years old, I got one of those earliest Intel Core i5 from 2010. But upgrading PC is just such a hassle, buying all those parts, reading specs, reinstalling everything… And besides, original Unreal Tournament runs fine on my PC and I feel like it still satisfies all my gaming desires.

Don’t wait too much, the cost of RAM is becoming crazy because of IA trend.
Their are alreay in lack and they have “the good idea” to solder them on motherboard (of laptop at least), so you can’t even use it on another computer.
My laptop is not yet 3 years old and has already issues, my Core2 Duo of 2006 is still working and I use it as a rescue and for tests!

My advice: buy a middle-end config soon, no need super performances and lot of money, don’t expect it to work for 15 years again, before all the AI crap would be installed on motherboard …
And use Linux only!

Eh, if I am going to buy a new PC the goal wouldn’t be gaming (well maybe a little) but primary for animation purposes. So I would be looking for a CPU with the best single-thread performance (since Synfig can’t do multi-core or GPU rendering) everything else is not very important. Some low-end GPU and 16 GB of RAM wouldn’t cost that much I believe.

There are other software than Synfig :wink:
And maybe one day Synfig will work differently

1 Like

Heresy.

Yeah… I mean, I am wearing this “Developer” badge now so maybe it’s me who has to do something with that but, you know, coding is not my field and free time is scarce. Maybe one day, indeed…

It does have multihreads for rendering, but it does not render multiple frames simultaneously…

It will :wink: Let’s finish the port to Cobra so we can do it :slight_smile: There was a GSoC project that made some goods steps in this direction!

1 Like

Well, we’re slowly getting there. I was busy debugging that pixel shift and hopefully we found the problem. I made the PR: fix(rendering): fix 1px offset caused by improper rounding by Svarov-RZM · Pull Request #3667 · synfig/synfig · GitHub
I would like to get it merged before continuing with the ports just to be sure that there’s no longer global issue lurking underneath.

Technically, we could do it with several instances of command line/renderer, but the input of ffmpeg would still be one frame only at a time (and they should be added in the proper order).
Or to divide the project in several chuncks, with multiple lossless output videos to be assembled and maybe compressed afterwards (or even with png’s).

We could improve Cobra renderer too: trying to cache a layer render if it knows its output (and requested size) won’t change for a while in the animation, for example.

Very nice job Svarov :smiley:

Now I need to read very carefully about your method with depthmap.

If I understand correctly at this time, you make a depthmap so that ImageMagick can create and overlay black ink lineart?

1 Like

Yeah, exactly! The technique is a bit insane though. I will try to explain it in depths on weekends, gotta make an example first to illustrate things.

What is that painful so you used these tricks?

Masking is the pain! All that masking… All those handles… Handles everywhere…

Okay, let’s do a deep dive, hopefully someone will find it interesting.
You understand that making outlines in vector software, doesn’t matter if it’s Synfig or anything else, requires doubling the amount of layers, right? You make a region and you need an outline for that - boom, two layers instead of one. Doesn’t seem like much but for a whole character? Makes a huge difference. On each frame you gotta move those handles on advanced outlines or introduce an ADDITIONAL layer for masking the overlapping lines. It becomes a mess… a mess of layers and waypoints!

What if we throw away all the outlines from our little project then? Only solid-colored shapes. No masking. No problems. Here’s a Sonic’s arm from my animation (I simplified it for clarity, removed all animation from it):

Source:
DepthMapEx.sifz (33.2 KB)

See the problem now? The glove is white and you cannot see where one finger ends and the other one starts. It’s a just a white blob. Here’s a screenshot of layer’s tree, take a look:

Notice those “ZDEPTH” layers. They alter color of the layers below them. Let’s enable them:

Aha! You can now see all the shapes that the hand is made of and so you can start animating stuff! Without lines! We basically created a depth map where the layers that are closer to viewer are warmer and layers that are further from the camera are colder.

OK, so we created our animation, what next? We don’t have any lines and without them the work will look like that cheap corporate style you see everywhere. Well, we use ImageMagick to create lines for us. So we render our work without “ZDEPTH” layers enabled and get one set of png files. Then we enable “ZDEPTH” layers and render our work again to get a second set of png files.

ImageMagick… Yeah… It has horrible documentation. Just like Synfig. It’s awesome. Anyway, we need ImageMagick’s CannyEdge filter. Here’s the magick command: magick.exe E:\Animation\Sonic1\Scene1\DepthMapEx-En.png -canny 0x0.1+10%+5% DM.png and here’s the result:

We’ve got lines! Ugly, non-antialised lines! Now we only need to write a Perl script to apply this command to every png file in second set, change black to transparent, and we have our set with lines. By the way, what programming language would you use to accomplish this? Don’t answer that, I know what - Python.

Okay, so we have two sets now, next what? We fire up a very cool program called Pencil2D. In it we import our two sets, put the one with lines on top, take our beloved Wacom tablet (not sponsored unfortunately) and start correcting it by hand. After that is done, we export everything at half the resolution to get anti-aliasing since CannyEdge filter doesn’t produce smooth lines, and we’re done.

The question you might want to ask, is it really worth it? Does correcting lines by hand really faster than having sex with masking in Synfig? God, I don’t know. I need to find the ultimate technique. For now, it seems that my approach is a bit more comfortable but maybe I’ll come up with something more convoluted in the future.

50 shades of anti-aliasing
:no_one_under_eighteen:

Tbh SynfigStudio barely takes any cpu or GPU and ram it’s kinda of a simple normal app

Maybe you need an “invisible edge” in each of the fingers. See how I did it.

Yeah, because multi-core render is a mess. It renders some types of layers using all cores and then the majority of layers render using only one core.

Aha, because GPU render is not implemented.

When making very basic vector graphics, yes. Something like this and it’s death: Autumn Trees (scenery test)

Thanks, I know this technique but it’s not applicable to me because fingers are made of thick outlines, not regions.