Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete a given percentage of points on a point cloud

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
cescocm
620 Views, 3 Replies

Delete a given percentage of points on a point cloud

Hello,

 

another newbie question, I would like to delete a given percentage of points on a point cloud coming from an abc.

I tried with delete_points but I can't feed it with a random point_indices. So I guess the accurate question would be how can I get a randomized point_indices array to feed a delete_points node?

 

Thanks!

3 REPLIES 3
Message 2 of 4
mjcg91
in reply to: cescocm

Have a look at this graph. Like this you can delete random points by using a percentage. the multiplication part is just so that the value is turned to something between 0.0 and 1.0. You can change the random selection seed by changing the seed on shuffle array. 

 

delete_random_points.jpg

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 3 of 4
marcus.nordenstam
in reply to: cescocm

 

Hi there

 

I threw together a simple compound you can use for this (delete_points_by_percentage).

 

I've attached screenshots that show how to do it, and showing its effect on a point-cloud around a sphere.

 

Essentially, what I did was get a list of indices from the point cloud using the get_array_indices compound.  Then I randomly shuffled the indices using the shuffle_array compound.  Then, I simply get a sub-set of all those indices equal to the percentage of the points I wish to delete, by multiplying a percentage by the total number of points, and using slice_array to get that subset of the randomized indices.  That subset array is what I feed into the delete_points compound to actually remove the points.

 

Hope that helps!

 

Marcus

 

Message 4 of 4
cescocm
in reply to: marcus.nordenstam

Thanks a lot to both. That was super useful and informative. I did find a "solution" that at least was doing what I needed and probably is a super wrong and broken version. But I used a resize_array node. with a low (point_count/n) New Size.

 

I did rebuild your compound Marcus, both to have it for future use and learning purposes. Learned a few things, thanks!

 

By the way, I know that probably you already know and that you are trying, but it would help a lot of newbies like me if we had basic workflows like this documented somewhere, somehow, I understand that it's impossible to cover everything possible with Bifrost right now but also it's quite difficult to dig into it just researching these forums. Something like what Paul is doing over here but with simple particle systems would help a lot.

 

Thanks again!

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report