Jump to content

Removing Points on corners


Etienne

Recommended Posts

So, I have this...image.thumb.png.c6ce09a275d79267e515b910b6d0d2f1.png
I want to delete points at the corner. I'm using a sphere, copy to points on my first ADD that have the corner points I need to remove.

image.thumb.png.114e144f1196d5f197f7c78909b136da.png
I have created  a group name corner points using Bounding Object as Bounding type.
but the group as nothing selected.
image.thumb.png.5738aa04b6b6aaf6ad94d11f60ffba0c.png
Can someone point me out where I might have gone wrong please.
Thanks.

Link to comment
Share on other sites

while even primitive shperes should work, it's difficult to see what's wrong with your scene just from screenshots

alternatively you can use Group Expression (or wrangle)

nearpoint(1, @P, 0.01) != -1

where 0.01 is you threshold which means that only points within this threshold distance from points in second input will be in the group

 

select_points_by_second_input.hip

Link to comment
Share on other sites

Not sure why isn't working with the ctp as it is, if you use a transform and move the sphere to the pt it works as well. Anyway, for now if you add a vdbfrompolys after the ctp it works. This might be a bug so it might good to report it. 

 

houdini_KKrb53FW5j.png

houdini_YU16ChMTaM.png

Link to comment
Share on other sites

For your case, this works (run on point wrangler):

 

int pts[] = neighbours(0,@ptnum);
if(len(pts)!=2) return;
vector n1 = normalize(point(0,"P",pts[0])-@P);
vector n2 = normalize(point(0,"P",pts[1])-@P);
@group_corners = dot(n1,n2)>-0.1;

 

Link to comment
Share on other sites

9 hours ago, Noobini said:

methinks there's a bug with the resample ?

simple example, lowres circle, group all points as orig.

resample, now select the orig group....they ALL light up...not kosher I don't think.

 

vu_resample_bug.hiplc

I didn't find any references in the doc on the subject of how the attributes or group are handled during a resample.

I know the attributes are linearly interpolated, but it's unclear how the groups are interpolated, whether in resample or subdivide.

However, it can be emulated using a float attribute..

FWIW:

the point groups are correctly interpolated in "Treat polygon As: Straight Edges" mode, and not in the two other ones (Subdivision, Interpolate)

Edited by AntoineSfx
Link to comment
Share on other sites

20 hours ago, Etienne said:

I am fallowing this video. at 46 minutes my group just do not work.

House_gen.hipnc

 

 

You have almost duplicate points in Add1 because of  Facet1 (unique points)

The bounding object in group1/ input2 is made of non connected  and overlapping geometries. Each sphere is present twice, and it's causing problems in the algorithm they're using to test if a point is inside a bounding object or not.

See https://en.wikipedia.org/wiki/Point_in_polygon for the reason why two overlapping spheres will cause points at their intersection being incorrectly seen as outside.

The VDB  From Poly is "solving" this by merging the two identical spheres together and makes the geometry nice and clean.

 

Edited by AntoineSfx
Link to comment
Share on other sites

7 hours ago, AntoineSfx said:

I didn't find any references in the doc on the subject of how the attributes or group are handled during a resample.

I know the attributes are linearly interpolated, but it's unclear how the groups are interpolated, whether in resample or subdivide.

However, it can be emulated using a float attribute..

FWIW:

the point groups are correctly interpolated in "Treat polygon As: Straight Edges" mode, and not in the two other ones (Subdivision, Interpolate)

well Treat polygon as straight edges is STILL wrong for me. Anyway, to me it's far more logical to NOT auto lump any new geo into existing groups...just me.

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