4
$\begingroup$

Goal

I'm trying to 'morph' one moving mesh into another moving mesh using particles. The 'morph' is working well when the meshes don't move, but moving causes trouble.

What I've done

Here's my .blend file:

In the gif below, a sphere is breaking into particles, and those particles are moving to different meshes in a water molecule. The particles doing the "morphing" belong to a separate 'controller' object (not in view). The controller object has several particle systems with keyed physics, each of which has the sphere as its first key target and a part of the water molecule as its second key target.

As you can see from the gif, the particle systems in the water molecules (the targets) stay put while the molecule itself keeps rotating. What I want is for them to rotate along with the molecule. The current (undesired) result is that the particles morph to where the molecule used to be, and then the actual molecule mesh appears rotated ahead of the particles.

I've also tweaked a few things for the sake of the gif.

  • The molecule usually doesn't show until the particles arrive. For the gif, I show it the whole time so you can see where it emits the particles.
  • The 'target' particle systems usually don't show either, but I'm showing them in the gif.
  • I've enlarged some of the 'controller' object's particles to make the morphing easier to see.

enter image description here

Question

How can I give particle systems a moving target?

I've tried setting the parent of the target particle systems, which did cause the systems to move, but particle systems don't have the matrix_parent_inverse property, so the scale and rotation were offset anyway. Also, despite seeing the target systems move, the keyed "morphing" particle systems seemed to still be aiming at a single spot. (Hopefully that made sense, but if not, suffice it to say that I can't get parenting to work with particle systems.)

I'm doing this with python, so I'm considering manipulating the individual particle positions based on the movement of the emitter, but it seems like there must be a better way than re-implementing parenting myself.

Finally, I have to morph with particles rather than shape keys, unless someone can tell me an algorithm/feature that can make the topology of two meshes equivalent while keeping the same resulting shape. :)

$\endgroup$
3
  • $\begingroup$ Once a particle has been emitted, force fields have an influence on them. Adding a force field to the molecule should get it to follow it to some degree, the destinations would also need a force that is stronger than the emitter. Have a look at force, magnetic, harmonic and charge force field types. Another thought is using keyed particles to control them over time. $\endgroup$
    – sambler
    Commented Mar 1, 2018 at 15:29
  • $\begingroup$ Have you tried using boids set to Goal? $\endgroup$
    – user1853
    Commented Mar 2, 2018 at 1:23
  • $\begingroup$ I hadn't tried boids. I just played around with them a bit, and they seem interesting, but I don't see how to use them for the morph. (Setting a Goal rule sends the particles the to center of the Goal object, from what I can tell.) $\endgroup$ Commented Mar 2, 2018 at 3:02

1 Answer 1

4
$\begingroup$

Simple solution

Setting the physics type to 'No' causes the particles to stick to their emitter, even if it moves. This can be used to make moving targets for other particle systems.

Before, I was using the "Newtonian" physics type, which caused the particles to stand still in the absence of any forces or initial velocity. I assumed 'No' physics would also result in stationary particles, but they actually stay stationary in the emitter reference frame. So yeah. That's it.

More complicated solution

Before realizing the simple solution exists. I did it by creating a 'middle' layer of keyed particle systems, which move and serve as targets for the rendered particle systems.

This is more complicated and taxes a computer significantly more, but leaving it here since it seems like it could be used to add field effects to the targets, which isn't possible with the 'No' physics setting from the simple solution.

Rotating particle morph!

The initial and final objects in the morph each have three, rather than one particle system.

  • The first particle system emits stationary particles at the beginning frame of the morph.
  • The second particle system emits stationary particles at the ending frame of the morph.
  • The third particle system has keyed physics and uses the first and second systems as targets. This causes it to move, tracing the motion of the emitter object (or at least going in a straight line between toward a destination, which is good enough to create the illusion).

This third, moving system (one in each mesh) is part of the 'middle' layer mentioned above in that it's used as a target for one of the rendered particle systems.

Here are the layers of particle systems:

  • Bottom layer: Stationary particle systems emitted by each mesh at the beginning and end of the morph.
  • Middle layer: For each mesh, one keyed particle system. For targets, this system uses the two stationary systems for its mesh (beginning and end). The particle systems in this middle layer are the moving targets the initial question is asking for.
  • Top layer: These are the rendered particle systems. Each of these systems is keyed and has two targets from the middle layer, one each for the pre- and post-morph meshes.

The resulting .blend file:

It has some additional complexity because each pre-morph mesh morphs to every post-morph mesh. Also, each morph has two rendered particle systems, one each for the pre- and post-morph mesh materials. In total, there are 96 particle systems! (Though this isn't the minimum necessary since the "bottom layer" systems are duplicated.)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .