Jump to content

Generate a certain number of particles?


Diphon

Recommended Posts

Hello, I'm still super new to houdini and expressions. I'm trying to set up a tracer rig that will only emit 20 shells. Each round is emitting a spiral smoke trail so I can't use the max particles function on the POPnet itself.

I was thinking along the lines of setting the constant activation to 1 if the shells group contains less than 20 points. I'm just not quite sure how to write that out. Any help you folks can give would be greatly appreciated.

Link to comment
Share on other sites

If I understand you right, you could use 'pointlist' expression to return a list of all the points in a particular group, you will need to wrap that up in an 'argc' expression to count those points. Then you can pop all of that in an 'if' statement to return a true or false depending on the number of points.

It would like this - if(argc(pointlist("your_node_path", "your_group_name"), < 20 , 1, 0)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...