Skip to main content
Inspiring
May 19, 2024
Answered

While loop for UV position/offset?

  • May 19, 2024
  • 1 reply
  • 458 views

Can while loop node  be usedd to do something like slope blur or  doing random iterations  offset  like in fxnode?    Or it's only for pixel value  calculation itself?  

 

For example I am trying to  to do small image shift  in X/U direction  with max blending . Could it be achived  with loop node and more than 32 steps   ot it's incappable to do such thing  by its nature?

 

ps. Just asked ChatGPT same  question .  In one reply it says I should use  iterations in FXmap node  instead  for the task  , other time it says while loop still can do it but then tells something meaningless with nonexisting  nodes and options. I am officially lost now.    If while loop can do it could sombody show an example please . I think FX map would do it too slow.

This topic has been closed for replies.
Correct answer davescm

I don't see a reason why it could not be done.
As long as you remember that when using the pixel processor your are always processing the content of the 'resulting pixel' i.e. the result of any blur or movement into it, rather than moving the content of that pixel to another. Once that is grasped, you can then build while loops to examine the contents of pixels around the pixel being processed and assess whether their contents should change that resulting pixel. That processing can also use a second input image to calculate, for example, the slope in the case of a slope blur.

Dave

1 reply

davescm
Community Expert
davescmCommunity ExpertCorrect answer
Community Expert
May 20, 2024

I don't see a reason why it could not be done.
As long as you remember that when using the pixel processor your are always processing the content of the 'resulting pixel' i.e. the result of any blur or movement into it, rather than moving the content of that pixel to another. Once that is grasped, you can then build while loops to examine the contents of pixels around the pixel being processed and assess whether their contents should change that resulting pixel. That processing can also use a second input image to calculate, for example, the slope in the case of a slope blur.

Dave

kirkr5689Author
Inspiring
May 20, 2024

Thanks Dave.   Somehow I managed to make it work like slope blur with smooth unlimited steps using XY flow map as a direction  .   Not sure how  actually,  just a few hours of miss and hit of modifing that blur example .   Still hardly understand  what is actually happening  there.

Fx map  turned to be a dead end for the task.