Andrew B.
![]() |
My understanding is that Filter Forge executes all operations, even if a slider is set at a position where the routine is contributing nothing to the result. This slows things. Is there a feature or snippet that prevents a routine from running if the slider is set to a specific value.
|
|
Posted: May 7, 2014 7:05 pm | ||
Crapadilla
![]() |
The If component might be what you're looking for.
![]() --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|
Posted: May 10, 2014 10:11 am | ||
Andrew B.
![]() |
I can't find an If component.
|
|
Posted: May 10, 2014 5:45 pm | ||
Skybase
![]() |
It's between The Floor and Lerp components under RGB math. -- Only exists in FF2.0 and above.
|
|
Posted: May 10, 2014 9:53 pm | ||
Andrew B.
![]() |
Thanks Skybase. My eyes passed right over it before.
It looks like the IF statement cannot check for a slider position. I guess I could try to see if there is a way to have it compare the image before it reaches the routine to the image immediately after the routine would have run, but this burns up cycles too. Maybe not as many, though, if the slider is off. But more cycles than usual if the routine is on (because now there is the routine and the test). |
|
Posted: May 10, 2014 10:24 pm | ||
Crapadilla
![]() |
Controls output a grayscale value when hooked up to map inputs (you can check this via Assemble RGB, for example). This means you can use If to easily check for a specific slider value.
In my example below, I'm checking if the slider has a value of 0. When true, If switches to the Then map input (Green). While not true, the Else input gets sampled (Red). Note that If basically acts like a switch on a per-sample basis, but since both Source A and Source B are constants, we're creating a situation where either the Then or the Else sub-tree is sampled, but never both simultaneously. (I don't know this for sure, but I'm guessing the component is smart enough to do a 'lazy' evaluation of its sources, only sampling them when necessary.) ![]() --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|
Posted: May 11, 2014 6:05 am | ||
Velho |
Connect the slider to a RGB math abs component and use the eye dropper tool to check what is the RGB value that the slider outputs when it is at the position you want. Then enter that RGB value to the if component. The comparison should be A = B.
Connect your slider to input A, input B is the RGB value. When A = B, the If component outputs anything you like, when A ≠B the If component outputs your routine. edit: I'm too slow... ![]() Eye dropper tool / Color inspector |
|
Posted: May 11, 2014 6:07 am | ||
Crapadilla
![]() |
Side-note:
Constructing this with a Switch component would be much more efficient, but to do this we'd need Control Scripts, which are - regrettably - still absent from FF. ![]() ![]() ![]() --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|
Posted: May 11, 2014 6:16 am | ||
Andrew B.
![]() |
The output of the slider depends on the nature of the photo. It can be any number of colors.
But there is one big stumbling block. What are the two versions that are being compared? One of them cannot be what the image looks like after the routine is run. That defeats the whole purpose (saving time). It would have to be a secondary routine hooked to the slider, that maybe is a single pixel, and then triggers a link between the same slider and the primary routine. And I guess this would have be be looped so it can always check the state. That would load more work onto the CPU, though. |
|
Posted: May 12, 2014 9:18 pm | ||
Crapadilla
![]() |
An example image/ffxml is worth a thousand words...
![]() ![]() --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|
Posted: May 13, 2014 4:18 am |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,719 Registered Users
+8 new in 7 days!
153,546 Posts
+6 new last day!
15,348 Topics
+71 new in year!
31 unregistered users.