Jump to content

adjacent triangles not deleting


bonassus

Recommended Posts

Can anyone tell me why this happens? I divided some quads from a grid. In a foreach loop i grouped prims with 3 points:

if(npoints(0)==3){
f@group_delete = @ptnum;
}

but it only adds half of the triangles to the group. If i do npoints()==4 no prims are added to the group. If i do unique points before the loop only some of the quads are added. 

I suspected that this has to do with vertex numbers v.s. point numbers. so i tried primvertexcount() but got the same result. 

how can i remove all triangles from this geo?

 

thanks 

Screenshot from 2017-09-23 17-09-09.png

Link to comment
Share on other sites

ahh I think the way you assign points to the group is not entirely correct.

@group_delete = 1; // this assigns the CURRENT processed primitive to the group
@group_delete = @ptnum; // this assigns the CURRENT processed primitive to the group, if the point number is not equal to 0 (for 0 the boolean is false)

what I do know is that you do not really need to use a forloop here.
when you set a wrangle to run over primitives, you can query for the local vertex counts too.

so you can simplify your code to the following, and it does not even need to be in a forloop this way (but should still work if it is):

@group_delete = (@numvtx == 3);

 

  • Like 1
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...