Jump to content

Orienting split particles


thomwickes

Recommended Posts

I'd like to align split particles to face in the direction of the next split particle in sequence so I can use a copy sop to align geometry in the direction that the particles were emitted.

Say I have an emitter firing out a bunch of particles, and all of those particles are splitting and emitting every frame so they're leaving a trail behind. I'd like to aim these particles' normals towards the next particle in sequence. As multiple trails are being created at once, the particle IDs are quite messy.

I've tried aiming the normal using the velocity vector of the particle that emits them, but it seems that this is calculated every frame and the normal direction changes for all the particles in the trail as the emitting particle changes direction.

if this is too confusing, I can upload a scene file!

any suggestions?

I figured I could some how use the particle ID of the emitting particle to group each trail and sort them afterwards, and then once the point numbers are sorted correctly, aim each particle at the previous one in sequence. Although this would generate some sort of 'pop' or error for the first particle.

Link to comment
Share on other sites

a scene file always makes it easier to sort out the precise issue and answer.

Off hand my idea would be to group the particles by parent id, be sure to include the parent in the group, then outside of pops you can use an add sop to conect them, then use poly frame and tangent u (or is it tangent v, I always forget) to get the normal along the line. You can then delete the line but keep the points.

Edited by 3dbeing
Link to comment
Share on other sites

a scene file always makes it easier to sort out the precise issue and answer.

Off hand my idea would be to group the particles by parent then outside of pops you can use an add sop to conect them, then use poly frame and tangent u (or is it tangent v, I always forget) to get the normal along the line. You can then delete the line but keep the points.

sounds good. thank you sir.

my current messy fix was to inherit 0.001 of the parent particles velocity so I can aim them along velocity without them moving (very much).

Link to comment
Share on other sites

As usual my first idea is rather obtuse.

It would prolly be faster to just subtract the Position of child from Position of Parent and Normalizing (or vice versa, again i always forget).

that will aim them at the parent particle right? I'd need to do that just once for each particle on the frame after they're born so they don't always point to the parent particle, just where the parent particle was the frame after they were born

Link to comment
Share on other sites

that will aim them at the parent particle right? I'd need to do that just once for each particle on the frame after they're born so they don't always point to the parent particle, just where the parent particle was the frame after they were born

the frame after not the frame of?

well ok, you can create a birth group, create an attribute BIRTH_FRAME = $F on the birth group, now you have the frame they were born on, now create a group that says $BIRTH_FRAME == $F-1, now you have a group of every particle that was born 1 frame ago. Now you can subtract those point poitions from their parents point position, and only the particles that were born 1 frame ago will evaluate (dont forget to normalize unless distance is relevant).

Edited by 3dbeing
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...