ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

median (on alpha) works extremely slow in 16-bit render mode

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joris Bergmansmedian (on alpha) works extremely slow in 16-bit render mode
by on Nov 21, 2012 at 11:29:45 am

Hey there!
I'm working on a project where we generate a shadow out of an existing SWF layer by using the median filter.

This filter appears to make rendering in 16 bit extremely slow, to a point where we would need more than a day to render a small shot, whereas it would take less than 20 minutes if we were rendering on 8 bit..
this problem is solved when we switch the median effect off.

here's the workflow:

I duplicate the original SWF and apply a a generate>>fill effect to make it fully black.
Then I add a noise>>median with "operate on alpha channel" switched on, to smooth the silhouet of this now black layer. The median value is set to 80.

I was wondering if there's a way to set median to just calculate in 8 bit without doing pre-renders, or is there an other way to smooth the alpha channel...

Any help or suggestions are welcome!

Return to posts index

Tudor "Ted" JelescuRe: median (on alpha) works extremely slow in 16-bit render mode
by on Nov 21, 2012 at 12:28:07 pm

I may be off here, but you could just use Levels to crush the duplicated layer values to Black and then apply a Fast Blur...

Tudor "Ted" Jelescu
Senior VFX Artist

Return to posts index

Vishesh AroraRe: median (on alpha) works extremely slow in 16-bit render mode
by on Nov 21, 2012 at 1:38:00 pm


I totally agree with Ted on this point of using Fast Blur.

To create shadows, Apply fill effect and then Check which blur effects suits for you to soften the shadows. Also play with Opacity of shadow layer.

Vishesh Arora
3D and Motion Graphics Artist
Films Rajendra


Demo Reel(3D):

Return to posts index

Darby EdelenRe: median (on alpha) works extremely slow in 16-bit render mode
by on Nov 21, 2012 at 4:19:55 pm

It won't work quite the same as median (which has always been slow, unfortunately) but you can apply a Fast Blur and then Levels. Increase the Blur radius a little beyond what you think you need and go to the 'Alpha' section for the Levels. You can use the gamma and white/black inputs to change the density and falloff of the blur.

Darby Edelen

Return to posts index

Joris BergmansRe: median (on alpha) works extremely slow in 16-bit render mode
by on Nov 22, 2012 at 1:23:18 pm

Perfect, works like a charm!

Thanks! :)

Return to posts index

Chris HagerthyRe: median (on alpha) works extremely slow in 16-bit render mode
by on Sep 22, 2014 at 5:52:18 pm

Old post, I know, but I found a workaround for this a few months back when I was under a time crunch. I did this on a 2010 MacPro with dual 2.4 GHz quad-core Intel Xeon processors, but I see no reason it couldn't work with any multi cored machine.

Median is not a multithreaded filter, for whatever reason, AE will only use 100% of one of your threads to calculate it. You need to do a multi-machine render on your single machine to use all of your available cores/threads and speed up you render by a huge factor.

First you need to have BG renderer installed, it's available from aescprits, it's pretty much a crime that it's not included with AE, it's $35 bucks for the pro version, but it's WELL worth it.

If you're familiar with BG Renderer Pro and multi-machine rendering, I'll cut to the chase: Render an image sequence, make sure you are set to "skip existing frames" in your render settings, and launch as many BG render instances as your computer can handle. (1-2 for each core).

If you're not familiar with BG Renderer, buy it, download it, install it, then follow these steps:

1. Restart AE, launch BG renderer, and dock it in a window.

2. Set up your render, it will have to be an image sequence, you can't do this with a single file output. If you need to finish in ProRes or something, you will have to compile the frame sequence into a single file afterwards, but re-rendering a pre-rendered image sequence into a single .avi or quicktime file will be a lot faster than waiting for median to do its thing.

3. Under Render Settings, make sure to check "skip existing frames" (or use the multi-machine Settings preset). Make sure you're in 16-bit mode (i'm assuming here that you want to render in 16-bit or 32 or you wouldn't be having the issue). You won't get the usual pop-up warning from AE if you are still in 8-bit mode from BG Renderer. It will make a note in the terminal window, but it flies right past and you won't notice it until your render is done.

4. Once you're set to skip the existing frames, you can click the BG Render button, it will ask you to save the project, and then it will launch a terminal window and begin to render in the background. Wait until it's started rendering frame 1 before you launch another. It will uncheck the item from your render queue automatically once it has launched the BG process. This is actually quite convenient as it allows you to simply recheck the box and hit the BG render button again. Wait until it launches and has begun to render the first unrendered frame. You'll see your renders skipping the completed frames within the terminal. Repeat this until you have as many instances as your system can handle.

BG Renderer does not have a limit (that I have reached) for the number of renders you can have running at once. Of course if you have 2 cores, you may only want to launch 2-4. I have 8 cores and was able to launch 9 renders without grinding everything to a halt. RAM is also a factor here, the more you have, the better your machine can juggle these multiple renders. An intel hyper-threaded processor has two threads per core, but i wouldn't recommend maxing your processor out completely unless you have a lot of RAM, I would guess you hit a point of diminishing returns at some point based on cores vs GB of RAM.

5. Wait until all of your BG renders say that they are finished, and your render is complete. You can do multiple shots at once this way as well, just set them all up at once, and after you hit the BG Render button, you'll have to recheck all of the boxes.

Hope this helps, sorry it was a bit long winded, it's a pretty simple process really.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved