Graft Node changes light positions

   1853   3   3
User Avatar
Member
2039 posts
Joined: 9月 2015
Offline
Before I send this in as a bug, anyone know why this graft node changes the position of the lights?

(In Red colored lopnet network node.)
Edited by BabaJ - 2021年6月16日 11:51:05

Attachments:
GraftNode_ChangeLightPosition.hiplc (1001.0 KB)

User Avatar
Member
359 posts
Joined: 4月 2017
Offline
I'm still figuring all this USD stuff out myself, but I believe the issue is that the default Graft settings are trying to parent your /lights primitive from merge1 to /`opinput(".", @input)`, which is evaluating to /Light_CornerPt_3. That object has its own transform, and your lights are now inheriting it. If you change the Primitive Path to something else, like /lights, this will import your lights to the right location. However, because you're grafting and not sublayering or merging, that will entirely overwrite the /lights primitive from your other branch. Grafting is a referencing operation, and what you likely want is sublayering so that you combine any unique data underneath each branch. A Merge LOP is essentially a sublayering option for in-memory primitives like what you have here, which is why it works the way you'd expect.

tl;dr keep your scene graph tree open at all times and sublayer/merge if you want to combine things under the same xform
Edited by toadstorm - 2021年6月17日 14:56:00
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
2039 posts
Joined: 9月 2015
Offline
Thanks toadstorm.
User Avatar
スタッフ
451 posts
Joined: 6月 2020
Offline
For your use-case, you might consider using Graft Branches rather than Graft Stages, which supports "Keep Position". See a modified version of your original scene, attached.

Attachments:
GraftNode_ChangeLightPosition.hiplc (1002.8 KB)

  • Quick Links