Generating Animation Cache from HDA with PDG

   1486   3   1
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
If I have an HDA with built in animation like a tree with procedural leaves animation, can the HDA Processor TOP generate an animated cache .bgeo file for each wedge? If not, what would be a good way to generate this using TOPS? or what we be a good way to have TOPS spit out an HDA node a number of times with varied parameter that I could then cache?
hou.f*ckatdskmaya().forever()
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
Ok, so after sieving about in the TOPS/PDG documentation, I got this working using a Python processor and some attributes. Not sure if this is a good way to do this or anyone can share some better (I'd really appreciate it!)

  1. first I use a wedge TOP just to create some work items, 3 in this case for testing purposes.
  2. Next, I used the python processor to create an instance of the HDA for each work item and create 2 attributes (a path to each hda created and a string to use in the output filename). I also adjust a parameter on the HDA (trunk_height) to give each HDA a different trunk height as a test to see if it works.
  3. Next, I use the partition by attribute TOP to make sure that the work items complete by attribute before moving on (at least I think that's what it does)
  4. Then I use the hda_path attribute as the soppath in the ROP geometry TOP and use the save_name attribute somewhere in the output file name. Also I set the frame range here to 2 so I only get 2 Frames per HDA instance for testing purposes. (see images)

In the final setup, I'm using the wedge to actually generate the values for the attributes as you would with the HDA processor TOP, then I'm referencing those attributes in the python processor.

With this, I get varied HDA instances caching to disk with the procedural animation that's built into the HDA. Thoughts?
Edited by traileverse - Jan. 26, 2022 22:09:28

Attachments:
TOPS_graph.jpg (24.6 KB)
python_processor.jpg (138.7 KB)
partition_by_attribute.jpg (38.9 KB)
ROP_geo.jpg (56.3 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
8539 posts
Joined: July 2007
Offline
should be as simple as

- Wedge
- Range Generate (to generate workitem per frame in your anim sequence)
- HDA Processor (to execute your HDA per frame for each wedge and vary it's parameters and output name using attributes)
Edited by tamte - Jan. 28, 2022 00:21:53

Attachments:
hdaprocessor_test.zip (34.5 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
tamte
should be as simple as

- Wedge
- Range Generate (to generate workitem per frame in your anim sequence)
- HDA Processor (to execute your HDA per frame for each wedge and vary it's parameters and output name using attributes)
Thanks, knew nothing about the range node but I figured there was a simpler way. cheers.
hou.f*ckatdskmaya().forever()
  • Quick Links