berkhak Posted March 31, 2016 Share Posted March 31, 2016 Hey guys, I was wondering if anyone knows how to delete rand points/prims with `rand()` in blast SOP. For some reason I couldn't get it to work: `rand(@ptnum)`>0.5 so I did this.. @id>`fit(0.5,0,1,1,npoints(opinputpath(".",0)))` but I guess there are chases where I dont/cant use id. Thanks! Quote Link to comment Share on other sites More sharing options...
davpe Posted March 31, 2016 Share Posted March 31, 2016 if i need to use an expression for deleting geo i use the Delete SOP (Operation > Delete by expression). Quote Link to comment Share on other sites More sharing options...
animatrix Posted March 31, 2016 Share Posted March 31, 2016 It's much faster to delete in VEX than Delete SOP, but it's not because of the delete, as the delete operation is not multi-threaded in both cases. Quote Link to comment Share on other sites More sharing options...
anim Posted March 31, 2016 Share Posted March 31, 2016 you can't do that directly in group parm, but just use wrangle to compute the value as an attribute like: i@delete = rand(@ptnum)>0.5; then blast by that attribute: @delete=1 I remember Blast SOP being faster than removing geometry in VEX 1 1 Quote Link to comment Share on other sites More sharing options...
fathom Posted March 31, 2016 Share Posted March 31, 2016 (edited) use a point wrangle: if (rand(@ptnum)>.5) removepoint(0,@ptnum); edit: it'd be interesting to see if the two step approach is faster (flag/blast vs remove in vex) Edited March 31, 2016 by fathom Quote Link to comment Share on other sites More sharing options...
berkhak Posted March 31, 2016 Author Share Posted March 31, 2016 Yes, indeed the blast SOP is faster. you can't do that directly in group parm, but just use wrangle to compute the value as an attribute like: i@delete = rand(@ptnum)>0.5; then blast by that attribute: @delete=1 I remember Blast SOP being faster than removing geometry in VEX I have been doing the same way so far too. I was just wondering if one step was possible. Thanks for the answer! use a point wrangle: if (rand(@ptnum)>.5) removepoint(0,@ptnum); edit: it'd be interesting to see if the two step approach is faster (flag/blast vs remove in vex) Alright, I will do a test to see which one is faster. I ll post the results! Thanks again! Quote Link to comment Share on other sites More sharing options...
berkhak Posted March 31, 2016 Author Share Posted March 31, 2016 you can't do that directly in group parm, but just use wrangle to compute the value as an attribute like: i@delete = rand(@ptnum)>0.5; then blast by that attribute: @delete=1 I remember Blast SOP being faster than removing geometry in VEX Yes, just like you said it faster to use blast then removeing geo in VEX, thanks guys. Almost twice as much: (7M points) Quote Link to comment Share on other sites More sharing options...
danw Posted April 5, 2016 Share Posted April 5, 2016 Yes, just like you said it faster to use blast then removeing geo in VEX, thanks guys. Almost twice as much: (7M points) blastvatw.jpeg I think it may depend on how much you're removing from what... I just found that removing primitives in a primitive wrangle was notably faster *if* I was removing a small number of prims from an object with a large number of them (deleting ~20,000 from ~1,000,000) If I was deleting the majority of them, it was notably faster using Blast (deleting ~980,000 of ~1,000,000) No idea why! 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.