How do you display a point attribute in an HDA's parameters?

   1193   3   1
User Avatar
Member
1 posts
Joined: Aug. 2022
Offline
Hey, I'm working on an Island Generator for a portfolio piece and I'd like to ask someone with more experience in Houdini if they know of a way to display point attributes in an HDA's parameters. I have these three float attributes assigned to a point that calculates the import scale settings for Unreal's landscape system. I'd like to have them visually available from within the HDAs parameters so that I don't need to switch between Houdini and Unreal to view the information. I assume that the Data or Label parameters are used for something like this, but I don't know/haven't used these parameters before.

If anyone would be willing to share information or solved a similar issue in the past please let me know! It's not catastrophic if I can't figure this out, but I'd rather not leave a problem like this unsolved while I'm learning Houdini.

Attachments:
Help.PNG (502.8 KB)

User Avatar
Member
15 posts
Joined: Oct. 2019
Offline
I don't think you can import points into UE, only actual geometry (UE won't cook an HDA with just points as there's nothing there) - you can get position information from generated geometry (like copytopoints with a simple box) in blueprints (get position from actor etc). That's how I did it in the past.
Edited by DavidB - March 10, 2023 05:57:59
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
I've attached an example file, see if it can help.
The idea is to use a Python Sop inside your HDA, so every time the HDA cooks, the pythons sop would write the attrib values to parameters of the HDA.
node = hou.pwd()
geo = node.geometry()
hda = node.parent()
# get attrib values
scaleXY = geo.iterPoints()[0].floatAttribValue('scaleXY')
scaleZ = geo.iterPoints()[0].floatAttribValue('scaleZ')
# write to parms
hda.parm('scaleXY').set(str(scaleXY))
hda.parm('scaleZ').set(str(scaleZ))



NOTE:
It works for one point only.
For more points, the setup would be more complicated.

Attachments:
attrib_to_parms.hiplc (124.9 KB)

User Avatar
Member
131 posts
Joined: Aug. 2012
Offline
Alternatively, use expressions in a Font SOP to show attribute values.
  • Quick Links