Best method to expand a work item

   4068   9   1
User Avatar
Member
691 posts
Joined: June 2006
Offline
Hi,

I'm heavily using the ROP fetch option “Cook Frames as Single Work Item”, everything is working great; But is there an easy method to then expand this work item? I tried with the Work Item Expand node without luck, so I'm using a combo of nodes to expand this but I feel that maybe there is a better option available. Attached is an image showing my expand method.

Thanks,

Alejandro

Attachments:
expand_single_work_item.png (244.5 KB)

Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Staff
600 posts
Joined: May 2014
Offline
By expand, I assume you mean you want to create a work item for each output file in the ROP fetch work item? You can do that using a Work Item Expand node set to expand files, but it needs to know what the files are when it goes to generate. The output files on the work item are added while its cooking, so the Work Item Expand node will need to be set to Dynamic.

There's also an option to “Include Expected Output Files” on the expand node, which normally would let you use it statically. When “Cook Frames and Single Work Item” is enabled, however, the ROP Fetch doesn't add per-frame expected outputs. This is because that option is normally used when cooking a ROP that only creates a single output file, such as a USD Output, Alembic or FBX ROP. I can look into changing that so it correctly adds the per-frame expected output files to the work item, which would make it possible to use a Work Item Expand without making it dynamic.
Edited by tpetrick - Aug. 26, 2020 15:38:40
User Avatar
Member
691 posts
Joined: June 2006
Offline
tpetrick
By expand, I assume you mean you want to create a work item for each output file in the ROP fetch work item? You can do that using a Work Item Expand node set to expand files, but it needs to know what the files are when it goes to generate. The output files on the work item are added while its cooking, so the Work Item Expand node will need to be set to Dynamic.

There's also an option to “Include Expected Output Files” on the expand node, which normally would let you use it statically. When “Cook Frames and Single Work Item” is enabled, however, the ROP Fetch doesn't add per-frame expected outputs. This is because that option is normally used when cooking a ROP that only creates a single output file, such as a USD Output, Alembic or FBX ROP. I can look into changing that so it correctly adds the per-frame expected output files to the work item, which would make it possible to use a Work Item Expand without making it dynamic.

Hi tpetrick,

Thanks for the reply.

Unfortunately the workiteamexpand is not working for me, I tried to set to dynamic, tested all the apply expansions and the types without luck.
As I said before I'm trying to expand a work item that was created with the “Cook Frames as Single Work Item” option on a ROP Fetch.
Also I dont know how to “You can do that using a Work Item Expand node set to expand files, but it needs to know what the files are when it goes to generate”, if the workitem doesn't have the output list, just the first frame. I think this is the main issue with these types of workitems generated with the “Cook Frames as Single Work Item” option.

Thanks,

Alejandro
Edited by Alejandro Echeverry - Aug. 26, 2020 16:00:27

Attachments:
expand.png (188.5 KB)

Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Staff
600 posts
Joined: May 2014
Offline
Are you able to attach an example file? What type of ROP are you cooking with the ROP Fetch node?

If the work item only lists a single file in the MMB menu, then that's the information PDG has to work with. If the ROP is producing other files on disk but not reporting them back to PDG while it cooks, then the only way to create work items from those files is with a File Pattern.
Edited by tpetrick - Aug. 26, 2020 16:18:27
User Avatar
Member
691 posts
Joined: June 2006
Offline
tpetrick
Are you able to attach an example file? What type of ROP are you cooking with the ROP Fetch node?

If the work item only lists a single file in the MMB menu, then that's the information PDG has to work with. If the ROP is producing other files on disk but not reporting them back to PDG while it cooks, then the only way to create work items from those files is with a File Pattern.

That's why I'm using a file pattern like I showed in my first post, because with this unique workitem PDG know nothing about if its just one file or a sequence.

Regards an example file, I'm using a ROP fetch that is fetching a filecache that is saving out a flip sim, so I'm using the “Cook Frames as Single Work Item” option to have just one workitem to work with, then I'm expanding this workitem with a filepattern to then use another ROP fetch to fetch another filecache that is saving out a meshing stage for the flip sim.
Edited by Alejandro Echeverry - Aug. 26, 2020 16:29:31
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Member
691 posts
Joined: June 2006
Offline
tpetrick
If the ROP is producing other files on disk but not reporting them back to PDG while it cooks….

Its possible for a ROP Fetch to give more hints when the “Cook Frames as Single Work Item” is active? That way it will be easier for a work item expand node to do his job correctly in this situation.
Edited by Alejandro Echeverry - Aug. 26, 2020 16:28:37
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Staff
600 posts
Joined: May 2014
Offline
Sure, we can look into doing that.

Another thing you can try in the mean time is turning off “Cook Frames as Single Work Item”, and setting “All Frames in one Batch” instead. When batching is enabled the node will create 1 work item per frame, but all of the work items will still be cooked as a single process one frame at a time. You won't need to expand the work items because there will already be an item per frame/output file. That's normally what's used for simulations. “Cook Frames as Single Work Item” is a special option that's used when all the frames share an output file, such as writing a sequence of frames to a single .fbx or .abc.
User Avatar
Member
691 posts
Joined: June 2006
Offline
Thanks for looking into that tptrick!

No problem about the batch method, I used that a lot in the past, the thing is that if for example I want to concatenate 2 sims, one after the other, I need to to use a partition between the ROPs for the second one to not propagate the whole frame range per incoming workitem, so using the “Cook Frames as Single Work Item” is a cleaner and easier option to play with sims, then you have the option to expand if you want to, but unfortunately in this case the only way is to use the filepattern method.

Again Thanks for looking into it!

Alejandro
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
User Avatar
Staff
600 posts
Joined: May 2014
Offline
That issue has been fixed in the latest build of H18.0. I've attached an example file with a ROP Fetch that cooks a file cache, and has the “Cook Frames as Single Work Item” option enabled. The single work item now properly lists cache files for each frame instead of just the first frame, and reports output files for each frame once the job completes.

This means that you can now use a Work Item Expand to create an item for each file. The work item expand doesn't need to be dynamic because the “Include Expected Outputs” toggle is enable on it.
Edited by tpetrick - Sept. 2, 2020 15:57:32

Attachments:
single_task_example.hip (320.7 KB)

User Avatar
Member
691 posts
Joined: June 2006
Offline
tpetrick
That issue has been fixed in the latest build of H18.0. I've attached an example file with a ROP Fetch that cooks a file cache, and has the “Cook Frames as Single Work Item” option enabled. The single work item now properly lists cache files for each frame instead of just the first frame, and reports output files for each frame once the job completes.

This means that you can now use a Work Item Expand to create an item for each file. The work item expand doesn't need to be dynamic because the “Include Expected Outputs” toggle is enable on it.

Thank you very much for your amazing Support tptrick!!!
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
  • Quick Links