Jump to content
Sign in to follow this  
IIBit

Deleting particles without velocity « warning - beginner question »

Recommended Posts

Hello good people of Odfore,

 

I've just started delving into Houdini 14, trying stuff, playing... You know how it goes.

I've managed to make a small simulation, based on the color channel and an Attribute Transfer. Nothing fancy, just a rock rolling down a hill. I've attached a popnet to the terrain generate some debris/dust/... based on the color attribute transfer. 

 

The problem I'm having is that the popnet generates particles all over the terrain and only the ones that are affected by the Attribute transfer have velocity. Unfortunately I have had no luck finding how I can delete the particles that have no velocity, or how to generate more or less particles, so I can add some copies. :)

 

So I wonder what if anyone here can find the solution. You probably can, and the solution is probably very simple, but I've just started out so any help would be appreciated.

 

I hope I make sense. I've enclosed the .hipnc-file so you can take a look. Any other pointers you can give me are more than welcome!

 

Thanks!

Falling_Rock_Attrib_Create.hipnc

Share this post


Link to post
Share on other sites
 how to generate more or less particles, so I can add some copies

 

 

You can scatter points based on color by paint SOP and emit particles from those.

Share this post


Link to post
Share on other sites
Unfortunately I have had no luck finding how I can delete the particles that have no velocity

 

 

In delete SOP > Set Entity to Points > Delete by Expression > Filter Expression

length($VX, $VY, $VZ) == 0

or 

length($VX, $VY, $VZ) < 0.1

Share this post


Link to post
Share on other sites

Or in AttribWrangle:

 

if(length(@v) < 0.1)
    removepoint(geoself(), @ptnum);

Share this post


Link to post
Share on other sites

Wow, thanks a lot everybody! That helps me out a lot. It never ceases to amaze me how flexible Houdini is. I'd better dive in to expression too.

Share this post


Link to post
Share on other sites

Go with wrangles if you have many (millions of) particles - its just much, much faster.

Share this post


Link to post
Share on other sites

Use a Geometry Wrangle or a POP Wrangle if you're dealing with particles, and use an expression like this:
 

if(len(v@v) < ch("min_speed")) {
    removepoint(0, @ptnum);
}

Or use a SOP Solver in your DOP network to delete the points using any of the SOP-based methods listed above.

  • 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
Sign in to follow this  

×