In the scene I have, the different “assets” are divided into groups (the attached .hip is a simplified example). Initially I searched for a way of using the groups to convert the geometry to USD, but couldn't find any, so I broke the geo into one OBJ node per group, for feeding into a Scene Import LOP, followed by a USD ROP (in the .hip, under ‘/obj/geo1/lopnet__SceneImport’). This worked to produce one .usd per object, although it based the file paths on Houdini node paths:
To work around this, the only way I found was to use a custom output processor (.py attached) that removes unwanted parts from the save paths. I also needed to disable “Error Saving Layers With Implicit Paths” on the ROP node, so it would downgrade the errors about paths to warnings, and cook successfully. With this, .usd files were saved where I want them, although still with warnings:
To have more control, I ended up scripting the creation of SOP Import, Configure Layer, and other LOPs – one set of them per object (in the .hip, under ‘/obj/geo1/obj_to_lop1/lopnet’). This gave me .usd files exactly where and as I want them (that is, with the intended USD structure); however, I'm worried about the overhead of having to manage these nodes, especially if the number of objects to process is very large. But perhaps this wouldn't be an issue except in extreme scenarios (e.g. thousands of objects)?
So this is what I'm mostly interested in getting some feedback about: Is the last approach the expected way to deal with this scenario – where many assets (at best, separated into OBJs; at worst, separated by attribute/group) are to be converted into USD?
Edit: Reworded for clarity.