Video Fields


A review of the mechanics of video frames and fields is in order, so listen up. The resolution of video images is 525 lines for NTSC and 625 lines for PAL. NTSC video runs at 30 frames per second, and PAL at 25 fps. Each video frame is made of two separate subframes called fields. Each of these fields is an individual snapshot in time. By using fields, the viewer sees twice as many frames and perceives smoother motion. Even though the fields represent different points in time, they occupy the same video frame. This is achieved through a process called interlacinga thorn in the side of graphic artists and compositors everywhere.

The following pictures show two consecutive video frames with interlaced fields of a skier flying through the air. The more motion an image has, the more interlacing you will see.

Here are the same two images split into four fields:

Here comes the fun part. Interlacing weaves together the two fields by starting at the top of the image and using one line from field 1 (the odd-numbered field) and another line from field 2 (the even field) until all 525 or 625 lines are interlaced together. Temporally, the fields always occur in the order of field 1 and then field 2. Spatially, the ordering is different for NTSC and PAL. For NTSC, the spatial field order starts with field 2, or the even field. For PAL, it is the oppositefield 1, the odd field, is the first spatial field.

Therefore, the interlace process produces two fields of half-height for every broadcast frame. When a television displays these images, it quickly shows the first field only, and then the second field only, and then it proceeds to the next frame. This solution is interesting because each field sacrifices vertical resolution for the benefit of temporal quality.

Importing Interlaced Images

When importing interlaced images, you need to be aware of the FileIn node's deInterlacing parameter. When enabled, it separates the two fields from each other, placing field 1 at frame 1, and field 2 at frame 1.5. Each field is then copied and moved into the empty spatial place of the removed field. This ensures that all spatial effects are handled properly when fields are rendered. This strategy is clever because it doubles the number of frames you have but keeps the frames within the same duration. Go figure.

1.

Open Shake.

2.

FileIn the ski1.1-15.iff sequence from the Lesson09 folder.

3.

Set the Globals timeRange to 1-15.

4.

While you're at it, click the Home icon at the bottom right of the screen to make the Time Bar's low and high values match the Globals timeRange.

5.

Step through the clip with the left and right arrow keys.

Notice how the skier is interlaced as he flies.

6.

In the FileIn parameter controls, click the deInterlacing parameter until it says Even.

Even is for NTSC, and Odd is for PAL.

7.

In the Time Bar, change the Inc (increment) parameter from 1 to 0.5.

8.

Step through the clip again with the left and right arrow keys.

The skier now moves on each field in half-frame increments.

Note

If you step through the clip and the image seems to stutter every other field, switch your deInterlacing to Odd if you are on Even and to Even if you are on Odd. The motion should then be continuous. Field order varies depending on the television standard.

It isn't always necessary to deinterlace video. However, it is helpful to deinterlace when you need to paint on individual fields, animate parameters, transform images, track motion, and create traveling mattes with the RotoShape node.

Common Problems with Interlaced Images

Interlacing creates two particular types of problems for digital image manipulation.

The first problem occurs when you have any animated parameter. The animation must be understood and applied at half-frame intervals. If you read in an interlaced clip and apply a static color correction, no problems occur because both fields receive the same correction. If, however, you animate the color correction, you must turn on the Globals parameter fieldRendering in order to evaluate the correct set of lines at the appropriate interpolated value.

The second and trickier problem happens with any node that has spatial effects, like a Blur or a Move2D. If you pan an image up by one pixel in Y, you have effectively reversed time, because the even lines are moved to the odd field, and the odd lines are moved to the even field. The clip will have extremely jerky movement, since every two fields are reversed.

Field Rendering

To correct the problems I've described, you can use fieldRendering in the renderControls of the Globals tab. With fieldRendering turned on, Shake separates the rendering into two separate fields. All animation and spatial effects are allocated to the proper fields. Why don't you give it a try?

1.

Attach a Move2D node from the Transform tab to the ski1 clip.

2.

Go to frame 1 of the clip.

3.

Open the Scale subtree and turn on the Keyframe toggle for the xScale parameter.

The yScale parameter is automatically linked to the xScale parameter because of Shake's default parameter linking. Therefore, it doesn't need to be animated.

4.

Set the xScale parameter to a value of 0.

5.

Go to frame 8 and set the xScale parameter to a value of 1.

6.

Step through frames 8 to 1.

As you step through the frames, the Move2D animation that you created animates in half-frame increments. This is good.

7.

Click the Flipbook icon and view your animation.

The flipbook shows something quite different. There is motion only on the individual frames. This is bad. If you want to render on individual fields, you must turn on fieldRendering.

8.

Go to the Globals tab and scroll down to the renderControls. Expand them by clicking the +.

There are three fieldRendering settings:

  • 0Off.

  • 1Field rendering with the odd field first. This is generally the setting for PAL images.

  • 2Field rendering with the even field first. This is generally the setting for NTSC images.

9.

Toggle fieldRendering until it says Even.

10.

Step through frames 1 to 8 again.

The Move2D animation is now field-interlaced, and it will result in a nice, smooth animation when it is placed back onto videotape.

You don't have to use field rendering when you import interlaced images and apply static color corrections. For all other functions, or if you animate any value, you should turn on fieldRendering. The fieldRendering handles all transformations, filters, and warps by internally removing the intermediate black lines from each field, and then resizing the Y resolution back up to full frame. Shake does this for each field and then interlaces them back together again.

3:2 Pull-Down

The other type of video interlacing issue that you will need to contend with is 3:2 pull-down. What exactly does pull-down mean? It is a technique to temporally convert film footage to video footage and back again. This pull-down is introduced during the film-to-video transfer process. Given that film uses solid frames and video uses interlaced fields, and that film runs at 24 fps and NTSC runs at 30 fps, you split the film footage into fields and double up two out of five frames to increase your frames to fill the 30 fps.

The Pulldown parameters in the Timing section of the FileIn node allow you to manage the pull-down of a sequence.

The phrase 30 to 24 means that you have received a film sequence that has been transferred at 30 fps. You now want to return it to 24 fps. 24 to 30 means that you want to convert 24 fps film footage to 30 fps. Both allow you to select which field will dominate. Typically, PAL is odd and NTSC is even.

Here's the classic diagram illustrating this phenomenon:

Convert to:

The third and fourth video frames have blended fields to stretch out time. It's called 3:2 because you have three solid frames and two mixed frames.

You can fully reconstruct your original four film frames by extracting the field data from the five video frames. Therein lies the rub. When you receive your footage, it has probably been edited and all of the clips have been shifted around, so frames 3 and 4 aren't necessarily the mixed frames. You therefore need to figure out which is the first frame before you attempt to remove the extra fields.

To do this, go to the first five frames in your sequence. If the first frame with field blending in it is frame 3, you know your firstFrame should be set to AA in the Timing section of your FileIn node. If the first frame with field blending is frame 2, you know your first frame is BB and can set your firstFrame parameter accordingly. If your first frames have no motion or are a solid color and you just can't figure it out, you have to jump to a time range of frames that display the blending and start guessing at firstFrame until the fields go away. Very scientific, isn't it?

Note

Removing 3:2 pull-down from clips transferred from film to video is not a requirement. However, it is very helpful to remove pull-down when tracking, integrating multiple clips, or creating traveling mattes with the RotoShape node. The preferred workflow is to remove 3:2 pull-down from all of your source material, composite the effect, and then add 3:2 pull-down to the final shot when done.


1.

Go to frame 1 and set the Time Bar back to incrementing by 1 frame.

2.

Set the fieldRendering toggle of the Globals tab's renderControls parameter to the Off position.

3.

FileIn the ski2.1-37.iff clip from the Lesson09 folder.

4.

Set the Globals timeRange to 1-37.

5.

Step through the first five frames of the sequence.

The first frame is interlaced, but three solid frames follow before the next interlaced frame.

6.

Look at the diagram of the five video frames earlier in this section, and you'll see that the first frame of this sequence would be considered a CD frame.

Note

If a clip doesn't contain motion, you won't see any interlacing.

7.

Click the Timing tab in the Parameters workspace and scroll down.

8.

In the Pulldown parameter, click the 30 to 24 button.

This will convert your 30 fps clip into a 24 fps clip using the AA frame as the first frame in the sequence.

9.

Change the firstFrame parameter to CD to match the pull-down cadence of the ski2 clip.

10.

Click Auto in the Globals tab to reset the timeRange to reflect the new timing of the compressed ski2 clip.

11.

Create a flipbook and click Play.

Pull-down frames are removed, changing the original 37-frame clip to 29 frames.

12.

Close the flipbook.




Apple Pro Training Series. Shake 4. Professional Compositing and Visual Effects
Apple Pro Training Series. Shake 4. Professional Compositing and Visual Effects
ISBN: 321256093
EAN: N/A
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net