Sphinx.
![]() |
If I have the loop set up with 1000 iterations, but the result may already be available after 2 iterations - how do I get out?
I may fail to see the obvious solution - but it seems we need a way to "get out" of the loop before it reaches the maximum number of iterations. I propose a special input called "Bailout" that if non zero will stop at the current iteration. (btw. the need for that functionality was mentioned during the V4 beta rounds) |
|
Posted: August 16, 2015 3:30 am | ||
xirja
![]() |
![]() _____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|
Posted: August 18, 2015 2:40 pm | ||
Sphinx.
![]() |
||
Posted: August 21, 2015 5:48 am | ||
Kraellin
![]() |
yeah, a 'cancel' switch makes a lot of sense here.
If wishes were horses... there'd be a whole lot of horse crap to clean up!
Craig |
|
Posted: August 21, 2015 12:52 pm | ||
ThreeDee
![]() |
Not exactly the same thing, for it still would run through all the loops, but using the OR component to produce a different input (fully transparent, for instance) for the loop instead of the complex (whatever you are building) once a certain condition has been met might help in speeding up rendering...? Just a theory.
An exit option would obviously be better. |
|
Posted: August 22, 2015 4:58 am | ||
Sphinx.
![]() |
Yeah, thats how I do it now, with a treshold (the If component seem to draw samples from all inputs regardless of the "case"). But even that approach is quite slow and inoptimal :-/
|
|
Posted: August 23, 2015 6:08 am | ||
ThreeDee
![]() |
Ok, how about another inefficient idea then: A Script component that either passes the source image through or, after a condition has been met, outputs a transparent black for every pixel regardless of source input?
|
|
Posted: August 29, 2015 5:01 pm | ||
Sphinx.
![]() |
That is even more expensive than the threshold trick. About 18 times slower (entering a scripting context is itself quite slow, which is why you should avoid too many different script components in a filter).
|
|
Posted: August 30, 2015 1:21 pm | ||
Sphinx.
![]() |
Perhaps this could be made as a slave "Stop Condition" node that works somewhat like the If components (but with grayscale map inputs instead).
The "Stop Condition" slave node would have two inputs, A and B and an operator selector like the If. You can then force the iteration to stop before it reaches the maximum iterations e.g. when A == B |
|
Posted: November 3, 2015 5:50 am | ||
Sphinx.
![]() |
Bump!
Example: I have set the loop up for 100 iterations. In most cases (samples) I know I can exit after 10 iterations, but there is no way to escape the loop for those samples. I suggest that the main loop component gets a mapped Boolean input called "Stop" / "Exit" / "Bailout" etc. This input is evaluated per iteration and when a positive exit condition is received, the loop simply stops at the given iteration and use the result at this point for that given output sample. |
|
Posted: March 16, 2018 6:21 am | ||
emme |
Bump, mappable loop iteration count / break would be great!
|
|
Posted: July 31, 2018 3:13 pm | ||
Sphinx.
![]() |
Bump, not to forget this in V10
![]() |
|
Posted: March 30, 2020 7:34 am | ||
Beat
Posts: 165 |
It definitely would be nice to escape a loop at a user determinable point. Seems basic.
I would even ask for more : a way to stop the rendering process, by a keyboard shortcut or maybe a component, that you can include into your filter. I often see results on my screen while still rendering, that look far better than the final result. I do not know if the screen build up kind of parallels the actual rendering in memory, but if that is the case, I'd like to stop the rendering as soon as I like the result I see on the screen. I have the same experience in Topaz Simplify, where the 'crude' result on my screen often looks far more interesting, than the final, precisely rendered result. Beat The Stone Age did not end because they ran out of stones. Niels Bohr |
|
Posted: March 30, 2020 3:02 pm | ||
Skybase
![]() |
Beat, you're off topic.
Or should I say... off beat. |
|
Posted: March 31, 2020 10:29 pm | ||
Beat
Posts: 165 |
Nice pun
![]() Sorry, I felt it touched upon the subject, stopping a process. But no problem if you think it's too general or too far removed from the topic. I will post it in a separate thread. The Stone Age did not end because they ran out of stones. Niels Bohr |
|
Posted: April 1, 2020 10:56 am |
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!
15 unregistered users.