View Full Version : I'm confused about reconstruction filters: need help.

04-29-2008, 11:59 AM
I can't seem to get renders with reconstruction filters to composite right in AfterEffects. See linked image (~1mb) EXAMPLE (http://4dartist.com/cgtalk/AAissue.psd)

It's almost like the alpha channel doesn't render using the same math as the color channels do. So the alpha renders as a normal edge and the color gets the soft edge with 'gaussian (soft)'

What I don't want to do is have to mess with the edge in comp to try to get rid of the black boarders, like, alpha levels or crush or whatever those edge helpers are, ideally I want to render, import into aftereffects, set it to pre-multiply on or off and it's done.


The premultipy on or off in the .psd explain what LW setting I used in the render globals. In Aftereffects I used the same respective setting (although I've tried toggling it one way or the other).

04-29-2008, 12:38 PM
I forgot to mention specs:
LW 32bit UB 9.3.1
8core intel-mac 3.0Ghz

04-29-2008, 01:25 PM
Does it look better with another reconstruction filter?
If so, perhaps it's a bug... if you make a nice case with content and all and send it to [email protected] i'm sure someone will look at it and comment on it.

04-29-2008, 01:32 PM
Ya, when I get a little time, i'll make a nice chart and bug report. I think the other filters have the same issue, the only reason I used Gaussian is because it's more obvious with softer filters.

This was a problem way back when the filters first came out, when I worked for Dan Maas he was telling me not to use them because he thought the same thing, and I just never used them after that, but lately we wanted these thin cables to have softer AA because of stepping and I did some large renders with the gaussian. But they edges looked so horrible after the comp, I did some tests and basically boiled it down to the exact same problem he was talking about. (alpha's not getting the filter applied)

04-29-2008, 03:08 PM
What Lw version are you using?

04-29-2008, 03:36 PM
9.3.1 UB on a 8core intel-mac leopard

Captain Obvious
04-29-2008, 04:27 PM
Without access to your original PSD, I'd guess that the problem isn't Lightwave, but Photoshop/After Effects. You rendered this in two parts, correct? One background gradient and one with objects against a black background. Adobe haven't really gotten on the premultiplication bandwagon, unfortunately. There's no proper "composite over" function in either AE or Photoshop, so here's what you can do instead:

Create a black solid on top of your background layer. Use the alpha as a mask/trackmatte for this solid.

Stick the rendered stuff on top, without any sort of mask/trackmatte, complete with the black background. Set the blend mode to Linear Dodge.

Ta-da! A composite over function in Photoshop and AE. This method works perfectly, even with depth-of-field blurs and whatnot. It even retains the highlights properly in out-of-focus areas.

Captain Obvious
04-29-2008, 04:47 PM

04-29-2008, 07:55 PM
The files are 32bit .png files. The alpha one of the channels built into the image. And I didn't use any photoshop, just aftereffects.

Thanks for the input, i'll have to try what you suggested tomorrow when I'm at my files. Rendering to separate alphas would be a pain though. Just one more set of files to manage for all the elements, and I easily hit 10 elements a shot.

Captain Obvious
04-30-2008, 01:55 AM
Don't use 32-bit PNGs! Save as something where you can actually extract the alpha channel instead, like TGA.

05-05-2008, 11:23 AM
Just importing frames as 32png works perfect when AE and LW are set to premultiply-black. (expect when a filter is used like gaussian)

I'm surprised this isn't a bigger issue. Seems like people would want to use those filters, but would run into problems if you comp the renders. As far as I can see they are un-usable unless you render everything together. Or possible render on the background but as a matte/alpha object, that way the border pixels are the same color as background, instead of black.


05-05-2008, 12:58 PM
Still, make a nice case and send it in. I've seen more comments on this kind of stuff.

05-05-2008, 01:03 PM
Ok, will do. Thanks for the help and tips guys. It's helpful to make sure that I'm not missing something obvious and that indeed it may be a bug worth reporting on.

05-05-2008, 05:15 PM
I think you are right, 4dartist. The edges on the alpha look much harder than on the color channel when softer reconstruction filters are used. Worse of all is that I noticed this before, but I didn't pay much attention to it, applied a tiny blur to the alpha and played with the levels until it looked fine. It's good that you brought it up, thank you.

CC Rider
05-07-2008, 10:48 AM
Very simple 1 step process to remove those black borders in AE...
Apply the filter called "Remove Color Matting" and you're done,
no muss no fuss!

Captain Obvious
05-07-2008, 10:57 AM
Ahh, how interesting. The problem is that Lightwave doesn't apply the pixel filter to the alpha, only the RGB channels! That's a pretty bad bug right there.

CC Rider
05-07-2008, 11:22 AM
Hmmm. I usually skip exporting the alpha channel seperately and just export a .png32 premultiplied. After importing to AE, drop in the filter and I'm done.
Even the most intense motion blur has never given me a problem with this method. But I see what you're saying...if you don't have the handy dandy filter and have to use the alpha from LW, and the RGB is premultipied and the alpha isn't...you are going to have a bad day.

A bug for sure.

05-07-2008, 12:25 PM
CC rider: To clarify, are you talking about renders with the reconstruction filters set to guassian/lanczos/mitchell? When Reconstruction Filter is set to classic AE imports just fine by setting AE to see the frames as premultiply-black.

My issues lay with using the newer reconstruction filters and compositing the resulting frames. Composting frames with Reconstruction Filter set to classic is as easy as setting LW and AE to both premultiply black. usually works perfect.

Here are two renders i used to test. Same object and all, but one render has premultiply on in LW and the other had it set to off. They are named respectively. These used the Gaussian Soft filter. Any 'soft' filter should have similar results. (i think)
Unpremultiplied (http://4dartist.com/cgtalk/test-gaussoft-unpremultiply.png)
Premultiplied (http://4dartist.com/cgtalk/test-gaussoft-premultiply.png)
(there should be no border, these are just gray objects.)

P.S. I also use 32 bit images and never separate alphas. Seems AE doesn't have a premultiply setting for when the alpha is separate. So you'd have to have LW set to unpremultiply. (which gives errors with hypervoxels)

05-07-2008, 12:33 PM
Premultiplied (classic filter) (http://4dartist.com/cgtalk/test-classic-premultiply.png)

Import this into AE and set AE to see it as premultiplied in the "Interpret Footage" settings to see what it should look like. (only softer)

CC Rider
05-07-2008, 01:25 PM
Your first post seemed like you were rendering the alpha and RGB separately.
I misunderstood...
On second thought, I'm probably not much help to you on this thread after all since I have never had much luck using the other reconstruction filters...never could find one I liked as much as Classic.
As a workaround, maybe render out in classic premultiplied then apply a .01 or .02 guassian blur in AE to soften it a bit if that's the look you're after.

I have always worked with the philosophy to get the most pristine footage you can get for your raw footage and wait to schmutz it up in post/compositing.
For example, you wouldn't apply a softening filter to a real camera lens when you are shooting greenscreen. Ask anyone who has ever shot video for Ultimatte or Chromakey and they'll surely tell you the same thing.
It'll make your key look like Doggie bits!
Wait and add the softening in post. (or farther down the line in Post...)
On the other hand, the other reconstruction filters probably will work a lot better for you if you aren't comping them later, which is what I would bet they were probably intended for.
Sorry, not really a fix but if you know the limitations you should be able to work around...