Comment 32 for bug 180693

Revision history for this message
Jaspervdg (jaspervdg) wrote :

@Steven: as mentioned, the general problem here is most likely simply the sensitivity of the filter effect you are using to quantization issues and other causes of numerical inaccuracy. In theory, the output of the Gaussian blur should be completely smooth, but given that we operate with only 8 bit precision (per channel), it most definitely will not be. In fact, it will have a kind of staircase structure to it. Under normal circumstances the "steps" are small enough that they are not too obvious to our eyes (most of the time). Now, the first thing the filter does, is make the steps more obvious by computing a derivative. Especially in areas where the slope is fairly flat, you will either get some finite non-zero slope, or you will get a zero slope (this causes the contours!). Next, these differences are amplified even more because while small differences in slope cause reasonably small differences in angle to the light source, small differences in angle to the light source can make a huge difference in the color (this is determined by the "specularExponent" attribute).

It would be possible to improve results a bit by combining various steps to avoid some rounding steps, but this would require some pretty intense changes to Inkscape's filter rendering (and risks going against some of the more obscure aspects of the SVG spec). Ultimately, the only thing that would really help is a higher bit depth for at least the intermediate results. However, this would at the very least require more memory, may slow down filter rendering, and might again require some fairly involved changes to Inkscape.

Still, this issue is somewhat different from the banding exhibited by gradients (although ultimately the solution may be the same), so I suggest opening a new bug report. Note that compared to gradients, there is a slight possibility this will be easier to fix (although likely still not easy), as Inkscape does all of its own filter rendering.