Evaluate frame in ROP Fetch

   1890   3   0
User Avatar
Member
16 posts
Joined: Jan. 2021
Offline
I have a setup that uses an external hip file on a ROP Fetch to avoid the overhead of loading the current scene.
The external hip file has a File SOP (reading a bgeo sequence) and an Alembic ROP.
The work item has an attribute for the bgeo path (tempBgeoPath) and for the alembic (alembicPath).

The File SOP has `@tempBgeoPath` set on the file parm.
Problem is when the ROP Fetch task runs and cooks the alembic ROP with a frame range, I can't get it to evaluate the File SOP with each frame.

I've tried various frame tokens in tempBgeoPath including $F and @Frame with and without backticks to no avail.
Without backticks the token gets evaluated once before the work item runs and File SOP just reads the first frame.
With backticks and the File SOP errors saying it can't read file 'temp.`@Frame`.bgeo' or 'temp.`$F`.bgeo'.

I have managed to get it to work by opening the external hip file and manually putting in the path 'temp.$F.bgeo' and then calling render() on the ROP node in a python shell (I think that's what PDG does?).
But if the work item attribute has that same value it evaluates the $F only once before rendering.

Sorry for the long one.
I'd really to see if something like this is possible. I'm hoping I'm just missing something to get the frame token in the file path.
I'll try and get an example scene tomorrow.

Thanks all.
Edited by m-cg - May 20, 2021 14:24:20
User Avatar
Member
16 posts
Joined: Jan. 2021
Offline
Also, I'm guessing this works fine when the ROP Fetch doesn't have 'Cook Frames as Single Work Item' set as each work item would evaluate each frame.
In this case the alembic is one file so has to be that way.
User Avatar
Member
16 posts
Joined: Jan. 2021
Offline
I'm also curious if anyone else is using the 'External HIP File' feature and it what way.
User Avatar
Member
16 posts
Joined: Jan. 2021
Offline
I've worked it out with a lot of help from this thread: https://www.sidefx.com/forum/topic/68933/ [www.sidefx.com]
Also, I think the waitforall wasn't set up right so the result array was getting squashed.

File SOP has this: `pdginput($F-@start, "file/geo", 0)`
so it reads each bgeo as the Alembic ROP renders.

Awesome!
  • Quick Links