bonassus Posted September 23, 2017 Share Posted September 23, 2017 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 b Quote Link to comment Share on other sites More sharing options...
acey195 Posted September 24, 2017 Share Posted September 24, 2017 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); 1 Quote Link to comment Share on other sites More sharing options...
bonassus Posted September 24, 2017 Author Share Posted September 24, 2017 Thank you acey195 i appropriate the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.