PDA

View Full Version : Morphing current shape to another one.


Masquerade
06-15-2010, 02:21 PM
Hi everybody,

I have a problem which I couldnt figure out. Here is my setup:

I have about 100 planes which forms a shape. All of them has the exact vertex count, but each of them has different ffd modifiers.

I am using a birth script which creates one particle for each plane in the exact position, rotation and shape of the plane.

I want to morph these each differently deformed particles into the one identical flat (or preferably animated) planes after they begin to move. The problem is, I cant use shape instance operator. Although they have the same vertex count, each particle is deformed differently at the beginning.

I tried to put a shape instance operator into the next event, but obviously it just turns into the new target in one frame. And I couldnt find any soluition to ease it down.

If someone can help me about it, I would be deeply appreciated.

Thanks

JohnnyRandom
06-15-2010, 05:34 PM
Just create a shape instance op and add plane primitive the size of your animated planes and link all of your animated shapes to the corresponding particles either via script operator (or better final step script) or even better yet a box#3 operator.

Bobo has an example+tutorial here:

http://www.scriptspot.com/bobo/mxs5/pflow/pflow__MovingObjects.htm

Also there is a Final Step Update example and way more in-depth explanations on his Pflow Scripting Tutorial Series here:

https://www.cg-academy.net/es_catalog/product_info.php?products_id=74&osCsid=3jhqol3mp9bae2nj2lfp7bitlr1qco5j

:)

Masquerade
06-16-2010, 09:03 AM
Thanks Johnny,

Lets see if I understand right.

-Duplicate the planes, lets say duplicated ones named as dup_planes and the original ones org_planes.
-Create particles in the same positions and rotations of org_planes with a Birth script operator.
-Attach dup_planes to the particles via another script operator.
-Morph each dup_plane manually.

Is it right?

Actually I tried this approach but I quickly messed thing up and quit that approach. Besides, its still lots of work to morph planes manually, and not much flexible.

As a last resort, I will give it another try, but if it is possible to morph them via pflow, it would be perfect.

JohnnyRandom
06-16-2010, 05:25 PM
You could but I think this is easier:

This is a simple A to B example. It uses a single plane as your shape instance just so you can judge scale and motion of your particles

The every Step Update script is used to position the 42 (the amount of vertices in the target objects) plane primitives with a animated noise modifier to each corresponding particle.

Each animated plane follows its designated particle to it landing point.

Masquerade
06-17-2010, 08:54 AM
Thanks Johnny for the sample scene.
But, I think I couldn make myself clear. Sorry for the misunderstanding.

I dont have any problems to send particles from one point to another. Where my problem lies is that at the beginning, each particle has the same vertex count, but each of them deformed differently. I want them to change their shapes for example in 10 frames to another single shape, which also has the same vertex count.

For example, there are 50 particle and each of them bent with different angles, some of them are smaller, some of them skewed. I want them to change their shapes slowly into a flat plane after they leave their starting point.

Thanks again for the interest.

JohnnyRandom
06-17-2010, 10:00 PM
No problem, ahh it was a scene I had already made up, just added a couple of things (that is why the A to B was there)

So a bunch of different (same vertex count) objects all morph(ing) to build up one large flat plane at the end. Is that correct?

Hmm, Shape Instance didn't work? You tried grouping your morph objects.

In the example I posted if you:
1. Group all of the noise animated planes, Open the group select all of the noise phase keyframes and move them to say frame 60, close the group if you want.
2. Move the Shape Instance Op to Event02 OR the global node*. (see below)
3. Enable Separate Particles for: Group Members and enable Animated Shape (Choose you offset keying mode to particle age, or whichever works best for you)

*The Shape Instance Animated Shape is event specific, it will stop functioning when the particle is out of the event, UNLESS you drop the Shape Instance in the global node.

CGTalk Moderation
06-17-2010, 10:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.