Difference between revisions of "Super Sample Layer"
m |
m |
||
Line 10: | Line 10: | ||
For instance, consider averaging two pixels, one a completely transparent red (R:1 G:0 B:0 A:0) and the other an opaque green (R:0 G:1 B:0 A:1). When being alpha safe, the average is (R:0 G:1 B:0 A:0.5). When not being alpha safe, the average is (R:0.5 G:0.5 B:0 A:0.5). | For instance, consider averaging two pixels, one a completely transparent red (R:1 G:0 B:0 A:0) and the other an opaque green (R:0 G:1 B:0 A:1). When being alpha safe, the average is (R:0 G:1 B:0 A:0.5). When not being alpha safe, the average is (R:0.5 G:0.5 B:0 A:0.5). | ||
+ | |||
+ | It's worth pointing out that the Super Sample layer is disabled when the 'quality' setting is 10 or higher. During editing, the quality is 10. | ||
+ | |||
+ | If you want to see an example of what Super Sample does, create an outline and turn off it's anti-aliasing parameter. It will look jagged around the edges. Add a Super Sample layer over the top of it, save the file and render it to an image. Rendering with 'synfig -Q 10 file.sif' will leave it jagged, and 'synfig -Q 9 file.sif' will make it smoother. |
Revision as of 17:38, 11 September 2007
The Super Sample layer is used to anti-alias all the layers under it.
It isn't often needed, since most layers produce smooth output already.
You specify width and a height parameters. Internally, the scene is rendered <width> times wider and <height> times taller than the output image, and then each <width> by <height> block is averaged down to a single pixel.
For example, the output image is 320x240 pixels, the width and height parameters of the Super Sample layer are both set to the default value of 2. Synfig will render a 640x480 image internally, and then average the 4 pixels in each 2x2 block down into a single pixel that it then uses in the output image.
The 'Be Alpha Safe' checkbox makes the averaging process aware of the alpha channel. When 'Alpha Safe', the average is sum(color * alpha)/sum(alpha), with an alpha value of sum(alpha)/sum(1). When not 'Alpha Safe', the average is simply sum(color)/sum(1).
For instance, consider averaging two pixels, one a completely transparent red (R:1 G:0 B:0 A:0) and the other an opaque green (R:0 G:1 B:0 A:1). When being alpha safe, the average is (R:0 G:1 B:0 A:0.5). When not being alpha safe, the average is (R:0.5 G:0.5 B:0 A:0.5).
It's worth pointing out that the Super Sample layer is disabled when the 'quality' setting is 10 or higher. During editing, the quality is 10.
If you want to see an example of what Super Sample does, create an outline and turn off it's anti-aliasing parameter. It will look jagged around the edges. Add a Super Sample layer over the top of it, save the file and render it to an image. Rendering with 'synfig -Q 10 file.sif' will leave it jagged, and 'synfig -Q 9 file.sif' will make it smoother.
Language: |
English |