Jump to content

Equidistant Particle Emission


Macha

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

post-4013-130152868296_thumb.jpg

Edited by Macha
Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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.

post-4013-130154687878_thumb.jpg

Link to comment
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

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