Sphinx.
![]() |
||||||
Posted: December 12, 2007 8:39 am | ||||||
Sphinx.
![]() |
Further information that couldn't fit in the description field:
The blur module is a bitmap based filter, which means that in order for it to work, it must rasterize (render) its input to an internal bitmap. We don't want the actual blurring, but setting the radius to 0 makes the module bypass itself (hence no rasterization), so we need to set it to the minimum instead: 0.0000001 Now every module connected to the output of that blur will draw samples from the blur components internal bitmap and not its input ![]() Since the blur module process red, green, blue and alpha, you can use this advantage to buffer several independant grayscale sources in one blur (look at the construction of the snippet). The method has some sideeffects you should be aware of: * Increased initialization time Typically you'll see a slow start because the internal bitmap is being rasterized, but when that step is over (typically after a few rows of rendering), it'll fly! * Increased memory usage Because of the internal bitmaps, the memory usage will grow significantly. Be aware that the global FF configuration * No real subpixel samples Because the rasterized bitmap is same size as the output image, subpixel sampling (antialias) will fetch interpolated samples inbetween pixels. If sample for pixel 1 is black and sample for pixel 2 is white, all subsamples will be within this range (i.e. shades of gray). This means that high frequency inputs (like a perlin with high roughness), might not render out as crispy as they normally would. Plugging the buffer blur output into refractions, offsets and noise distortions can of same reason also result in different results. If you dare, you could experiement with the "Anti-alias sources for bitmap-based components" option in FF, but this will most probably negate out the speed-up advantage. Understanding how this works and being aware of these sideffects is important. Also try to limit the amount of user controls for things going into the blur buffer - if possible use alternate "post blur" constructions as this will give very good control response for the user (since the blur doesn't need to update when its input is unchanged). Again look at the two controls in the snippet - they are placed after the blur, making their response changes render very fast. |
|||||
Posted: December 12, 2007 8:41 am | ||||||
Carl
![]() |
Very interesting Michael I'll have to give it a run in a filter
![]() |
|||||
Posted: December 13, 2007 1:37 am | ||||||
Sphinx.
![]() |
With my recent Cell Leather filter I tried submitting twice, rejected both times because it was too slow.. So I applied this buffering method, which made a huge difference (its quite fast now)..
And actually the first submit of the buffer filter snippet were rejected too, because I included *one* reference preset without buffering ![]() |
|||||
Posted: December 13, 2007 2:03 am | ||||||
ronviers
![]() |
This looks like a real breakthrough.
When I get some time I will try it on my turquoise texture. It would be great if it worked for that one – I spent weeks working it out. Thanks a lot for this excellent snippet. ![]() @ronviers |
|||||
Posted: December 13, 2007 2:08 am | ||||||
Sphinx.
![]() |
If the small offset issue (I think its a bug) with the Motion Blur doesn't matter, you should definitely use Motion Blurs for buffering (faster than normal blur).
I think the blur module fetches 9 (maybe just 5) samples per rasterized sample in the internal blur bitmap for even the lowest radius. Whereas the motion blur only fetches 3. Ideally the method only requires one sample (that would be very fast), but unfortunatly there is no way to make that happen, since one sample in a blur filter equals radius = 0, and radius = 0 makes the blur filter bypass itself (seems its bitmap is not created here). |
|||||
Posted: December 13, 2007 2:18 am | ||||||
ronviers
![]() |
I wonder if the offset and refraction components would work too.
@ronviers |
|||||
Posted: December 13, 2007 2:22 am | ||||||
Sphinx.
![]() |
No, only bitmap based components - Blur, Motion Blur and High Pass, where motion blur is the one best suited due to the lower sample fetching. |
|||||
Posted: December 13, 2007 2:25 am | ||||||
Sphinx.
![]() |
I can't stress enough that you should be aware of the sideeffects, and that the method directly opposes the procedural sampling concept of FF, so use it when it works for you, and not as a universal wonder trick! .. and always include an option for the user to disable it, as a true procedural chain will give better details when antialiased.
|
|||||
Posted: December 13, 2007 2:35 am | ||||||
ronviers
![]() |
Ok. I remember uberzev is often using refraction and offset set to zero in his snippets and I was just thinking that maybe they were working on the same princple. Thanks for the clarification. This sure is cool.
understood ![]() @ronviers |
|||||
Posted: December 13, 2007 2:39 am | ||||||
Carl
![]() |
With your understanding of all this I'm curious what your field is
![]() |
|||||
Posted: December 13, 2007 2:43 am | ||||||
Sphinx.
![]() |
Interesting! Which of his filters does this? Need to check that out.. learned alot about FF from his snippets already - amongst others the fact that FF rounds control values < 0.005 to 0.00, which also explains why the checkbox for the blur modules in my snippet shows 0.00 (checked) and 0 (unchecked).. which ofcourse is not correct, should be 0.00000001 (or something) and 0.
Its the field of nerd ![]() |
|||||
Posted: December 13, 2007 3:29 am | ||||||
ronviers
![]() |
'Proportional Gradient' uses the offset component while the snipped called 'Moveable Spokes' in this thread: http://www.filterforge.com/forum/read...ssage20929 uses the refraction component. @ronviers |
|||||
Posted: December 13, 2007 3:40 am | ||||||
Sphinx.
![]() |
Hmm.. can't see any "set to zero" settings in those.. both seem to utilize the extreme zoom in capabilities of the offset component. The spokes in the Moveable Spokes filter comes from zooming in alot on the refraction output, if you try zooming even more in (49.999 or something) you'll see that the seemingly infinite vanishing point is not infinite.. |
|||||
Posted: December 13, 2007 4:01 am | ||||||
Carl
![]() |
Had a look - fascinating/complex well beyond my scope of knowledge - I can see the tie in with speed efficency ![]() ![]() |
|||||
Posted: December 13, 2007 4:58 am | ||||||
ronviers
![]() |
||||||
Posted: December 13, 2007 6:41 am | ||||||
ronviers
![]() |
||||||
Posted: December 13, 2007 6:43 am | ||||||
Sphinx.
![]() |
ahh... its the invert offset blend emboss trick - here it creates the minimum vertical offset possible, which then is mixed with the inverted offset source and threshold to create an invert mask. The attached filter shows whats going on, only here I adjusted the numbers to get a visible range.. invert offset emboss.ffxml |
|||||
Posted: December 13, 2007 6:54 am | ||||||
Sphinx.
![]() |
Hmm.. it seems to do nothing? Do I miss something here? Its input is already consisting of spokes, and these seem to be unaltered in the output.. which makes sense, since the heightmap is fully flat and moreover the refraction scale is zero.. |
|||||
Posted: December 13, 2007 7:04 am | ||||||
ronviers
![]() |
That gives me a lot to think about. Thanks for the explanation. ![]()
I see my mistake - sorry. ![]() temp.ffxml @ronviers |
|||||
Posted: December 13, 2007 7:18 am | ||||||
Sphinx.
![]() |
Ron, I still don't understand what purpose that refraction in the top serves.. If I bypass it and takes its input to where its output goes, I get the same rendering at the same speed... I feel I'm missing something here..still looks to me that it does nothing
|
|||||
Posted: December 13, 2007 8:26 am | ||||||
ronviers
![]() |
Yes, I'm very sorry about this Michael, as I mentioned in the previous post I made a mistake and never should have posted the question. I will try to be more careful about asking dumb questions in the future. Thank you for taking a look at it. @ronviers |
|||||
Posted: December 13, 2007 8:31 am | ||||||
Sphinx.
![]() |
ah..sorry, misunderstood... I thought it was the attachment that was wrong since you added a new one
![]() ![]() |
|||||
Posted: December 13, 2007 9:19 am | ||||||
ronviers
![]() |
I see the ambiguity now. Actually I added the attachment with another post but then noticed my mistake and was unable to remove the attachment after I edited the post. I did not realize how it would read after the edit.
This was the exception that proves the rule. ![]() @ronviers |
|||||
Posted: December 13, 2007 9:28 am | ||||||
Sphinx.
![]() |
Forget this one.. I'm pretty convinced that no more than one sample is fetched per output sample - unless "Anti-alias sources for bitmap-based components" is enabled in the FF options. However the Motion Blur still seem to initialize faster. |
|||||
Posted: December 14, 2007 9:31 am | ||||||
uberzev
![]() |
This is a great idea Sphinx. I was thinking about posting a feature request for a "rasterize now" component, but you seem to have achieved that functionality with this workaround.
:cool: |
|||||
Posted: December 24, 2007 2:25 am | ||||||
SpaceRay
![]() |
cool and this seems to be useful and interesting, but do not know how to use it, will have to see more about this.
|
|||||
Posted: July 10, 2012 8:08 pm | ||||||
David Roberson |
Is this true, in the sense that FF completely ignores the Blur component? I had hoped, having read this comment recently, that using a control setting Blur Radius to 0 would prevent FF from trying to initialize the bitmap, preventing that annoying 5 second or more lag at the start of a filter. Like threshold clipping and switching, it did not seem to have that effect; which is sad, because it makes the "responsive layout" portion of my filter virtually useless. Short of going in and manually disconnecting and bypassing the bitmap based components, there's no way to get around that bottleneck. Is there something else that would do it I haven't heard of yet? |
|||||
Posted: June 28, 2018 11:30 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,531 Posts
+39 new in 30 days!
15,347 Topics
+72 new in year!
357 unregistered users.