Log in

View Full Version : Vectorize animation film


dansrfe
21st October 2010, 06:21
How can I vectorize and clean up this dusty/grainy animation source. As per my knowledge, if the source is a simple animation (hand-drawn frames) Disney movie source then it CAN theoretically be upscaled to any resolution after cleaning up the source and vectorizing it right? Can anyone please guide me in the direction to achieve this? I do have Adobe Illustrator, Photoshop, and others in the suite to accomplish the job if need be but I'm kind of hoping I can accomplish the job using AviSynth alone :)

EDIT: Sample: Here (http://www.mediafire.com/?n5vof8t3izi9skp)

pandy
21st October 2010, 12:14
Resize source x4-8 (pointresampling), use strong large kernel median filter, save each frame as picture, http://potrace.sourceforge.net/, then You need some vector 2 raster engine (maybe something based on OpenGL then You can use GPU to render by hardware this part), after rasterization read pictures to AviSynth as video.

dansrfe
21st October 2010, 17:26
Could you show me a sample script of the first twp steps and how to do the vector to raster step as well. Also is there some automatic way to save each frame as a png in step 3?

EDIT: So I'm guessing the resizing is a simple pointresize that is like 6x and then which kernal median filter is recommended for this source? Also, I think I need to clean up the dust/grain pretty well before all of this and the color/levels/balance correction I'm almost done with. I'm not quite sure how some of the "painted" scenes will look post vectorization though. I just put up the sample so that might help a bit I hope.

Ghitulescu
21st October 2010, 17:52
How can I vectorize and clean up this dusty/grainy animation source. As per my knowledge, if the source is a simple animation (hand-drawn frames) Disney movie source then it CAN theoretically be upscaled to any resolution after cleaning up the source and vectorizing it right? Can anyone please guide me in the direction to achieve this? I do have Adobe Illustrator, Photoshop, and others in the suite to accomplish the job if need be but I'm kind of hoping I can accomplish the job using AviSynth alone :)

EDIT: Sample: Here (http://www.mediafire.com/?n5vof8t3izi9skp)
It depends on how the vectorisation is done.

Examples of (close to your goal) vectorisation are the TTF fonts and the GPS maps. A CAD-type vectorisation is not suitable for cartoons.

dansrfe
21st October 2010, 18:01
It depends on how the vectorisation is done.

Examples of (close to your goal) vectorisation are the TTF fonts and the GPS maps. A CAD-type vectorisation is not suitable for cartoons.

How can I accomplish that? :)

dansrfe
21st October 2010, 18:11
btw I'm running telecide(post=2) on this cause of the shifted fields on only some of the scenes. I hope that's the right way to deinterlace it

Ghitulescu
21st October 2010, 21:57
There are public algorithms on maps vectorisation, also the TTF set of algorithms was public once. I mean I have found them in internet.
CAD algorithms are much simpler but they do not provide the needed finesse.

dansrfe
21st October 2010, 22:05
So I would use maps vectorization and TTF algorithms inside AutoCAD? As plugins?

2Bdecided
22nd October 2010, 10:50
Have you explored the other routes in AVIsynth which don't explicitly vectorise the animation, but give a similar overall result - i.e. denoise, upscale, clean lines etc? Just wondering where you're coming from on this, because some of the existing AVIsynth scripts for animation are pretty spectacular.

I'd imagine vectorising individual frames separately without regard for the others could have some stability issues when replayed as a video - i.e. you'd see issues in motion which wouldn't be apparent on single frames. e.g. a tiny unnoticeable difference in vectorisation from one frame to another could cause a supposedly stationary line to wiggle annoyingly.

EDIT: Hercules? That's not so simple. You'll struggle to vectorise the nicely out-of-focus backgrounds and shaded textures in a meaningful way. You risk making it look horrible.

Cheers,
David.

pandy
22nd October 2010, 12:30
yep - for some cartoons it can be possible but not for cartoons like Hercules - to many gradients in picture - this new modern computer accelerated cartoons with lot of 3D stuff are difficult to be vectorized - theoretically You need to extract layer (cartoon - 2D) from other 3D backgrounds (or rather pseudo 3D) layers. Seems like perfect solution for some fancy (neural network based?) video algorithms.

dansrfe
22nd October 2010, 17:05
yep - for some cartoons it can be possible but not for cartoons like Hercules - to many gradients in picture - this new modern computer accelerated cartoons with lot of 3D stuff are difficult to be vectorized - theoretically You need to extract layer (cartoon - 2D) from other 3D backgrounds (or rather pseudo 3D) layers. Seems like perfect solution for some fancy (neural network based?) video algorithms.

Have you explored the other routes in AVIsynth which don't explicitly vectorise the animation, but give a similar overall result - i.e. denoise, upscale, clean lines etc?

Vectorization just seemed like a more fruitful alternative to just AviSynth'ing since the source looked like it was a good candidate for it but after seeing all the complex 3D backgrounds like pandy and you pointed out, I agree. But is there, possibly, a way to extract the 3D layers (complex backgrounds etc.) from the 2D and vectorize the 2D stuff as pandy has said?

poisondeathray
22nd October 2010, 17:09
Bt is there, possibly, a way to extract the 3D layers (complex backgrounds etc.) from the 2D and vectorize the 2D stuff as pandy has said?

one way is to mask it out manually , rotoscoping

You can heavily denoise to destroy gradients to improve your vector conversion

But even some foreground elements have too many gradients for converting raster=>vector

I don't see why you are doing this, unless your goals was only to isolate a few elements to use in another project

pandy
22nd October 2010, 18:26
http://img26.imageshack.us/img26/9172/snapshot20101022182107s.png

This preprocessed source (GIMP, color tweak, Selective Gaussian Blur, sharpening)

After vectorization in Inkscape (which use for this Potrace)
You can expect something like this...

http://img641.imageshack.us/img641/6522/snapshot20101022182107.png

this is results for rasterized svg (vector) file - target resolution 1080 lines (HD)
there is still some room for improvements but IMO do not expect miracles

dansrfe
22nd October 2010, 19:13
yea i don't think I want that result at the bottom^. Looks too cartoonish.... I guess I'm back to good old AviSynth'ing then :). btw which denoiser would be good to use for this? Another main issue I'm having is that I've never really worked with non-film material such as animation etc. I'm not sure if the same approach towards degraining/denoising film (mvd or fft) will work effectively on an animation source such as this with some complex background scenes along with a variation of of flat 2D scenes.

http://img263.imageshack.us/img263/490/erga.png

I just need to solve the grain/noise problem on this source. Plus the interlacing seems a little too sporadic for just telecide(post=2). maybe I need to tweak the parameters or something more.

EDIT: I'm not planning on scaling it to 1920 x 1080 since I usually do that kind of stuff on-the-fly in my autoresize script in ffdshow. I just upscaled it to 1080p without any sharpening to show the noise/grain problems a bit more clearly. I like to do this to see how it would look when I would actually upscale it in ffdshow because then I have to make the source cleaner than usual even for a SD res.

dansrfe
23rd October 2010, 13:49
I wonder how Disney does this stuff for BD releases of Beauty and the Beast or Aladdin that look so great in this "vectorized" format in which the 3D and hand-painted stuff still looks brilliant. I guess they have access to the individual layers and such.

pandy
23rd October 2010, 21:55
Disney have money so they can even rent people ( i think that they work quite closely with some Russian animation company) to make such work manually (with the help of computers but anyway a lot of hand work).

Also motion analysis can be involved - at least i see that 2D and 3D(2.5D) layer are bit different in the terms of motion.

dansrfe
24th October 2010, 00:34
So shifting the discussion a bit, how can I go about cleaning the dust/grain from this particular source? I want to sort of "eradicate" the noise on the flat areas but still have the detail on the complex backgrounds.

2Bdecided
25th October 2010, 13:47
I wonder how Disney does this stuff for BD releases of Beauty and the Beast or Aladdin that look so great in this "vectorized" format in which the 3D and hand-painted stuff still looks brilliant. I guess they have access to the individual layers and such.They start with a 35mm film negative, not a 720x576 MPEG-2 encoded version!

There are companies offering automated restoration, and Disney sometimes resorts to frame-by-frame hand re-touching of difficult artefacts.

Before digital, they'd get a very steady-handed person to take a razor blade to any faults on the negative. Or at least, that's what the Fantasia restoration documentary claims.

Cheers,
David.

dansrfe
26th October 2010, 05:26
Why do they store animated content on a 35mm negative? lol I thought all of this was digitally scanned with at least like a 10K resolution or something.

Ghitulescu
26th October 2010, 08:33
Why do they store animated content on a 35mm negative? lol I thought all of this was digitally scanned with at least like a 10K resolution or something.

Nothing is scanned at 10k.
Not too long time ago, 2k was the scanning standard, then appeared 4k. 8k is now used as a marketing hype.

As any serious photographer can tell you, there's no need to scan at resolutions higher than the optical resolution of the medium used (I don't want to get into a polemic here).

And 35mm is still used in cinemas ;) which are the biggest revenue source anyway.

dansrfe
26th October 2010, 09:00
Why is film made from the negative still used in this day and age for movies that have been digitally shot (which imo should be everything nowadays)?

odyssey
9th January 2012, 03:21
Why is film made from the negative still used in this day and age for movies that have been digitally shot (which imo should be everything nowadays)?

Beats me. Many of the blu-rays coming out are even sourced from that. Fortunately that has changed lately.

To partly answer your initial request - Try the "Remation (http://forum.doom9.org/showthread.php?p=1091251#post1091251)" AviSynth script. It allows you to upscale and clean up animation rather well. It's not vector, but it sure looks good even with heavily distorted sources.

(Sorry for reviving an old thread, but I stumpled upon it with google)