# Equidistant Particle Emission

## Recommended Posts

I have a geometry that is moving with varying speed.

I emit particles from this geometry.

I want equidistant particle emission, so that I get a particle for every distance d travelled.

By default we get equitemporal emission (see attached image) but that leads to clumping that I don't want.

One idea is to use a CHOP and to look up the area under the curve travelled but since the speed can be positive and negative I need a cumulative version of this. I also don't quite know of a good way to pass this information to the emission (directly in pops? or drive a switch in sops?).

Or measure the distance to the previous particle before emission. Does that work? No strange feedback loops? Works with oversampling?

I attached my feeble and failed attempt.

How to get equidistant particle emission?

equidistant.hipnc

Edited by Macha
##### Share on other sites

Wait...hmm...second order integral...wouldn't that be cumulative? I'd just have to find a way to trigger something every x accumulations...

Edited by Macha
##### Share on other sites

Hi, we had to deal with this on a recent project. Ended up using the resample CHOP/SOP to get the subframe positions/velocities of the source, and integrating the particle system ourselves (in VOPs) - taking into account the subframe age of the particle (called framefrac in this example).

The other difference between this VOP integrator and the houdini's integrator is the order it updates the attributes.

Houdini updates the position of the particle first, then the velocity. The VOP integrator updates the velocity first, then uses the new velocity to update the position. I can't remember why we did it like this, but it seemed important at the time...

hope it helps!

equidistant2.hipnc

##### Share on other sites

I managed to do one chop trigger. I don't understand why I can't get multiple triggers. Any ideas?

(Each time the green curve increases by one there should be a peak, but there is only a single peak, not multiple peaks)

counts.hip

##### Share on other sites

I managed to do one chop trigger. I don't understand why I can't get multiple triggers. Any ideas?

(Each time the green curve increases by one there should be a peak, but there is only a single peak, not multiple peaks)

I don't really understand what you're trying to do with the trigger thing, but if you're trying to compute the distance traveled per frame in CHOPs, you should use the slope CHOP to get the velocity of the point, and the vector CHOP to get the magnitude, ie speed. then: speed * time-between-samples = distance-traveled-per-sample

##### Share on other sites

I don't really understand what you're trying to do with the trigger thing

I want to emit a particle at constant space-intervals. I need some sort of trigger for that.

##### Share on other sites

I have a geometry that is moving with varying speed.

I emit particles from this geometry.

I want equidistant particle emission, so that I get a particle for every distance d travelled.

By default we get equitemporal emission (see attached image) but that leads to clumping that I don't want.

One idea is to use a CHOP and to look up the area under the curve travelled but since the speed can be positive and negative I need a cumulative version of this. I also don't quite know of a good way to pass this information to the emission (directly in pops? or drive a switch in sops?).

Or measure the distance to the previous particle before emission. Does that work? No strange feedback loops? Works with oversampling?

I attached my feeble and failed attempt.

How to get equidistant particle emission?

see attached.

equidistant_2.hipnc

##### Share on other sites

Craig, that's great but you're cheating. You effectively retimed the animation with the expression inside the carve sop. The difference is significant (see attached image. original:red, carved:green)

I'm beginning to think this is quite a hard problem.

##### Share on other sites

Craig, that's great but you're cheating. You effectively retimed the animation with the expression inside the carve sop. The difference is significant (see attached image. original:red, carved:green)

I'm beginning to think this is quite a hard problem.

this works i think - change the length on the resample sop

equidistant2.hipnc

##### Share on other sites

this works i think - change the length on the resample sop

er.. i mean this one:

equidistant2.hipnc

the Texture Type on the texture node should be Rows & Columns.

##### Share on other sites

Man, stabby, you seem to have cracked it! Not really sure yet what you did there but it appears to work. Great!

##### Share on other sites

Man, stabby, you seem to have cracked it! Not really sure yet what you did there but it appears to work. Great!

I've fixed a couple of bugs - it should properly interpolate the forces and velocity now:

equidistant3.hipnc

##### Share on other sites

Holymoley, there is some dark murky magic in those files.

I feel like I've just been hit and slapped by some secret Houdini wisdom.

Edited by Macha
##### Share on other sites

Haven't tried but Velocity Stream POP could also help.

"The timing of emission is controlled in order to maintain a specified spacing between particles in the emitted stream."

##### Share on other sites

I've tried velocity stream but couldn't make much sense of it.

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

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×
×