Image Magick / cache help

   840   2   0
User Avatar
Member
1 posts
Joined: Aug. 2025
Online
Hey,

My current TOPs setup:

1. Wedge with 2 attributes and a wedge count of 4.
2. Rop Geometry: Grabbing a pyro sim. I'm writing this out to a bgeo ($HIPNAME.simcache4.`@wedgeindex`.$F.bgeo.sc), cooking frames as a single work item. It's set to 'in-process'.
3. Rop fetch: This fetches the Octane ROP. Cooking frames as a single work item, and in process too.

The reason I opted for 'cook frames as a single work item' is that I've found (likely to my misuse of the setup) is that the cache will be ignored for the rendering side, so it's constantly caching the pyro sim before rendering the image.

My current setup technically works, but from here what I'd like to be able to do is run this into imagemagick to create a montage of each frame (so frame 0 of each sim, frame 1 of each sim etc). With the current setup - where I have 4 work items (a work item per frame sequence) - I'm not entirely sure how to tell it to look within those sequences, find frame 0 for each sequence, and render an image of that. In previous setups where I've had access to every work item for the sequence, it's been possible, but not sure how to approach it here.

Any help would be appreciated!
User Avatar
Member
92 posts
Joined: July 2018
Offline
Unless I'm mistaken, PDG doesn't automatically store the frame information (it didn't when I built our original contact sheet tool), so you have to parse it from the render file name.

-- After the ROP add an "expand work items" node to get back to individual frames per work item.
-- Then add "attribute from string" and set it to operation "split by delimiter" and set the delimiter to "."
-- Now your file path is split each time you have a "." in the original path. So you can extract the frame number and make it a new attribute.
-- Add a "attribute create" node, make a string attribute called frame, and set it's value to `string.3`. In your example file name, it would get split as , so starting from 0, string.3 will get you the $F split and write it to @frame.
-- Now partition by attribute and set the attribute to frame. Cook and you should see the number of work items matching the number of frame, with each work item containing all the renders for that frame.
-- If you feed that into imagemagik, it will compile each frame into the contact sheet per frame.

If things are out of order within each frame. Add a sort node somewhere above the partition to sort them into the right order before partitioning by frame.
madebygeoff.com
User Avatar
Member
92 posts
Joined: July 2018
Offline
Also FWIW, if you unselect the "cook frames as a single work item" as you say, then you have access to all the individual frames and in that case, pdg DOES write the frame number to each work item and it's much easier.

The way we get around the caching issue is to add a file node back in SOPs with the same file path that you have in the ROP geometry. That way when the ROP fetch goes to render, the file node in SOPs is grabbing the cached data and it doesn't try to recache.
madebygeoff.com
  • Quick Links