Hi,

I'm hoping someone with more experience with the Nuke API can help me out
with the following:

- I have an algorithm that wants to use data from multiple inputs.
- I only know what input I need to pull data from once I'm in a per-pixel
loop. (aka, for each pixel, the data from one of the inputs drives which
one of the other inputs is needed)
- To avoid having to do Iop::at() or Iop::sample() calls, I would rather
fill a Row for each one of the inputs BEFORE the per-pixel loop, and then
access that Row later on.

My assumption is that this will be more memory hungry, but faster than
calling at() or sample().
However, I have questions:

- Is this assumption correct? Does this kind of optimization make sense?
- How would I go about  keeping multiple Rows around, specially when the
number of inputs is not predefined?
- I've thought of creating my own "uber" float array and just keep
appending all rows to it. Then figure out the offset within that array
during the per-pixel loop. Is there a more straightforward approach that
someone could recommend?


For the sake of clarity, I'm looking to turn something like this
(pseudocode)

for each y:
  for each x:
     inputNumber = figureOutInput();
     out = input(inputNumber)->at(x,y);



Into something like this:

for each y:
  for each inputNumber in inputs:
    // need to keep a row for each input
    row(n) = input(inputNumber)->get(row);

  for each x:
    inputNumber = figureOutInput();
    out = row(inputNumber)[x]


Hope that makes sense? Help?

Thanks,
Ivan
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to