W3C home > Mailing lists > Public > www-svg@w3.org > May 2008

Re: feTurbulence with filter primitive subregions

From: Erik Dahlström <ed@opera.com>
Date: Tue, 13 May 2008 11:09:58 +0200
To: robert@ocallahan.org
Cc: www-svg <www-svg@w3.org>
Message-ID: <op.ua242wb6gqiacl@gnorps.palace.opera.no>

On Mon, 12 May 2008 19:10:44 +0200, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> On Mon, May 12, 2008 at 5:31 AM, Erik Dahlström <ed@opera.com> wrote:
>
>> On Sun, 11 May 2008 09:24:01 +0200, Robert O'Callahan <
>> robert@ocallahan.org> wrote:
>>
>>  It's not clear to me from the spec what the 'point' parameter of the
>> > 'turbulence' function means.
>> >
>> > Suppose I have
>> > <filter primitiveUnits="userSpaceOnUse" x="0" y="0" width="20"
>> > height="20">
>> >  <feTurbulence x="10" y="10" width="10" height="10"/>
>> > </filter>
>> >
>> > When we compute 'turbulence' for the top-left corner of the  
>> feTurbulence
>> > filter primitive subregion, what is 'point'? I assume it's either  
>> (0,0)
>> > or (0.5,0,5).
>> >
>>
>> I think that should depend on how an implemention does sampling in
>> general. It's unlikely that an error would be easy to spot in most cases
>> though.
>>
>
> 'point' values range from 0 to 1, don't they?

'point' is the point you calculate noise/turbulence for, so I'd expect it  
to be something like (x+sampleOffset,y+sampleOffset) and that x and y are  
changed as you filter each point in the filter primitive subregion.

> So you'd get a completely
> different image depending on whether you interpret the turbulence as  
> filling
> the filter region and being clipped to the filter primitive subregion, or
> just filling the filter primitive subregion.

Not sure I understand what you mean. Do you mean that the sample point is  
different on the edges of the filter primitive subregion than in the  
interior?

I think that calculating feTurbulence outside the filter primitive  
subregion is a wasted effort, but nothing forbids an implementation from  
doing so as long as the result is clipped to the filter primitive  
subregion afterwards.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Tuesday, 13 May 2008 09:08:38 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:39 GMT