Works in Vegas, not in After Effects

ingvarai wrote on 2/10/2012, 4:31 AM
Hi, I come here with a little funny question, I want to know why something works well in Sony Vegas :)
The question is: Why doees it not work in Adobe After Effects? I need to use After Effects now and then, and recently discovered this real big problem for me.
I have rendered out a PNG image sequence from the 3d modeling application daz3d Carrara. The PNG files are 8 bit and the Carrara settings is "premultiplied". When importing thse into Vegas, all is fine when I set the property to premultiplied. In After Effects, however, I cannot get it correct. I have switched between Straight and Premultiplied, but it does not work. If anyone of you perhaps also use After Effects, and have an idea about why it does not work there, I would be very happy if you could give me tips and hints on how to fix this!
You can see the difference here:
Vegas vs After Effects

Comments

ingvarai wrote on 2/10/2012, 5:11 AM
Here is an update. When I add the HSL Adjust FX to the track, I get the same result as in After Effects. Even if I do not touch the contols. It is enough to add the effect.
farss wrote on 2/10/2012, 5:31 AM
I think what you're seeing is a difference between how AE and Vegas handles levels.
AE assumes black = 16 and white = 235, it clips anything outside those values, Vegas black = 0 and white = 255.

Bob.
PeterDuke wrote on 2/10/2012, 6:44 AM
The grey boomerang is almost white in the Vegas image but jet black in the AE. It is not dark grey turning black or light grey turning white. It's as if the boomerang "object" is being treated differently. Does the png have unflattened levels?
ingvarai wrote on 2/10/2012, 6:53 AM
> I think what you're seeing is a difference between how AE and Vegas handles levels.
Maybe. But as I wrote in my update, as soon as I add the Sony HSL effext to the track, it suddenly behaves like After Effects. And I do not touch any controls.

> Does the png have unflattened levels?
How can I tell? I do not know what it is.
larry-peter wrote on 2/10/2012, 8:18 AM
When you just preview Alpha in After Effects does the "boomerang" or floor show as white? From the way it's correctly handling the alpha on the shadow, it looks like it's clipping the alpha for the floor to black for some reason. You could try applying one of the effects in AE that gives you control over alpha levels and see if that makes a difference.

ingvarai wrote on 2/10/2012, 8:29 AM
In After Effects, it becomes completely transparent, not white.
With closer examination, it looks like the result I get in Sony Vegas also is not quite correct. It seems that the image(s) generated in the 3D modeler Carrara are not ok, because of this shadow catcher shader. I will try to find out more, and come back with more info.
Thank you very much for your help!
robwood wrote on 2/10/2012, 11:05 AM
"AE assumes black = 16 and white = 235" - farss

After Effects can read/write YUV, but the workspace is RGB (unlike Premiere, which stays YUV unless given RGB media).... so 000/255 going into AE should remain 000/255 and shouldn't change to YUV values.
ingvarai wrote on 2/10/2012, 12:38 PM
Here I have assembled a few more images to explain what it is all about. Perhaps someone will understand the difference between After Effects and Vegas:

Carrara-SonyVegas-AfteEffects
farss wrote on 2/10/2012, 2:32 PM
After sleeping on this I still don't fully understand the problem here nor can I explain well what was going on when I've been struck with similar problems in both AE and Vegas, all I can offer is some general thoughts. You'll have to experiment.

1) Light and alpha seems problematic when compositing. That makes sense because masking is multiplying and light "adds".
2) There was a change made to Vegas many years ago now that I suspect means FXs do not pass the alpha channel.

What I would do and it's what I see done in tutorials and demoes of various compositing apps is to render out your 3D objects and your lights separately. The objects should have alpha channels, the light not. You then comp the objects and "add" the light(s) and hopefully it will make sense when you choose the right compositing mode for the layers.

Bob.
larry-peter wrote on 2/10/2012, 4:26 PM
Does your 3D app have an option for something similar to "Linear Workflow" in the render settings. I seem to remember something similar to this in Cinema 4D where the gamma curve of the alpha channel would be changed when imported into after effects if "linear workflow" wasn't checked. Node based compositors (like Fusion) would see it correctly but not AE.

Edit: I generally always use Bob's suggestion of rending lights, solids (and actually diffuse, specular, shadows, everything) separately so you have control over the compositing modes. But the fact that Vegas sees it all tells you the volumetric light and alpha info are all present.

Edit 2: Here's a link about just what I was talking about and goes into much more depth - http://forums.cgsociety.org/archive/index.php/t-982594.html
ingvarai wrote on 2/11/2012, 4:25 AM
Bob and atom12, thanks a lot for your input. And thanks for the link to this very interesting thread about After Effects and premultiplying!
I have come to the conclusion that my 3D modeling app, Carrara, does it wrong. So there is the place where I have to attack this issue. Yes, Vegas can read those files, but there still is something wrong with them. As soon as I add any FX, the cone light disappears. Without the shadow catcher, or with only parts of it, the images is ok in both Sony Vegas and in After Effects. And without the shadow catcher, I can also add FX to the track in Vegas and adjust as much as I want.
You can see it here:
Carrara shadowcatcher shader

farss wrote on 2/11/2012, 6:17 AM
Sorry but still not seeing anything that doesn't conform to what I said.
I think your 3D app is doing it correctly. The problem is in how a 2.5D compositing app handles an alpha channel.
Pretty certain that Vegas applies the FXs while respecting tha apha channel and the passes that with no apha to the compositing engine. So add any FX and goodbye alpa channel.
I suspect what happens when you slice your shadow catcher because there's nothing there in the sliced out bits maybe there's no alpha data or something like that. To be certain you need a way to "see" the alpha channel.

Whay don't you try changing compositing modea in AE or Vegas, me thinks Add will show you something new.

Bob.
ingvarai wrote on 2/11/2012, 7:39 AM
Hi Bob,
There was a change made to Vegas many years ago now that I suspect means FXs do not pass the alpha channel

If I remove / move the shadow catcher, everything is fine. Vegas has then no problems using the Levels FX for example, and I can adjust red, green, blue and the alpha channel, no problem. In my 3D app Carrara, the shadow catcher "steals" the light.

Let us put it this way:
1) Without the shadow catcher at all, everything works as expected, in both AE and Vegas.
2) When the shadow catcher is added to the scene, Carrara renders the image in a way that makes it not work at all in AE and work in Vegas, until I add a FX, then it does not work in Vegas either.

Summary - the shadow catcher "blocks" the light / alpha channel by its mere precence, even if it does not receive any shadows at all. Something has to be wrong in Carrara, my 3D app. I am currently discussing this in the Carrara forums.
Here is the image loaded into Vegas, and I have adjusted the alpha levels using the Sony Levels FX. The dark stripes are the part where the shadow catcher is not present. You will notice that the shadow catcher actually does its job, you will see the character's shadow imposed on the lawn, but it blocks the spotlight completely. The spotlight is here where the dark stripes are.
Shadow catcher in Vegas

Here is yet another image, where you can see that Vegas is not completely correct either. So it has to be Carrara but it would be interesting to know WHAT it does wrong..

Vegas also does it wrong

You can download a test image here:
Test image for premultiplied alpha
larry-peter wrote on 2/11/2012, 11:35 AM
The only 3d app I have used in years is 3ds Max, so I don't know how this will apply... In Max the "shadow catcher" is a Matte/Shadow material with several properties that have to be set correctly in order to get the math done accurately in a single composited alpha channel. Depending on the scene, it can be near impossible. It's much simpler to render the shadows in a separate pass and composite later. I don't know if Carrera has such adjustments, or how to guide you through them, but since a standard workflow for using shadow catching materials is to composite the separate rendered layers from the 3d app into another background, that may be the default that Carrera assumes.
vtxrocketeer wrote on 2/11/2012, 12:53 PM
I render scenes out of Cinema 4D in exactly the same way as atom12 describes: separate "passes" for main image, shadows, alpha, etc. These are all separate plain vanilla TIF files (or TIF sequences for animations). Then, these are easily composited in AE.

I have no idea how Carrera works, or what it would call what C4D labels "passes," but perhaps you could render out of Carerra per the above procedure. I think this is a pretty standard way of handling scenarios like this. In contrast, I once tried to render a multi-layer PSD out of C4D and it just wouldn't composite right in AE. Keeping everything separate makes it so much easier (IMO) to composite later, i.e., adjust curves of main image, change opacity of shadow, add a bit of tint here or there, etc.

Hope this helps.
ingvarai wrote on 2/11/2012, 12:57 PM
atom12 and vtxrocketeer,

you are absolutely right.
I have found otu that I neeed Carrara to emit multiple passes, and it can, it is powerful enough. I was initially confused because it looked like Vegas was able to read the single pass files. I have now solved the isssue as I said, by making Carrara render several passes, in one opeartion. It emits two (or more) filer per frame. And PNG files do very well, once I understood how to configure Carrara. I have learnt a lot from this, and also found out that Sony Vegas is powerful enough to handle most of my tasks. I have to resort to After Effects in a few cases where I need very special effects.
And as you point out, vtxrocketeer, a new world opens up where I can control a lot of parameters in each layer, blend modes.. you name it. Very powerful all of it.
Thank you all for your help!
vtxrocketeer wrote on 2/11/2012, 2:59 PM
Awesome! I like happy endings. I'm glad that you're now on your way.

In AE, I would have liked to place my composited TIF's (or PNG's in your case) into a pre-comp that I then composited into my main comp. Uh-uh. Didn't work this way. I had to composite all passes right in my main comp. It wasn't big deal; I was merely trying to reduce clutter in my gazillion-layer AE project.

I never got into heavy compositing in Vegas only because my first 'formal' training for this was in AE. Now that you rendered correctly out of Carrerra, can you composite your layers directly in Vegas?
ingvarai wrote on 2/11/2012, 5:02 PM
>Now that you rendered correctly out of Carrerra, can you composite your layers directly in Vegas?
Yes, it looks just great in Vegas too, the same as in AE. Here is the AE composition. It is important to set the blend mode to 'Screen':
After Effects composition

>I never got into heavy compositing in Vegas
You can have 'adjustment layers' in Vegas too, believe it or not. By having one track as the parent and others as 'children' and then by rearranging the 'composite' FXs in relation to the others. Discovered this after I got myself After Effects :)

farss wrote on 2/11/2012, 5:18 PM
Understanding blend / compositing modes is very important.

My reasons for using AE over Vegas;

1) The workspace is better suited to compositing.
2) Realtime updating of what I'm moving / changing.
3) Ease of creating "nests". When it gets messy this can make it easy to wrangle.
4) Expressions. Very powerful and can be quite simple.
5) Havind a 3D camera.
6) The "animatation" plugs from Boris e.g. cylinder and sphere.

Bob.

ingvarai wrote on 2/11/2012, 6:53 PM
>My reasons for using AE over Vegas

I agree, but I also regard Vegas and AE two different tools, for different (but still overlapping) purposes. I will not replace Vegas with anything I know today, when it comes to assembling my sound, my prerendered clips, my stills etc. that I need for my main project. Maybe Premiere is good too, I never had the time to study it.

Boris has very nice plug-ins. And after it is supported in Vegas, you do not need to fire up AE to make good keying anymore. You can do it in Vegas - faster. Just an example.

Vegas excels in the way the timeline is contructed, and the way it behaves. I use several other multimedia apps, and I always miss the Vegas functions and the Vegas way of doing things on the timeline.

farss wrote on 2/12/2012, 2:13 AM
"I agree, but I also regard Vegas and AE two different tools"

Oh absolutely, I should have said "for compositing".
For editing vision and mixing audio AE is tragic beyond belief :)

Bob.