Gradient Export, Which Codec?

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
cribble
Posts: 899
Joined: Wed Aug 04, 2004 12:42 pm
Location: London, UK
Contact:

Gradient Export, Which Codec?

Post by cribble »

Hello everyone.

I've been doing some test animations recently, and i've found that whenever i export a scene with a subtle, but long gradient, the codec destroys it and makes the colours clump together in blocks, and creates a soft line that divides the colours apart.

I was wondering, what Quicktime codec is best for exporting scene's with a lot of colour data, such as a gradient?

I can not provide any examples at present, sorry.

Thanks
--Scott
cribble.net
User avatar
slowtiger
Posts: 6079
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Best choice: no compression. This would be "Animation"codec in highest quality setting, or even a sequence of PNGs. But because of the big file size this is only suitable for stuff which goes into still another program.

Any other codec will destroy your nice gradient more or less visibly.
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

As far as I know, Sorenson 3 is lossless, so this would produce a much smaller file than having no compression at all.
User avatar
slowtiger
Posts: 6079
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Sorry, Sörensen is definitely not lossless - otherwise it coudn't reduce file size.
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

One thing does not necessarily follow from the other -- the GIF format is lossless, and those files are small -- so is RLE encoding, and I'm sure there are other examples...
You can't have everything. Where would you put it?
User avatar
Manu
Posts: 325
Joined: Tue Aug 03, 2004 10:11 pm
Contact:

Post by Manu »

In Quicktime, "animation" at full quality is supposed to be lossless (=RLE)
User avatar
cribble
Posts: 899
Joined: Wed Aug 04, 2004 12:42 pm
Location: London, UK
Contact:

Post by cribble »

Hello, thanks for everyones responses. I did some tests for you guys to look at.

Here's a simple mock up scene (mov 348kb)

Codec used:
Animation
Million Colours+
Full quality


And here's a still that is directly from a render (png).

Now i'm being picky here, but can anyone see what I'm talking about. As the gradient slides off towards the planet you can see... well... the colours blocking up. My only concern is that when i make this into a DVD'd final product, will the gradient quality look this bad (can't burn a dvd right now)?

I also read somewhere that the ratio for the animation codec on full quality is like having a 1:1 compression almost. So the problem isn't the codec, i've got a feeling it's the AS's gradient abilities.
--Scott
cribble.net
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I supouse you're talking about hte gradient of the black space from left to right (more or less).
I see the mov more ore less the same as the png. Yes, there are strips of gradient (thick strips) I think like you that it is a AS problem of gradient not the codec. PNG have the same effect (very small but it is). If you elevate the bright of the monitor you will see the gradient effect. I think it would happen in same situations on other programs. Try to do with another program and see what happen.

Genete
User avatar
slowtiger
Posts: 6079
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

The problem you have is known as "banding" in printing industry for decades now, and it happens always when you have to spread a short colour range over a long screen distance. What you see is the borders between the single values of the 3 8-bit colour channels. As long as you don't increase the resolution (to 10 or 12 bit), there's no way to get rid of them.

In printing there's some tricks to deal with that. The most common is to apply some kind of noise over the gradient so the values will get a bit stirred and don't form a line anymore. Unfortunately this will not work in video files since they still average the image in small sqares of 8x8 pixels, no matter which codec is used.

For your style the solution can be simpler: don't use gradients. If you absolutely must, restrict them to short screen distances. Your style has flat colours everywhere, so just stick to that and everything will be fine.
Post Reply