jamesearnest244 Posted October 2, 2021 Share Posted October 2, 2021 (edited) 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 October 2, 2021 by jamesearnest244 Quote Link to comment Share on other sites More sharing options...
Atom Posted October 3, 2021 Share Posted October 3, 2021 You can use the unpack node. That will restore the geometry. Make your change, then pack it back up. Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted October 6, 2021 Author Share Posted October 6, 2021 (edited) Right, I just want to avoid slowing down the cooking by having it stored as geometry at some point in the network. Isn't there a way to just directly change the geo that the points are referencing? Edited October 6, 2021 by jamesearnest244 Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted October 6, 2021 Share Posted October 6, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
jamesearnest244 Posted October 7, 2021 Author Share Posted October 7, 2021 Thanks a lot @jkunz07, super helpful! Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted October 28, 2021 Share Posted October 28, 2021 New in 19, this Pack Inject node is probably a better method then Python Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.