How to "write" values using pixel processor and loops?
- December 10, 2023
- 1 reply
- 1007 views
Let's say, using pixel procressor, I want to output the first 32x32 pixels from the input (i.e keeping the rest black, value = 0).
How do I achieve that?
I first thought that using while loop one can create a "list" of position values that could be fed into sample grayscale/color but I guess it doesn't work like that. It only gives the value at position that while loop calculates in the last iteration.
In the attached screenshot, my intent was to output 32 pixels diagonally (from top right corner) but it gave the value at position (32,32).
How do I append the results of Sample gray?
(Why do I want the first 32 pixels? For no reason, I'm taking baby steps right now. Once I connect enough dots then I'll node my way to get a specific result I want to achieve. Something that can work with general input. I'll share that node graph and tutorial with you all!)


