Jump to content
bonassus

adjacent triangles not deleting

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×