General Specialist

2008-10-08

Watch and Embed YouTube Clips in High Quality

The term "High Quality" has to be taken with a bucket of salt when we're talking about YouTube, but there's an easy way to at least lessen the compression artifacts, which is especially useful for full-screen viewing. Even a lot of clips that don't have the "Watch in High Quality" link on the page actually exists in a less compressed version.

If you are watching the clip at YouTube.com, just add &fmt=18 at the end of the URL. The easiest way to do this is the create a bookmark in your browser's toolbar. Just bookmark any site and then replace the URL of the bookmark's Location with this simple JavaScript: javascript:window.location+="&fmt=18";
Every time you're at YouTube you can just click the bookmark to see the clip with less compression (if it's available, otherwise the standard clip will play.)

See the difference for yourself:


If you embed videos, you can do the same thing and even embed a larger version, but you have to append &ap=%2526fmt%3D18 to both URL's in the code, plus change the sizes in both places to 480 by 360.





You can also watch YouTube videos with QuickTime embedded player if you'd like, and easily download the clips (if you have QuickTime Player Pro.)


- Jonas

Tip of the hat to My Digital Life and Tobias Lind.

Labels: , ,

2008-03-06

Locking After Effects' Layers So They Can't Be Moved

UPDATE:You can lock the position with a script put together by Jalea. If you want to lock more properties, Jeff Almasol (scripter extraordinaire) pointed out that Nab has a script that locks/unlocks all properties. Also, check out his plug-in experiments and scripting experiments. Truly amazing!

**********************************

When you lock a layer in After Effects, you don't just lock the position; you can't do anything with it at all. This is particularly frustrating when you have Adjustment layers, Solids and Mattes where you want to tweak effects but you definitely don't want the layer to be nudged (which is easily done just by selecting it.)

This is often a problem in complex compositions where you can spend hours figuring out what went wrong when you accidentally moved a layer. Users of node-based compositing program (i.e. almost all others, like Shake, Fusion, and Nuke) find this extra irritating since this never happens when you work with nodes.

Here's how to make sure your layers can't be moved:
  • Select the layer you want to save from accidental moves.

  • Hit P on your keyboard to reveal the Position property.


  • Hold down the Alt or Option key and click the stopwatch to create an expression on the Position property.


  • Look at the current position values for the layer, and enter the same values like this, depending on if it is a 2D or 3D layer:


  • Click outside the layer, or hit the Enter key on your numerical keypad.

If you animate masks and rotoscoping, this is almost a must-use tip, since AE is so sensitive to where you click on mask handles.

- Jonas

Labels: , ,

2008-01-10

Better Corner Pinning with Mocha

When you import tracking data from Mocha, you get the four corners applied to the Corner Pin effect. To get better edges, use the same data but apply it to the CC PowerPin effect instead, which has better edge anti-aliasing and also supports expanding the layer outside the actual tracking points.
Just line up the corners of the two effects on the first frame and copy the keyframes from the Corner Pin effect and paste it into a CC PowerPin effect, or link each point with an expression.

- Jonas

Tip by Danny Princz on AE-list

Labels: ,

2007-10-24

Opening After Effects Projects in an Earlier Version


So you want to open a project saved in After Effects CS3 in an earlier version like After Effects 7.0? Wish there was a way to avoid redoing your entire project just because a client hasn't upgraded yet? Wish that Adobe would let you do a Save to XML just like in Final Cut Pro?

Sorry about the rant, but currently your only hope of opening a project saved in a newer version of After Effects is a manual process that involves a lot of copying and pasting.
  1. Firstly, you'll need both versions installed on the same computer. This usually doesn't cause any problems, I always have at least 2-3 versions of After Effects installed at the same time.
  2. Next step is to manually recreate your project in the earlier version. This involves importing all the sources, creating all the comps and changing all the settings to match the original project. It's a pain, I know...
  3. Open the original project in the newer version and highlight the top layer in your composition and hit UU on the keyboard to reveal all properties that has have non-default values. Great shortcut, huh? Here's a bonus tip: just hitting U will show just the properties with keyframes!
  4. Select all keyframes on the layer by click-dragging the mouse over the names of the properties.
  5. Copy and paste into a text editor (not a word processor, instead use something like Notepad++ for Windows or Smultron for OS X) and changing the first line that says:
    Adobe After Effects 8.0 Keyframe Data
    ... into ...
    Adobe After Effects 7.0 Keyframe Data
    If you are converting the animation into even older versions of After Effects, you'll have to change the number to match the version you are using (only use the whole increments such as 6.0 even if you are using version 6.5.)
  6. Select all text in the text editor, copy and then paste onto the corresponding layer in the older version of After Effects.
Not exactly great, but just a tad bit better than redoing every keyframe. I haven't tested this on earlier versions than 6.5, but if you really need to down-convert to a five year old software, you're in trouble anyway... :)



- Jonas

Labels: ,

2007-09-25

How to Optimize Photoshop for Giant Images

The inside story on how to get maximum performance from Photoshop when working on very large files, courtesy of Scott Byer from the Photoshop team.

You'll want to look at the PDF in Adobe Acrobat, since OS X's Preview app won't render the text correctly. Conspiracy? :)

Another tip is to check out Russel Brown's scripts for Photoshop.

- Jonas

Labels: , ,

2007-07-10

Smooth FCP Playback of HDV and XDCAM Renders from AE

Apparently XDCAM and QuickTime HDV renders from After Effects will cause Final Cut Pro to choke and skip frames on playback.

The current workaround is to render to QuickTime's Animation codec and either let FCP render that clip in the timeline, or open the clip in QuickTime Player Pro and export it from there to an HDV file that you then import into FCP.

- Jonas

Photo by aburt

Labels: , ,

2007-06-21

How to Remove Speckles and Dust in Scanned Images using Photoshop

Here's a quick tip I discovered today while cleaning up a lot of scanned images. It's a 30 second video tutorial on how to find dirt, dust and scratches that's hard to find when you're trying to remove the background.

How to Remove Speckles and Dust in Scanned Images using Photoshop (opens in a new window)

- Jonas

Labels: , ,

2007-02-11

Video Codec Advice

I've been posting a lot at Adobe Forums: After Effects lately, after I unexpectedly was asked to become an Adobe Community Expert. I just thought I'd share a reply I just made to a question about how to avoid quality reduction while rendering and moving video between applications. Perhaps I'll make a small table listing the codec options and their advantages/disadvantages, if you post a couple of nice comments! :-)


Both AVIs and QuickTimes can be "uncompressed" but the file sizes are huge! In the case of AVIs, the only advantage is that "uncompressed" is the old AVI format that supports an alpha channel.

Better is to use lossless codecs such as QuickTime Animation: Best and QuickTime PNG: Best which have so called "RLE" compression just like ZIP files, which has no quality-loss whatsoever, but still manages to shrink the file sizes considerably. Both these codecs also support alpha channel, but only QT PNG supports 16-bit.

There are several third-party QuickTimes codecs such as the BlackMagic Design's codec that also have similiar options, but they need to be installed separately on every machine.

For really small but almost lossless renderings, I normally use QuickTime PhotoJPEG: Best which is a standard 8-bit QT codec that has been around for a long time. At 100% quality very few pixel values are changed at all, making it virtually lossless.

The other alternative is to render to file sequences such as TIFF, SGI or TGA. This has several advantages, but unfortunately file sizes is not one of them. However, they are great for multi-machine renderings and if you need to re-render parts of your video it's easy just to replace just those frames. Also, it's easier to split up large renderings across DVDs, CDs and portable disks since you don't have to split up a huge video file, you can just copy all the frames that fit on to every disk. Network transfer speeds are lower for file sequences because every file has more over-head and many network protocols start out by only sending small chunks and only increase the packet size if the initial transfer was OK. Remember that if you have sound, you'll need to render that separately to an audio file if you use file sequences.

One file sequence format to avoid (unfortunately) is PNG since it has cross-plattform and cross-application problems with gamma-shifting. The options in the PNG file format let applications enter gamma values into the file, which are only read by some other apps, resulting in shifts, so you should unfortunately avoid PNG sequences.
- Jonas

Labels: ,

2006-11-12

Avoiding the "After Effects error: could not create image buffer"

Here's a few tips on how to avoid the dreaded image buffer error. But first a little background on why it happens...

Unlike many other compositing and 3D programs, After Effects doesn't use a scanline renderer. Instead it renders each layer and then stacks it on top of the previously rendered layers. While this gives great performance for layers that can be cached and use several times without re-rendering, it can spell disaster when you are trying to work with bigger sources and output resolutions.

While you can use Shake to zoom in on a giant 30.000 by 30.000 pixel image on an old machine, doing the same thing in After Effects takes a bit of imagination, plus a knowledge of how to tweak AE's memory settings. Basically, it comes down to the memory being to fragmented for AE to be able to hold the entire frame/layer in one contiguous piece of RAM. Here's how you avoid that from happening:

1. Set Your Preferences Correctly
Start out by making sure you have set After Effects to use the optimal settings. These should always be your default values, and you should reset them according to these settings once you have gotten around the image buffer errors!
Maximum Memory Usage: 120%
Maximum RAM Cache Size: 60%
Enable Disk Cache: On
Maximum Disk Cache Size: At least 2 GB (I use 8-12 GB, typically)
Prevent DLL Address Space Fragmentation: On

The Maximum Memory Usage tells AE how much of the total amount of installed RAM it can use as a maximum. Why 120% Maximum Memory Usage you might ask, why not 100% or even a sensible 95%? Well, since running slow sure beats running out of memory, that's why! If you set it over 100%, AE will use the harddisk as virtual memory (slow but sometimes necessary.)

The Maximum RAM Cache Size is the amount of RAM (set in "Maximum Memory Usage") that After Effects uses to load sources, render effects and composites into, plus to store already rendered frames in. The setting of 60% is a moderate one that over time has proven to work optimally for most projects. Lowering this value will slow down your rendering and previewing speed, but it is sometimes necessary in order to render large layers/comps.

The Disk Cache is where AE can off-load already rendered images/frames/layers/comps onto your harddrive instead of throwing them away when you are running short on RAM. Note that AE will only use the Disk Cache if it is faster to read a frame from the Disk Cache than it is to re-render it.
If possible, put the Disk Cache on a fast harddrive, preferably not the same as your operating system or your source material (the above screen shot was taken on my laptop, where you seldom have the luxury of three drives.)

If you're on Windows, make sure you check Prevent DLL Address Space Fragmentation, as AE will then try to keep more of the memory in larger chunks. It should be left on, unless it is causing an extremely rare crash (the reason it is not enabled by default.)

Make sure you turn off multi-processing in After Effects CS3 (and Nucleo / Nucleo Pro if you have that plugin.)

As a final step, avoid OpenGL previews, instead use Adaptive Resolution.

OK, with these settings, try to see if you can preview/render the problematic comp. If not, continue with the next step...


2. Lower the Number of Undos
Every operation that AE has to be able to Undo takes up valuable memory space. Try to Purge Undos from the Edit menu. If that doesn't help, go into the Preferences and lower the number of Undos to just a few, or even just one step. (Remember to set it back to somewhere between 20 and 32 when you've gotten the renders done.)

Still having trouble? Then let's try the next remedy...


3. Lower the Image Cache: Maximum RAM Cache Size
Even though the Image Cache will speed up renders (by avoiding having to re-render stuff) it leaves less memory to be used for other things, which can lead to the fragmentation of the memory.
Here's how Michael Natkin of the Adobe After Effects team explains it:
"Yep, it is counterintuitive, isn't it! Here's the reason. Just like a
hard drive, your address space can get fragmented. So if you have the cache percentage set high, AE will try to use a lot of RAM and though you may have enough left for the next image buffer, it may be so fragmented that there is no place to put it. So by lowering the cache percentage, you reduce the fragmentation and paradoxically are able to fit that frame.
Lower the Image Cache bit by bit, until the error goes away. If you have it as low as it will go (10%,) there's only one option left...


4. Chop Up Your Sources
Split the source image up into several layers (somewhere around 2.048 by 2.048 pixels each) in Photoshop, then import the PSD file as Composition Cropped Layers. Press your Caps Lock key on the keyboard (to prevent AE from trying to render a preview) and then change the preview mode to Wireframe. Open up the composition, select all layers and change their mode to Alpha Add. Finally copy all layers and paste them into a comp with the size of your final output.


It has worked for me with 16-bit images over 24.000 by 24.000 pixels.

- Jonas

Labels: , ,

2006-10-30

Greenscreen and Bluescreen Checklist

Shooting for greenscreen or bluescreen? Here's a list of hard-earned experiences from the shoots where I've been vfx supervisor. I don't claim to be a chroma expert, so please post a comment if you have more tips to add to the list!

UPDATE: I've added some info on depth-of-field and motion blur as point number 2.

1. Keep it Blurry in Camera
Turn off all in-camera sharpening! This might make your director of photography (DOP) nervous and it will certainly make it harder for her/him to focus. On Sony cameras, there's usually two settings that need to be turned off: Detail and Skin Detail.

By default, all cameras apply a sharpening filter as a post-process before each frame is committed to tape/disk/memory card. While this makes the image look better, it is makes it so much more difficult to get a good and clean edge between your foreground and your chroma screen. Digital sharpening works by finding adjacent pixels of different lightness values and then increasing the difference, in effect crating a border with much higher contrast. Notice also how the in-camera sharpening brings out noise and imperfections in the chroma screen.

So shoot without sharpening and add it in post instead!



2. Keep it Sharp on Stage
While you don't want the camera to add artificial sharpening, you still want to keep everything in the foreground as sharp and correctly focused as you can. If the chroma screen is blurred in the background will only help to make it more evenly lit and textured, but you want to avoid having to key out blurred foreground, trying to separate it from the chroma.

If the blur comes from a too slow shutter speed or by too narrow depth-of-field, you'll have to tweak the keyer and possible sacrifice other parts just to manage the fuzzy edges. A blurred edge between foreground and background means that you will have to compromise between the edge and despilling settings, and quite possibly have to keyframe these settings to compensate for different levels of blur on different parts of the clip.

Instead, add motion blur in post by using optical flow technologies such as ReelSmart Motion Blur and add depth-of-field by layering chroma clips and post-blurring them.



3. Resolution and Framing
You want to shoot with as high resolution as you can afford, to make sure you keep your options open when you get to postproduction. Even if your finishing in SD, try to capture in HD or even 16 mm or 35 mm film. The more detail you can capture, the cleaner key you'll be able to pull. You can always scale down, but you can't get back image data that you haven't captured...

Keep a constant lookout for how the DOP frames the action. Since you'll be working with the shots in post, you can disregard the safe areas that are normally cut off by monitors and TV sets - that's 10% more image data to use!

I've found that I often have to keep pushing for tighter framing of each and every shot. To make sure that you and the DOP sees the entire image, set the camera viewfinder and the preview monitors so they are underscanned.

Even if you're shooting for a 16:9 production, you'll most likely want the set the camera for 4:3 aspect ratio, unless your shooting something that will fill the entire frame horizontally. Otherwise you'll be sacrificing horizontal resolution, making for rougher key edges.

Another way to squeeze the maximum amount of resolution from your cameras is to tilt them 90 degrees for shots of standing people.



Here's an example of three Sony Digibeta cameras with two of them tilted 90 degrees to capture standing people at maximum resolution.




4. Blue or Green?
What you are trying to achieve is to provide your keyer with a color channel that is as distinct as possible. Since human skin tones and lips tend to be red, that leaves blue and green. So which one to choose? That depends on a couple of things...

Green chroma screens have become more and more popular in recent years, largely because green provides a brighter color channel that tends to have less noise than the blue channel. The relative brightness of green makes it a bad choice for shooting blonde hair though, which is a lot easier to key against blue backgrounds.

The bluescreen has some distinct advantages. When you can't avoid a lot of spill (for example when you have to put the foreground very close to the chroma material) you can take advantage of the fact that we tend to find blue casts less disturbing than people walking around looking sea-sick with green faces. Also, when shooting for something that will be composited on to outdoor backgrounds and water, a slight blueish cast won't be a problem.

So if you are shooting a blonde with jeans, you'll have to settle for a compromise!



5. Don't Depend on the Crews' Imagination
Good storyboards that can be shown to the entire crew, both before the shoot (so that they can bring the correct gear) and during the shoot. Depending on the complexity of the shot you might need animatics, but at least bring sketches or printouts.

Talk to the crew so that they understand how stuff will be used in
post. For example, I have had instances where cameramen have cut off
talents' feet even though I've tried to explain that we needed the
whole body.



6. Don't Depend on the Talent's Imagination
If talents are supposed to look at things that will be added in post, make sure they have something (that can be keyed out later) to look at and interact with during the shoot.




7. Get Good Clothes
Make sure you avoid greens, browns and khaki for greenscreen shoots and jeans and other blue clothes for bluescreens. This cannot be allowed to be something you decide on location, it must be planned beforehand.



8. Get Good Props
Make sure you can dull-down shiny stuff so that they don't reflect the chroma color.

The choice of a shiny metal briefcase in the example above is a particularly bad one, considering it had to be rotoscoped in all the shots. The ear-ring was taken care of with an Inside Mask in Keylight.



9. Match the Lighting As If Your Sleep Depends On It
There's no substitute for good lighting and gaffers that can match foreground and background. You can fix almost anything in post-production, be relighting is among the hardest and least successful things you want to spend your nights with. There's nothing that screams fake as much as wrong lighting!



10. Preview Directly On Set
You can't underestimate the value of being able to compare a roughly keyed-out foreground against the background that it will be composited against. Not only is the immediate feedback important for the talent, it is also invaluable when it comes to matching the lighting and perspectives.

If you can't use a real-time keyer with a feed from the camera, like in the image above, at least bring a laptop and a digital still camera and do a quick key until the lighting matches perfectly.



11. Go Easy on the Tracking Markers
If you use tracking markers, make sure you have sufficient number in each shot, without having too many that you will have to paint-out in post. Try using markers with almost the same color as the screen, for example by using chroma tape, so that you can remove them by a second keying-pass.

The extensive number of markers in the example above comes from the fact that they were to be used for a tight head-shot during a 30 minute interview where the subject didn't want anyone except the interviewer and the DOP present. Therefore we had to make sure we had at least some markers visible at all times.



12. Avoid Unnecessary Spill
Keep the foreground as far away from the chroma screens as possible, since you'll have less spill to deal with. Make sure that all parts of the floor that might reflect chroma color onto the foreground are covered by non-reflective material such as black cloth.

It's up to you to keep each setup as far away from the chroma screen as possible, as people seem to be attracted to the big wall of color. It is your job to check that the entire foreground has chroma behind it during the entire take, which is why rehearsal is so important since it gives you the chance to spot potential problems which will force a setup adjustment.



13. Keep It Clean
Strive to keep the chromascreen as spotless as possible, and stop people from walking on it unnecessarily.



14. Get to Know Chroma Sampling and Codecs
Since chroma keying works on the principle of isolating one color, you would think that it was extremely important to get as much color data from the camera as possible. This is unfortunately not the case in many circumstances, especially when it comes to video. I won't get to geeky here, but you need to understand how digital video is stored.

The human eye is much more sensitive to the luminance/lightness of what we see, than to the color of the world around us. That's why all (but a few super-high-end cameras and formats) immediately throw away at least half of the color information that is captured. This is bad news for keying, since the less color information you have, the harder it is to accurately isolate a color.







If at all possible, you want to capture a 4:4:4 image without any color compression, and then keep that color resolution intact by using an appropriate codec at least until you have passed the keying stage. You should also strive to retain the more than 8 bits per channel of data that many systems capture, such as the 10-bit color depth of DigiBeta.

Trying to key of DV footage is even harder, since the DV codec only stores a quarter of the color data, using a 4:1:1 compression. If you have no choice but to key from DV footage, try to blur the U and V channels before pulling a key, or use a keyer that does this automatically, such as dvMatte from dvGarage.

Here's an example of the low horizontal color resolution of DV footage:




15. Frames Rather than Fields
Try to shoot progressive rather than interlaced, to avoid having to de-interlace the footage. If possible; shoot double the frame rate with progressive if you need to go to interlaced later. Avoiding interlacing not only gives you a cleaner edge and saves time on de-interlacing, but it also provides you twice the spatial resolution which might come in handy if you have to up-res in post.

Interlacing is an evil compression technique that severly limits your options, and you should always try to avoid it, instead adding it at final output.



16. BYOC: Bring Your Own Camera
Take lots of reference shots of locations, the lighting setup and other stuff that will help when you crawl back into your dark post-dungeon. You can never have too many reference shots!



Final Words
Avoid the temptation to think that problems on set can be "fixed in post." Everything that can be done in front of the camera should be done on set. Make sure the time allocated for postproduction is used to enhance the final outcome instead of fixing mistakes done when shooting.

Also, be prepared to pull several keys and to use garbage mattes and core mattes. Remember; you are trying to extract the edges, everything else can be mattes/roto'ed!

- Jonas

Labels: , , , ,