Jump to content

pcopen find farthest point from sampled ones


qbick

Recommended Posts

afaik pcopen finds closest points to given one.

im need to find the farthest one from found.

for example pcopen finds 10 closest points - from that 10 points i need to get P-attrubite from farthest one.

can someone help me please?

i found point cloud farthest node in vop, but it finds a farthest distance to point - im need to get an P-attribute, not just a distance.

thanks.

Link to comment
Share on other sites

Ok so if you can get the point number of the furthest point (do a pc iterate and just take the max distance), then you can do an attribute import with that point number to get the position you're after.

If this doesn't make sense I'll jump into Houdini in a bit and create you a sample scene.

Link to comment
Share on other sites

Ok so if you can get the point number of the furthest point (do a pc iterate and just take the max distance), then you can do an attribute import with that point number to get the position you're after.

If this doesn't make sense I'll jump into Houdini in a bit and create you a sample scene.

with pcfarthest i can only get distance, not point number.

if its not hard for you - can you build a little example?

Link to comment
Share on other sites

Ok I'm on a small laptop with a one button mouse, so that was slightly frustrating! I have to set something up for home use that's not a complete PITA.

This looks like it does what you want though. Returns the point position of the furthest point from the point cloud open node, so mess with your distances/number of points there.

Hope that helps

Christian

furthestPointPos.hip

Link to comment
Share on other sites

Ok I'm on a small laptop with a one button mouse, so that was slightly frustrating! I have to set something up for home use that's not a complete PITA.

This looks like it does what you want though. Returns the point position of the furthest point from the point cloud open node, so mess with your distances/number of points there.

Hope that helps

Christian

thanks for help!

Link to comment
Share on other sites

I took a look at the file and went to throw together an alternate method, but the values I was getting did't match yours. It looks like the max vop, when working on vectors, gives you the maximum value in each component, which is causing your pointPos values to be incorrect

An easy way to get the P attribute of the farthest point in your point cloud is to use the Point Cloud Num Found node to get the total number of points returned by pcopen, then subtract 1 from that number and plug it into a Point Cloud Import by Index node.

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