Jump to content

accessing object centroid in vop


ltmedic

Recommended Posts

Hey guys

 

I guess the title says it all but i'm unclear as to how to access an objects centroid within a VOP network. I'm wanting to use the centroid of the object to help create a custom velocity field to push velocity away from the centre of the object.

 

Thanks

Link to comment
Share on other sites

You can use the bbox vop and then average the min and max with average vop, this will give you the centroid.

However this calculation would be performed for every point/voxel/prim whatever the vop is set to run over.  An alternative is to just make a vector parameter with the usual: centroid(opinputpath('.',0), 0) centroid(opinputpath('.',0), 1) centroid(opinputpath('.',0), 2)

 

Either one should be fine.

  • Like 2
Link to comment
Share on other sites

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