YOUR ACCOUNT

Login or Register to post new topics or replies
TheBeat
Beat
Posts: 165
I'm trying to figure out what the best and most efficient way is, to bypass a component.

Example, somewhere at the end of a line there is a Blur component (slow component).
Now I want the user be able to choose between going through the Blur component and bypassing the Blur component. With a switch between the Blur and the signal before the Blur it can be done, but the rendering time is equal in both cases, as the Blur is rendered anyway, even if not used after the Blur itself. I want to be able to bypass the Blur and at the same time not losing the rendering time for the Blur, as it is not used in 'bypass' configuration. I think I would need a switch with 2 inputs and one output, but I'am afraid this component does not exist yet smile:-)

In addition : is a subtree, that has no connection to the result (so a dead end), being rendered and adding up to the render time?
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
rachelduim
So Called Tortured Artist

Posts: 2498
Filters: 188
Using a Switch with the Blur before the switch does reduce rendering time. But it's hard to see the time difference with a small test image (like the built-in images which are 600x600). I created a simple filter that messes with the image hue, has a switchable blur, and has high anti-aliasing to make the filter slower. I used a 2600x2600 test image to see the time differences, it changed from 54 seconds on my MacBook to 10 seconds when turning the blur off. Also, to properly test it you need to temporarily uncheck the following option: Tools/Options/Interface/Reduce preview size for larger images. Here's the filter, written in FF7.

Blur Switch Test.ffxml
Math meets art meets psychedelia.
  Details E-Mail
TheBeat
Beat
Posts: 165
Thanks rachelduim (Nederlandse naam? Ik zit (ook?) in Nederland).

I will run tests tomorrow, it's already getting quite late.
I downloaded your test filter and how nice that it installs right away into FF. Really neat, as many other things in FF, e.g. the easy connection of the wires. Even in quite zoomed out view, it still works like a charm. About other things, I am quite surprised that they are missing . . . or of course, that I haven't found them yet smile:-)
I'll keep you posted of my findings.
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
TheBeat
Beat
Posts: 165
I have run some tests, with rachelduim's 'Blur Switch Test' and a setup of myself, and both results are consistent with what rachelduim wrote. So I conclude that the best way to Bypass a component is with a switch, leaving the bypassed component hanging.

Is it true, that a whole subtree (even a long one), that is not connected to the Result, is not being calculated?
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
emme
Posts: 718
Filters: 8
In my experience, there's definitely some (pre)processing happening for unconnected subtrees. They won't be fully rendered so the slowdown isn't huge, but you shouldn't leave heavy subtrees laying around even if not connected.
  Details E-Mail
rachelduim
So Called Tortured Artist

Posts: 2498
Filters: 188
TheBeat: My father spent part of his youth in Holland, so he knew some Dutch, but other than knowing my last name means "thumb", I do not know any Dutch, grew up in California.

Thanks emme, yes, there is some processing going on in unused sub-trees, but the switch does the trick for speed improvements. And getting rid of unused code is always a good idea.
Math meets art meets psychedelia.
  Details E-Mail
TheBeat
Beat
Posts: 165
Quote
emme wrote : but you shouldn't leave heavy subtrees laying around even if not connected.


Right I understand. What I actually meant: a heavy subtree that connects to a switch on input 2, but the Switch being in position 1. I misnomered that as 'that has no connection to the result (so a dead end).'

rachelduim : Yes 'duim' means 'thumb' allright. And Rachel is a Dutch name as well as English smile:-)

Thanks for all the help I'm getting. Really appreciate.
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
emme
Posts: 718
Filters: 8
Right, there should be little to no difference between an unconnected subtree and one connected to a (non-selected) switch input.
  Details E-Mail

Join Our Community!

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
+36 new in 30 days!

15,347 Topics
+72 new in year!

Create an Account

Online Users Last minute:

25 unregistered users.