YOUR ACCOUNT

Login or Register to post new topics or replies
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Would it be feasible to add a Unit component, which would just pass one value forward for each outgoing branch (or loop iteration for FF 4)? This would be useful in those cases where you really just need to output a single value (grayscale or RGB) for RGB Math etc. It would have a Source input and pick the 0,0 (or .5,.5) value from it and forward it to any downstream sample calls. I would assume this to be much faster than having to evaluate every sample separately, like (I believe) all the current components do.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Since this need was brought up by the new loop component, it might actually be better to add a Variable slave component wherein one can pass a single numeric result to the next stage of the loop, similar to the Randomizer, but user set. Also in this case, one would have to be able to pick the variable fr om an RGB or grayscale image, so the same idea as above but lim ited to the loop.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
I used RGBA channels for that purpose in the Julia filter. That lead to the suggestion that FF added multichannel support in the sense that we can add additional channels which will be processed similar to r,g and b. But that is probably a lot of work and your suggestion seem more plausible. One could imagine 4-6 Aux HDR Inputs in the Loop node which can be "fetched" via slave nodes (even cooler would be to have a dynamic solution with x number of auxes). smile:-)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Perhaps the simplest implementation of this idea would be to make the Lookup component have a "Flat fill" option to it where it would assume that the X and Y coordinates do not vary (pick the center point or 0,0 point and then look up that coordinate from the Source. The important thing is that the component would only have to look the point up once (per loop) and pass that value. (As opposed to sampling it for every pixel + every subpixel needed for antialiasing.)

I wouldn't mind a similar solution as a Loop slave component. The main thing is to be able to pass one value in the same fashion as the slave components.

Back to the attempted Non-overlapping circles filter, if I replace the Lookup with a Randomizer, I can render one thousand loops or more. But attempting to look up ONE sample from Accumulated, I get to about 7 iterations. The situation should be comparable: Pass one random value or pass one sampled value. Yet one runs linearly, the other exponentially unless something is changed.

Unfortunately the current implementation wrecks about 9 out of 10 loop-based ideas I have.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
My latest attempt gave me a good descriptive word for this phenomenon: It is njyldgarkn annoying!

I tried to make a filter that would generate proper letter spacing for a line of type. I can get up to 10 letters (non-antialiased) before my hair starts to fall off from waiting.

(The letters are picked by random, variation 24 gave me this Scandinavian-sounding swearword.)

  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
(I'm thinking about this. Implementation-wise, Loop is very tricky, especially when the mappedness of things is involved.)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
(Note to self: the variables that we pass cannot be numeric / gray because numerics are evaluated before the sampling begins and can't be recalculated during sampling. So they must be map / green).
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
It appears (to an outside observer like myself) that every iteration passes new Position, Iteration and Randomizer values. So you are saying that all iterations of these values are evaluated (in the internal "Prepare" function) before sampling begins, so that they are in fact constant throughout sampling?

So this probably means that even the "Flat fill" option in some components works this way -- it actually does a lookup for every sample although they come fr om a lim ited number of source coordinates?

The funky part is, it is very easy to script a "sample once, pass the same value thereafter" Script component, but it won't work with a loop, for it will pass the same initial value for every subsequent iteration of the loop. Which is why I tried to sample the Iteration slave component to detect when the Iteration changes. In theory it would work, in practise there must be something I don't understand or know, for it doesn't.

Most fundamentally, IF I can make something happen with a LUA script, you could make it happen internally, because the logic is basically the same, right?
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
It appears (to an outside observer like myself) that every iteration passes new Position, Iteration and Randomizer values. So you are saying that all iterations of these values are evaluated (in the internal "Prepare" function) before sampling begins, so that they are in fact constant throughout sampling?


No. All slaves are Map components, therefore their result is calculated in their get_sample() method (that is, on demand) depending on the number of the current iteration.

(Don't forget that you can plug map components -- including other slave components, even from the same Loop -- into inputs of slave components).

Quote
So this probably means that even the "Flat fill" option in some components works this way -- it actually does a lookup for every sample although they come fr om a lim ited number of source coordinates?


Yes, but the the effective number of actually evaluated lookup samples is reduced by the sample cache at the output of the component which is being looked up.

Regarding the rest of your post (actually, thread), I'm still trying to wrap my head around all this. It haven't clicked yet.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Ok, thanks, that clarifies it. And no, I hadn't noticed that the Slave component inputs are green!

Quote
Regarding the rest of your post (actually, thread), I'm still trying to wrap my head around all this. It haven't clicked yet.


But I assume that you understand the basic problem I am trying to resolve, right?
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
But I assume that you understand the basic problem I am trying to resolve, right?


You are trying to pass a single numeric value, obtained within the loop subtree, to the next iteration of Loop, preferably via a slave component. Correct?

(Actually, during the development of the Loop, I had a vague idea of a multi-variable Loop, that is, the one that somehow accumulates several results during its evaluation, but I haven't found how to combine all these multiple sub-results into a single output result).

(Update: If I'm not mistaken, having multiple Accumulated -> Subtree -> Accumulator paths within a single Loop would fix your problem: you would simply pass your value to the next iteration by directly passing it to one of the additional Accumulator inputs, without mixing in previous iteration. On the next iteration, the value could be obtained via the via the corresponding additional Accumulated slave.)
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Until you guys figure out the awesome generic auxiliary/multi channel fix (in line with grayscale and color mapped you would introduce multichannel mapped inputs), I think the idea of adding a handful additional accumulator paths is a great compromise smile:-)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
You are trying to pass a single numeric value, obtained within the loop subtree, to the next iteration of Loop, preferably via a slave component. Correct?


Yes, exactly, without incurring the overhead of the component sampling for every pixel and thus causing an exponential loop.

Either as a slave component, or if a single-sample lookup could be implemented for Lookup, that would probably work as well.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Additional accumulators: That could work, if it avoids the branching issue. I don't know if branching the accumulator internally (as opposed to the filter tree) makes a difference or not.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
This was suggested in 2013 and as far as I know is still not available in 2022 in FF 11

Quote
Vladimir Golovin wrote:
(I'm thinking about this. Implementation-wise, Loop is very tricky, especially when the mappedness of things is involved.)


Quote
Vladimir Golovin wrote:
(Note to self: the variables that we pass cannot be numeric / gray because numerics are evaluated before the sampling begins and can't be recalculated during sampling. So they must be map / green).


I know it may be difficult and tricky but I would be good to know if this can be possible or not now with all the components of FF 11 and be possible for FF 12?

Thanks
  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,533 Posts
+31 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

26 unregistered users.