Macha Posted March 30, 2011 Share Posted March 30, 2011 (edited) 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 March 30, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
Macha Posted March 31, 2011 Author Share Posted March 31, 2011 (edited) 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 March 31, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
stabby Posted March 31, 2011 Share Posted March 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
Macha Posted March 31, 2011 Author Share Posted March 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
stabby Posted March 31, 2011 Share Posted March 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
Macha Posted March 31, 2011 Author Share Posted March 31, 2011 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. Quote Link to comment Share on other sites More sharing options...
3__ Posted March 31, 2011 Share Posted March 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
Macha Posted March 31, 2011 Author Share Posted March 31, 2011 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. Quote Link to comment Share on other sites More sharing options...
stabby Posted March 31, 2011 Share Posted March 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
stabby Posted March 31, 2011 Share Posted March 31, 2011 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. Quote Link to comment Share on other sites More sharing options...
Macha Posted March 31, 2011 Author Share Posted March 31, 2011 Man, stabby, you seem to have cracked it! Not really sure yet what you did there but it appears to work. Great! Quote Link to comment Share on other sites More sharing options...
stabby Posted March 31, 2011 Share Posted March 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
Macha Posted March 31, 2011 Author Share Posted March 31, 2011 (edited) 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 March 31, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
Hazoc Posted April 2, 2011 Share Posted April 2, 2011 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." Quote Link to comment Share on other sites More sharing options...
Macha Posted April 4, 2011 Author Share Posted April 4, 2011 I've tried velocity stream but couldn't make much sense of it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.