Jump to content

PDG: Python to change the OBJ level with TOPs makes sense?


probiner

Recommended Posts

I have a collection of 3D assets and want to setup a PDG network to do a couple of test renders on each, individually, to for quality control purposes. These 3D assets are NOT just bgeo.sc geometry caches but instead are small networks of Houdini OBJ nodes inside a subnet, where there's a simple OBJ hierarchy of multiple geo and null nodes, with material networks inside of the geo nodes. So I need to actually import nodes into the scene to be rendered, not just change the file parameter in a File SOP like seen in many PDG demos. Is this scene network modification something that is fit for PDG or I should just stick to scripting?

My overall idea of the routine would be:

1 - Set on template points or primitives an attribute referencing which 3D assets network will be loaded and use them to generate with geometryimport TOP the work items per 3D asset to be processed.

2 - Load the designated 3D asset into /obj network or an OBJ network, using Python; hou.node("/obj").loadItemsFromFile().

3 - Fit the 4 cameras (Front, Top, Side, Perspective) camera to the 3D asset. This can be done by having the cameras rigged already waiting for a subnet to be referenced so they fit to its contents.

4 - Render the 4 images. (Maybe generating 4 new work items per render?)

5 - Composite those 4 rendered images into a single image contact sheet probably with ImageMagik TOP

I suspect I'll find enough material out there for the last two items, but it's the first two and especially step 2 is what I'm asking for some insight. Does it even makes sense to use TOPs for this since I'll be doing changes to the hip scene graph not just changing parameters to load different cached data. I guess I could use a Python TOP to do the loading but will it make any sense in the TOP workflow? Would using LOPs instead of OBJ networks help in this process?

Thanks
prb
 

Edited by probiner
Link to comment
Share on other sites

Here's a video and scene file exemplifying the issue I'm having.

While I can change the scene with python and create items, the renders show nothing, but if I manually render, all the items are rendered. And I want to have each item loaded on its work_item to be rendered alone without the others.

I'm still not grasping if loading several OBJ networks(scenegraph changes) and render each separately is unfit for PDG or I'm just missing the plot.

Cheers
prb

PRB_OBJ_PDG.hiplc
rec_-2021-11-11_17.46.33.mp4

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...