|'Progressive Morphing' with pointcache2; fast, easy, free.||
'Progressive Morphing' is something those of you who used MorphMagic back in R2 will be familiar with. Di-O-matic's new Morph-O-matic also has this feature.
The idea being that a 'progressive morph' is not made up of a linear point-to-point shape change, but moves through multiple targets with interpolation on the motion of the vertices so that you (ideally) end up with the points moving fluidly through a (typically) curved range of motion: ie a finger bending through an arc.
Recently John Burnett made available a modified version of the PointCache that ships with Max4. This is a very useful extension that really adds to the functionality of PointCache and makes what I am talking about here possible, so major kudos to JB.
This is going to be a simple tute with only a few basic images and some files you can download to see what is going on.
The basic concept
1. Use pointCache2 to cache out the individual motion of each element of an object (say each finger of a hand) that is animated using (say) bones.
2. Load each pointCache2 cache into an individual pointCache2 modifier on a non-animated base mesh,
3. Turn 'Use relative offsets' on for each pointCache2, and turn on 'Use Playback Graph'.
4. For convenience, wire each of the playback graphs to custom attributes assigned to a helper object. These become your morph sliders.
That's about it. You have, effectively, with ridiculously little setup, (potentially) hundreds of individual morph targets that some simple sliders move your mesh through. You can cut down on disk space and cache out every 10th frame or whatever you please.
Step One: Build
a scene with animation.
For this test I simply wanted to demonstrate the motion through an arc, so it is pretty basic.
This is a screenshot showing ghosting to demonstrate the motion, it is using blur's Twist-O-Rama modifier on some poly subselections. Click the image to download the file, you will need to get blur's plugs from blur and pointCache2 from John Burnetts site.
Step Two: PointCache2 out each element that needs animation.
Pretty straightforward, add some pointCache2 modifiers at the top of the stack, turn off the necessary polySelect and Twis-o-rama modifiers and cache out the motion of each individual spike.
turn off/remove p.select and twist modifiers, set up PointCache2 mods.
Turn off/remove all the polySelect and Twist-O modifiers, then set each pointCache2 to 'Use relative offsets' on, and 'Use Playback Graph' on.
wire playback graphs to some custom attributes on your favourite helper.
One way or two way, your choice.
have fun animating.
This link here will download the sample scene animated with the cached out data, you will most likely have to reselect the caches for each pointCache2 modifier. The PC2 modifier graph values are controlled by custom attributes assigned to the point helper in the scene.
Click the image below to view a small .mov of the pointCache2 progressive morpher in action.
NOTE there seems to be a bug in the PC2 where the frame of the last key of an animation may end up loading an incorrect target, or sometimes if the playback graph tangent is zero (when using slow-slow tangent types for example); the bug may cause the target to 'twitch' on that frame, as you modify the value and when rendered. Workaround is to add another key beyond the end of your animation range, or make sure the graph is not quite flat at that point.
With lots of PC2s in your scene it will obviously make more demands of your harddrive - calling the data each frame - but we have successfully used this technique for the hands of many characters in a scene at once with no problems calling the PC2 files off a file server.
An option is to add a morpher to your stack along with the PointCache2 modifiers, and wire the playback graph values to some empty slot values. It works fine, except if you do a two way wire do not pick the Morpher channel first, instead go from the PC2 to the Morpher channel, or simply use a one-way wire (there is a bug where the animation keys are not accessible).
FWIW another use of the PointCache2 is to 'capture' Compound Morpher animation - which also smoothly interpolates the motion of the vertices so is very useful for smooth morphing, liquids say - and allows you to play it back at any speed you want, getting away from the rather cumbersome TCB controls the compound morpher uses.