Jump to content

centroid in pointWrangle


haggi

Recommended Posts

Hi,

 

I try to get the centoid of an object in a pointWrangle node. First I added a float3 attribute to the pointWrange and set the values of this attribute to the centroid of my object like: centroid("../myCube", D_X) etc. This works fine, the values are updated. Now I try to use this attribute in my pointWangle code  with: `chs("centerAttribx")`. But it seems that this procedure does not update the values in the pointWrange node.

 

My solution is to create a point with an add node set the position of the point to the centroid and plug this node into the second input of my pointWrange node. This works so far, but I'd like to know if there is a more elegant way to get the centroid directly from within a pointWrangleNode.

 

Link to comment
Share on other sites

Hi Haggi,

 

I was wondering if you could share that file with us. I was under the impression that you can't run Houdini expression language in wrangle nodes, and that you were limited only to VEX. I would love to learn how you got that to work. I have tried using expressions like centroid() in the past, but remember getting errors due to that.

Thanks,

Ilan

Link to comment
Share on other sites

  • 2 years later...
  • 3 years 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...