Jump to content

Sliding Particles from Birth


tjeeds

Recommended Posts

I'm hoping there is a simple answer to this but I'm having some difficulty creating particles that slide on a surface right away without having to be collided against the surface first. I feel like there must be a way to birth particles on a surface and have them be automatically sliding/stuck/stopped without going through the process of testing for collision. In the example file I'm wanting to have the particles I'm birthing on subframe 1 all cling to the sphere and slide down the sides.

I tried to accomplish this by manually adding the attributes that I could see in details view on collided particles, changing the state of the particle and so on. I also tried the Creep POP to no avail. I'm eventually going to be controlling them with the velocity of the birthing surface so pushing them from prim to prim in uv space doesn't seem very appealing.

Any thoughts?

Birth_Sliding_Particles.hip

Link to comment
Share on other sites

I'm hoping there is a simple answer to this but I'm having some difficulty creating particles that slide on a surface right away without having to be collided against the surface first. I feel like there must be a way to birth particles on a surface and have them be automatically sliding/stuck/stopped without going through the process of testing for collision. In the example file I'm wanting to have the particles I'm birthing on subframe 1 all cling to the sphere and slide down the sides.

I tried to accomplish this by manually adding the attributes that I could see in details view on collided particles, changing the state of the particle and so on. I also tried the Creep POP to no avail. I'm eventually going to be controlling them with the velocity of the birthing surface so pushing them from prim to prim in uv space doesn't seem very appealing.

Any thoughts?

Well, the Creep POP should do what you want. It uses the posprim and posuv attributes to store the current primitive and uv parametric coords as it slides the particles around the surface. So basically you want to set those attributes up to reflect the birth positions of your particles on the first frame, then let the Creep POP update them from there on out. I thought there was an easy way to get the birth primitive and UV from the source POP, but I'm not finding it right now (anyone?). So I modified your file to use the xyzdist expression function. The particles that are birthed are put into a "birth" group that is only valid for the timestep where they are birthed. Two Attribute POPs create the posprim and posuv attributes only for those just-birthed particles, setting them to their current parametric values calculated with xyzdist. A Creep POP takes care of the sliding. Note the Attribute POPs only ever apply to just-birthed particles.

Like I said, there may be an easier way to get the parametric info about where the particles were birthed, but this approach seems to work if a little slow. Note that you could move this all up to the SOP level, and send scattered points into the POPNet as the source geometry with these attributes already set up. That would avoid having to recalculate the attributes each time you restart the particle sim.

Hope that helps.

Birth_Sliding_Particles_xyzdist.hip

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...