Search - User list
Full Version: More than one frames per batch problem
Root » PDG/TOPs » More than one frames per batch problem
gadfly16
Hi,

if I set `ROP Fetch` node's `Frames per Batch` parameter other than 1, the node generates the work items based on the range attribute instead of the incoming work items. (Or at least, this is what I think it's doing..)

Here is what I'm trying to achieve:

  1. Write out a simulation with preroll frames. (I need the preroll frames for debugging the sim.)
  2. Filter out the preroll frames by `Filter by Expression`. (`@pdg_frames<$STARTFRAME` works just fine)
  3. Render an OpenGL preview without the preroll frames, but in batches larger than 1 to save on the startup time. (It's an OpenGL render, where it's not negligible.)

What happens is:

  1. `ROP Geometry Out` produces 240 work items.
  2. `Filter by Expression` filters out 48, remains 192.
  3. And here comes my problem: if batch size is 1 `ROP Fetch` stays with the 192, but if it's more than 1, then it goes back to 240.

Of course the last ROP Fetch is set to ‘single-frame’ mode.

Is it the intended behavior? Is there a workaround?

I can put a `Wait for All` before the last `ROP Fetch` and use ‘frame-range’ mode, but in that case the network waits for all the frames in vain.

Hope it makes sense and thanks in advance,
Mate
tpetrick
In order to create a batch, the node needs to know how big the batch is going to be before it creates items in the batch, and the frame range of the items in the batch. To do that, it uses the “range” attribute on the upstream work items in order to work properly. Nodes that operate on frame ranges (ROP Fetch, Filter by Range, File Range) maintain the range attribute, as well as the frame value on the work item.

If you want to filter work items by their frame range you should use the Filter by Range node instead of a Filter by Expression, since that node will correctly update the work item frame values and the range attribute.
gadfly16
Thanks!
Unfortunately I'm on 17.5 and it seems it does not have that node. One more reason to bump. In the meantime (and out of curiosity), is there a way I can manually set the range? (and pdg attributes in general)
Thanks again,
Mate
tpetrick
You can use an Attribute Create to set the range attribute manually, before your ROP node.
gadfly16
Thanks,
I really appreciate your help!
Mate
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB