Variable frame range for ROP Fetch

   4875   2   1
User Avatar
Member
47 posts
Joined: 3月 2014
Offline
Hi. I'm trying to do a simple thing using PDG (TOPs).
Basically what I want to is to go through a bunch of MDD files in a folder, for each file I do my thing in SOPs - producing animation of some length, and then save that animation as single Alembic file (one for each input file). Basically sort of a animation file converter.

What I'm struggling with is, how to generate different frame range on my ROP Fetch for each incoming work item (incoming MDD file).
What I want to do is for each input (input mdd file) work item - take frame range stored in it's file name, and set it on my ROP Fetch node to generate needed amount of frames.

I'm doing “All frames in one batch” on my ROP Fetch node, and this seems to be able to produce multi-frame Alembic files.

Before that I was trying to do single frame ROP Fetch node and specify frame range in my Alembic ROP node, but it did not work that way.. only first frame was rendered all the time.

Is this possible or am i approaching it completely wrong?

Here is my TOPs network.. I have two File Pattern nodes - one for MDD files and other for Obj file (I apply mdd animation on obj file). I combine them to have work items with both paths. :
Edited by rendereverything - 2019年10月18日 12:12:15
User Avatar
スタッフ
585 posts
Joined: 5月 2014
Offline
You can specify a range by setting Evaluate Using to “Frame Range”, and then entering an expression for the frame range. I've attached an example that wedges out random noise and frame range values, then cooks a target SOP node using a ROP Geometry with the frame range. Each wedge variation has its own unique range which is used to drive the Frame Range parameter on the ROP.

If the frame range information you need is in a file, you'll need to load that into PDG and get into an attribute on the work item. Your ROP Fetch can then access that attribute to set the frame range.

Attachments:
range_example.hip (174.4 KB)

User Avatar
Member
47 posts
Joined: 3月 2014
Offline
oh, nice! I was trying to do this before, but I guess I did something wrong, so I concluded that it does not work..
Tried it again - generating attribute with python and then referencing it with hscript expression in ROP Fetch, and it works!!

Awesome! Huge thanks!
  • Quick Links