PDA

View Full Version : Smoothing motion path of imported image sequence


roel018
01-16-2009, 01:36 PM
Hi folks!

I'm having this problem with an imported 3ds Max sequence (targa). When placed in the timeline, it jitters on various frames.. It is quite a long sequence so manual keyframe-positioning isn't really an option. The object in the footage moves around in motion, a motion which has a very smooth motion path.. However, occasionally the layer (no not the layer, the object in the layer) jumps around a couple of pixels for a couple of frames and then returns to its correcte path.. I don't want that, I want the imported motion sequence to move smoothly... I have to get rid of the jittering...!

How can I fix this?? Should I apply a Smooth Expression? Of should a stabilize the footage with the motion tracker?? Will this work? Or do I loose the overal object's movement in the sequence in that case??

So, I have a Background layer (A).. A Castle (B) (on a different layer, is transparent image), and A and B have to be synchron with each other.. Is has to be perfect, now it's only near perfect because of every 10th - 20th frame jittering around..

Hope some1 can advise me on this!



More information / details about question and project:

Well, you see, the thing is, I'm working on this complicated motion tracking and 3d model implementation project whereby I position a castle on top of a mountain. The camera flies over the mountain top but starts from a very low point (below the top actually) so it's an extremely difficult to track shot. Anyways, the tracking worked out perfectly (without jittering) and I rendered the 3d object from the calculated angle / position etc. Next, I implemented the rendering into the scene (in AE).. But here's where all kinds of effects are applied and within a 1000 frame range the object hobbles about 1 pixel every random 10-20 pixels.. The rest of the motion is smooth.. All I want is to get rid of this hobbling. I tried to make it happen by manually keyframing the faulty frames into the right position but it doesn't look natural because of the slight hobbling.. Now, this is not the kind of hobbling you get when you create a camera from a bad track. I double checked the tracked points in my tracking software but they seem to be just fine..

Sacmanis
01-16-2009, 11:41 PM
It sounds like a problem with your original render.

Is there any way you can remove those problem frames without affecting the action?

Can you go back to max and render only those frames and see if it cleans it up?

You can also try appluing motion blur but I am afraid you will still see the jump.

Wade

mackdadd
01-19-2009, 09:26 PM
there is a complicated solution, but it might involve some careful hand tweaking. Track a particular spot on the element that hobbles a bit. Apply that data to the anchor point of the layer that hobbles, and also to the position of a null layer. That will stabilize the footage, and give you a null that has the position data with the hobble in it. Now parent the layer that has the anchor point data to the null. This will basically reintroduce the exact same motion. Then go throgh the footage, and wherever it hobbles for a couple frames, delete the positional keyframes on the null. If it was a smooth curve, you may have to tweak it a bit where you delrte keyframes, but that shouldn't be too hard.

roel018
01-20-2009, 06:29 AM
there is a complicated solution, but it might involve some careful hand tweaking. Track a particular spot on the element that hobbles a bit. Apply that data to the anchor point of the layer that hobbles, and also to the position of a null layer. That will stabilize the footage, and give you a null that has the position data with the hobble in it. Now parent the layer that has the anchor point data to the null. This will basically reintroduce the exact same motion. Then go throgh the footage, and wherever it hobbles for a couple frames, delete the positional keyframes on the null. If it was a smooth curve, you may have to tweak it a bit where you delrte keyframes, but that shouldn't be too hard.

Ok this sounds like it might work!!.. I'll try it out this evening!
I'll post any results on this page (sooner or later!).

THNX!!

roel018
01-20-2009, 08:07 PM
there is a complicated solution, but it might involve some careful hand tweaking. Track a particular spot on the element that hobbles a bit. Apply that data to the anchor point of the layer that hobbles, and also to the position of a null layer. That will stabilize the footage, and give you a null that has the position data with the hobble in it. Now parent the layer that has the anchor point data to the null. This will basically reintroduce the exact same motion. Then go throgh the footage, and wherever it hobbles for a couple frames, delete the positional keyframes on the null. If it was a smooth curve, you may have to tweak it a bit where you delrte keyframes, but that shouldn't be too hard.

Hi MacDaddy!

Thnx for your reply!.. I'm not sure the procedure you described is completely right though since I went through it step by step but some parts don't seem to work. It's very promissing though and I think I can get this to work with your help.

I tracked the troublesome layer (a transparant PNG sequence with a hobbling object in it - obviously the not-transparent part), but I cannot apply the tracked data to the tracked layer itself.. I can only apply it to any other layer.. So what I can do is apply the tracked data to a Null Layer and parent the troublesome (tracked) layer to it. But that alone doesn't do the trick.. So what do you think my next step should be? Or am I missing an important step from your solution?

Hoping you can point me into the right direction once more,
Sincerely,
Roel

mackdadd
01-20-2009, 09:25 PM
but I cannot apply the tracked data to the tracked layer itself.. I can only apply it to any other layer..

You can if you pick "stabilize" in the tracker options, but don't do that yet. We'll do it manually in the next step.

So what I can do is apply the tracked data to a Null Layer and parent the troublesome (tracked) layer to it.

1) Yes, apply it to a null layer. Now the layer you tracked should have no keyframes, and the null should be tracked to match it's movement.

2) Copy the position keyframes from the null, and paste them on the "Anchor Point" of the Castle layer, the layer you tracked.

3) Now the Castle layer should be stabilized around the point you tracked. Maybe parts are going offscreen or something, that's fine.

4) NOW parent the Castle layer to the null. This will put the motion back onto the layer, cancelling out the keyframes you pasted into the anchor point. So, at this point, your castle layer will appear unchanged. It should still have the hobble in it. But the difference is that now it's position is based on the keyframes on the null, not on the camera move baked into the render.

5) So if you select the null now, you should see the motion path in the viewer. Or you can look at the curve editor. Basically now just scrub along in the timeline, and when you get to frames that hobble, delete those keyframes from the position of the null. Just the bad keyframes, no others!

The only real issue with this is that AE will then automatically interpret the position in the keyframe gaps you've created by deleting keyframes. If the movement is smooth and consistent, then this shouldn't be a problem. If the movement is more organic and handheld-ish, then you may have to reposition it a little bit by hand, creating new keyframes in place of the old ones you deleted. But that should be relatively easy.

Hope that makes it a bit more clear. :)

roel018
01-21-2009, 06:31 AM
Hope that makes it a bit more clear. :)

It definitely does!! Thanks a lot man! I'll give it a shot this evening when I get home :)
Thnx! I'll let you know if it worked!

CGTalk Moderation
01-21-2009, 06:31 AM
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.