SVG support of textures.

Hello.  I've used SVG some and find it to be very nice for it's 
purpose.  It is clearly not intended to be a replacement to bitmap 
graphics.  There are, however, some features that I would like to know 
if can be implemented or are appropriate for SVG, mainly the support of 
textures for a stroke or fill of a path, apart from using patterns as a 
texture.  The current possibilities seem to be:

1.  Use a pattern, import a bitmap image and a pattern fill.  The 
problem is that an external editor is required to produce the image.  A 
small texture image can not be scaled up by much before the pixels 
become noticeable, but a larger texture image consumes more space, 
possibly as large as the SVG file or more.

2.  Use filters and turbulence.  I've played with Inkscape's filter 
effects and like them, but they are also not fully suited to textures.  
The filter best suited is the turbulence filter, which can be connected 
in a way to create some turbulent noise effects.  However, for any given 
object with such a filter applied, changes in size, position, rotation, 
etc can also affect the outcome of the texture.  Furthermore, the 
filters don't support a great deal of texturing, with mainly the 
turbulence filter as the only real texturing filter currently 
available.  Other filters that produce difference sorts of noise such as 
crackle/cell based noise, could be introduced, or a way to provide a 
simple user-defined noise function for use by the filter.

A possible solution if it would fit would be to have native texture 
support in the SVG standard.  For each texture there would exists an 
origin, rotation, basically a complete transformation matrix.  If an 
object uses a texture is moved or transformed, the visual appearance 
will remain the same as long as the texture's transformation is adjusted 
accordingly.  This is similar to a gradient, an object can be moved and 
if the gradient it uses is transformed accordingly it will still have 
the same visual appearance.   If a filter could have such a 
transformation so that any effects that need to honor transformations 
would do so (such as the turbulence effect), then a path using a filter 
can be transformed, and the filter can be properly transformed as well.

Well, that is just my ramblings.  Such support may already exist or be 
planned for a future version of SVG.  I do, however, believe that SVG 
would be more complete with some thorough texturing support as part of 
the specification, so that graphics developed with SVG don't always have 
that real 'clean' look that vector-based graphics tend to have, but can 
have an added sense of realism through such use of texturing.

Brian Vanderburg II

Received on Monday, 21 January 2008 15:52:34 UTC