Jump to content

Intrinsic Geometry ID


Recommended Posts

Hi,

When I instance packed geometry onto points with the Copy to Points SOP, it seems that each point gets an intrinsic attribute called geometryid that tells it which geometry to copy onto it. But the value of this attribute is some obscure internal identifier. Is there some way to modify the geometry that the points are referencing, after the Copy To Points SOP? Obviously this is easy to do before the Copy To Points, but in my specific case I need to do it after.

 

Thanks for any tips!

Edited by jamesearnest244
Link to comment
Share on other sites

geometryid is a read only primitive intrinsic and cannot be directly modified.

 

You can however use python to update the embedded packed geometry https://www.sidefx.com/docs/houdini/hom/hou/PackedGeometry.html

node = hou.pwd()
geo = node.geometry()

for prim in geo.prims():
    prim.setEmbeddedGeometry( node.inputs()[1].geometry() )

Put this code in a python sop to replace the all the packed prims geo to whatever is plugged into the next input of the python sop.

 

If possible, it's best to wait til the very end of your network to do the copying to points, the variant attribute can be used to determine which packed geo is copied on to each point. and this is a more efficient approach then using python to replace embedded geometry.

 

Another option that is preferable to the python method is to use packed disk primitives, these have an intrinsic called "unexpandedfilename" which is the path to the geometry data they reference on disk.

This intrinsic can be overwritten via vex (https://www.sidefx.com/docs/houdini/vex/functions/setprimintrinsic.html) to change the geometry that the points are referencing.

  • Like 1
Link to comment
Share on other sites

  • 3 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...