pops torque and tumbling metaballs

   5879   4   2
User Avatar
Member
511 posts
Joined:
Offline
Wonder if any of you have some ideas on how I might achieve this.

Im trying to implement particle rotation in such a way that mimics a characteristc of fluid sims. i.e. particles rotating away from the center axis of the sim, like this: http://www.modernmayhem.com/wordpress/?page_id=6 [modernmayhem.com]

Except it cant just be limited to an axis… they need to rotate away from an imaginary wobly line that runs through the average centre (where the smoke is most dense) of the sim. In other words imagine a smoke column blown by a noisy wind so it is skewed/distorted, and draw a line down the middle of it from the start to the end.

One way I though might be possible to do this is to use the torque POP, and using the position parameter to set this centre line so that they rotate away from it.
I thought I could simply make another particle stream, with the same emission parameters but minus some of the forces, so that these particles flow in a line through the middle of the main particle stream. And then just copy the position of these particles to the torque position, but here lies the question, how do I do this step? I tried the point() expression but that doesnt seem to work in a POP context.

thanks
Sergio
User Avatar
Member
454 posts
Joined: July 2005
Offline
I wish this forum cached entries. I carefully wrote up a solution to this only to have a houdini help server open in another tab crash my whole firefox session.

nevermind. Here's a short version.

Use Sops for more control. Pops are great for position and velocity but make controlling rotations very difficult. Turn on particle gnomon in viewport to see rotations.

You need to animate a curve along the central axis of your plume/flow. Use tangent SOP to flow normals along curve(watch 1st and last point N). Copy P into a vector called “pos” and N into “flow” vector using attr create.

The rotate VOP rotates a vector around an axis using an angle (in radians). You need:
  • * a make_transform VOP hanging with no inputs.
    * A vector to rotate (normalized N or v probably) (See below)
    * An angle parm (convert from radians maybe). (you probably want to override this float to be a function of particle life or proximity to plume/flow curve.)
    To get the axis vector:
    * you need to use attr transfer pull the near point “pos” and “flow” off your plume/flow axis curve.
    * Create a vector “near” from your particle to the curve nearpoint by subtracting your particles P from pos.
    * take a cross product from your “near” and “flow” vectors. Feed into axis parm of rotate.

    Export the rotated n or v.

    Much of this could be in one VOPNET.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
poppoint() is what you use in POPs.


If you want to do this in POPs (the attrib transfer in SOPs is my preferred method as outlined above), you need to use the Torque POP.
Torque POP takes an offset in X, Y and Z in the particle's frame of reference. To see each particle frame of refernce, hit “d” in the viewport and turn on the particle gnomons.

Torque is a force. You need to apply it then back off.

See the example file. The outside ones spin faster than the inside ones.

Attachments:
turning_outside_points.hip (413.1 KB)

There's at least one school like the old school!
User Avatar
Member
511 posts
Joined:
Offline
Thanks guys, thats fantastic!

Jeff: but poppoint cant pickup info from particles on another stream, right?
by another stream I mean two unconnected pop flows, one of which flies through roughly the center of the other flow.

Not that it matters any more
just curious if there is some way to copy info from a node that lives on another flow or even outside the popnet, assuming both have the same number of particles at any time.

btw one of the things I tried was to transfer N from the surfaced metaballs, it flickered a lot regardless of samples etc, I guess coz of its constantly changing topology, in addition I didnt know how to orient the axis for proper rotation (math isn't my strong point). I guess the line method with its stable geo will be super stable tho.

cheers

Sergio
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Jeff: but poppoint cant pickup info from particles on another stream, right?
by another stream I mean two unconnected pop flows, one of which flies through roughly the center of the other flow.
Yep, you are right.

Best to do as much work as possible before you go in to POPs.
I just wanted to show that you can rotate the particles inside POPs as well using torque manipulating the up vectors. How you build up the attributes that control the rotation can be done in SOPs with curves or other geometry.
There's at least one school like the old school!
  • Quick Links