Blending between a blurred and un-blurred image does not produce a variable width blur. You would need n number of blurred images to do that, where n number of images.
What you do is blur a variable amount. : Note the difference in the top blur (our compound blur) and the mixing between a blurred and non blurred image http://i.imgur.com/TjCZY.png http://vade.info/CompoundBlur.mov Im sorry but I cannot disclose our algorithm, but if you research how to do a fixed width convolution kernel blur (box or gaussian), separate it (for speed and cleanliness) it should be apparent how an additional sampler input can modulate a uniform float input :) As for the note about mip mapping, that is certainly a fast approach, and mip-mapping is possible within QC if you use the Image Texturing Properties patch. Note howeveer that forces GL_TEXTURE_2D (as rect is default in core image/video and Quartz Composer), can mean some patches act very odd with an image input thats 2D (or flat out fail if its a 3rd party QC input and they dont check the [self.inputImage textureTarget] value when binding. Just saying, it act odd, but really should not :) On Aug 13, 2010, at 2:08 PM, Miroslaw Rusin wrote: > what's the algorithm for compound blur then? > > attached demo with example pics from > http://livedocs.adobe.com/en_US/AfterEffects/8.0/help.html?content=WS3878526689cb91655866c1103a9d3c597-7baa.html > > top-right corner picture is generated > > all in "Compound Blur" macro if you want to copy-paste in your composition > > also added blurred img cropping; you can change gaussian blur to something > else if you like as well > > M > > <compound-2.qtz> > > On 13 Aug 2010, at 16:28, Stonewall Ballard wrote: > >> A constant blur with a modulated blend produces a different effect than a >> true compound blur. I don't know about doing this in QC, but for other work, >> I use a mip-map or a summed area table. Can you get at a mip-map in QC? >> >> - Stoney >> >> On Aug 12, 2010, at 2:48 PM, vade wrote: >> >>> Thats totally not rendering correct for me, nor is it the best way of >>> handling it. You can do it in a single custom core image filter. Im not >>> able to hand out code, but read up on separable convolution kernels, and >>> get it working for a constant amount for the entire image, and then >>> modulate that amount by the intensity (a dot product) of a second sampler. >>> Also you will need to pay attention to destination coordinates in core >>> image, ie, ROI and DOD since you are handling multiple input images and >>> samplerCoord may not be correct depending on your GPU, and size of input >>> image. >>> >>> On Aug 12, 2010, at 2:11 PM, Miroslaw Rusin wrote: >>> >>>> >>>> <compound.qtz> >>>> >>>> <Screen shot 2010-08-12 at 20.09.49.png> >>>> >>>>> >>>>> There are often times where I want to blur an image based on a mask and >>>>> simply using the mask to blend a blurred and a clean version of the image >>>>> is not enough - I want to blur the image more or less, based on the >>>>> intensity of the mask. Performance always matters, but quality is more >>>>> important... HD in realtime is probably not doable, I'm thinking... so >>>>> processing and rendering will be acceptable levels of performance... >>>>> >>>>> Patrick >>>>> >>>>> P.S. - I did mean Quartz Composer >> >> -- >> Stonewall Ballard >> [email protected] http://stoney.sb.org/ >> > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Quartzcomposer-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com > > This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

