Blast "percentage" of points?

   5908   2   1
User Avatar
Member
411 posts
Joined: June 2015
Online
I'm using a sort node to blast a certain amount of points in my geo and i'd like to turn that into a “percentage of points” expression directly into the blast node. The end purpose here is to throw this few nodes into a for each loop to repeat that action several times and let the percentage gradually decrease the amount of points being "peaked and duplicated. Any idea how to write that tiny bit of vex please? I tried with some rand($PT variations but it doesn't seem to pick up in the blast node.

Cheers,

A.
Edited by Adriano - Sept. 26, 2018 21:07:41

Attachments:
SelectPercentage.JPG (204.7 KB)

User Avatar
Member
1853 posts
Joined: May 2006
Offline
a wrangle is probably easier:

 if (rand(@ptnum) < ch('cutoff') ){
   removepoint(0,@ptnum);
 }

otherwise your techniques should work, attached an example:

Attachments:
percent_delete.hipnc (74.0 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
411 posts
Joined: June 2015
Online
mestela
a wrangle is probably easier:

 if (rand(@ptnum) < ch('cutoff') ){
   removepoint(0,@ptnum);
 }

otherwise your techniques should work, attached an example:

Thanks a Lot, Matt. That did it.

Cheers,

A.

Attachments:
percent_delete_01.hiplc (114.1 KB)

  • Quick Links