How to access a construction plane in headless Houdini?

   862   2   0
User Avatar
Member
86 posts
Joined: April 2019
Offline
Hi,

I have a small python script which is using a construction plane to snap and align Kinefx joints to a plane.

It works well in normal Houdini however, because accessing a construction or reference plane requires access to hou.ui, my script will not work in headless modes such as background saving and TOPs.

Is there another method for access a construction or reference plane without accessing hou.ui?

Thanks
User Avatar
Member
343 posts
Joined: March 2023
Offline
the hmath library have ton of utility like intersectPlane : https://www.sidefx.com/docs/houdini/hom/hou/hmath.html#intersectPlane [www.sidefx.com]

you can also try using vex : https://www.sidefx.com/docs/houdini/vex/functions/planepointdistance.html [www.sidefx.com] with the combination of verbs : https://www.sidefx.com/docs/houdini/model/verbs.html [www.sidefx.com]

overall, I'd recommend avoiding python completely to manipulate geometry, Its slow and don't have all the goodies sop and vex offer, if you're using tops, a simple wrangle should do the trick.
Edited by ASquirrel - Feb. 17, 2025 05:41:57
Head of Pipeline @ LightVFX
User Avatar
Member
86 posts
Joined: April 2019
Offline
Thanks for the response.

Yes, I should probably replace all of my python sops with vex... I just find python much nicer to work with as it has some really nice helper methods

For now, I managed to solve my problem while sticking with python.

Thanks again for your help.
  • Quick Links