20 Replies Latest reply on Feb 11, 2012 2:34 AM by ingvarai

    Cannot get Premultiplied to work properly

    ingvarai Level 1

      Hi,

      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 the Sony Vegas video NLE, 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. You can see the difference here, both PNG images are overlayed another image:

      premultiplied.png

      I must have overlooked something in After Effects, what can it be?

        • 1. Re: Cannot get Premultiplied to work properly
          TimeRemapper Level 4

          Looks like you may have inadvertently applied a track matte in After Effects. Can you post screenshots of your timeline, or your project (collected as needed) itself?

          • 2. Re: Cannot get Premultiplied to work properly
            ingvarai Level 1

            I have come a bit longer. In Carrara, there is a shader called Shadow Catcher. This is the source to the problem. This "catcher" steals all the light in the image when loaded in After Effects, but works as expected in Sony Vegas. I will ask over in the Carrara forums too, to see if someone knows the answer. It is strange, however, that the same image works in one NLE and not in another..

            Here is another sample that better shows the difference. The toon character is standing on a plane, which has the shadowcatcher shader. Outside this plane, the light is ok. But the plane "steals" the light. Also the shadow of the character thrown on the plane does look bad in After Effects.

             

            vegas-ae.png

            • 3. Re: Cannot get Premultiplied to work properly
              ingvarai Level 1

              Here is an update. When I add a Hue Saturation Luminance  effect to the track in Sony Vegas, I get the same result as in After Effects. Even if I do not touch the effect contols. It is enough to add the effect.

              • 4. Re: Cannot get Premultiplied to work properly
                TimeRemapper Level 4

                Can you post one of the .png files? It looks just like an alpha channel.

                • 6. Re: Cannot get Premultiplied to work properly
                  TimeRemapper Level 4

                  As far as I can tell, the alpha channel is working properly. As you noted, your material (shadow catcher) is causing the floor to be invisible except where the shadows are falling. If you want the floor to catch the light, then you'll probably need to apply a different material to it.

                  • 7. Re: Cannot get Premultiplied to work properly
                    ingvarai Level 1

                    The shadow catcher does what it is supposed to do, it catches shadows. The above image is just an eksample. The shadow catchers works as expected. In fact, it works ok in Sony Vegas, the shadows "catched" overlays the beckground very nice in Vegas. In other words, it works, but not in After Effects.

                    • 8. Re: Cannot get Premultiplied to work properly
                      TimeRemapper Level 4

                      Looks like it's working fine to me in AE:

                      Screen shot 2012-02-10 at 8.58.49 AM.png

                       

                      Perhaps I'm misunderstanding what you want.

                      • 9. Re: Cannot get Premultiplied to work properly
                        ingvarai Level 1

                        Thank you very much for your help!

                        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 Carrara are not ok, because of this shadow catcher shader. I will try to find out more, and come back with more info.

                        • 10. Re: Cannot get Premultiplied to work properly
                          ingvarai Level 1

                          Ok, here I am again. The image I get in Sony Vegas may not be perfect, and there might be an issue with the shadow catcher in Carrara, but I still do not understand why After Effects cannot produce the very nice result that Sony vegas can. Here I have assembled some screen shots to further explain what I experience here:

                          premul-images.jpg

                          • 11. Re: Cannot get Premultiplied to work properly
                            TimeRemapper Level 4

                            There are some weird things going on, but my guess is that they're originating in your 3D app.

                            Can you post the image of the backplate (grass) by itself?

                             

                            If you look at the Vegas screenshot, the whole image is being multiplied by white, it would seem. All of your grass...even where the light isn't being cast, is getting brighter. That's wrong. If the alpha has no information (where the alpha is completely black, there should be no info), then the grass should be unaffected.

                             

                            As for the light itself, I'm not sure why AE isn't seeing the volumetric light effect, as I'm not familiar with your particular 3D app of choice. Are you using some sort of light shader? Is it a physical light? Are the some property settings on your light itself?

                             

                            All of this aside, have you tried rendering to a different format (.tif or .tga with alpha's)?

                            • 12. Re: Cannot get Premultiplied to work properly
                              ingvarai Level 1

                              Hi TimeRemapper

                               

                              > Can you post the image of the backplate (grass) by itself?

                              You can use any image of your choice, a solid color layer - anything, same result

                               

                              > If you look at the Vegas screenshot, the whole image is being multiplied by white, it would seem.

                              > All of your grass...even where the light isn't being cast, is getting brighter. That's wrong.

                              Yes! I have noticed this. But the settings in my Vegas project is also a little different, so it is not as bad as it looks.

                               

                              > If the alpha has no information (where the alpha is completely black,

                              > there should be no info), then the grass should be unaffected.

                              Let us say that what I want  is the best of what I get in vegas, and the best I get in AFter Effects. No one of them are perfect, but Sony Vegas at least shows the light cone!

                               

                              > Are you using some sort of light shader? Is it a physical light? Are the some property settings on your light itself?

                              The light is a "Spot" in Carrara. It has the effect "Light Cone" turned on, with the option "3D Shadows" enabled 

                               

                              > All of this aside, have you tried rendering to a different format (.tif or .tga with alpha's)?

                              Yes, tried TIFF - saw no difference at all

                              • 13. Re: Cannot get Premultiplied to work properly
                                TimeRemapper Level 4

                                Hi ingvarai,

                                 

                                Yes! I have noticed this. But the settings in my Vegas project is also a little different, so it is not as bad as it looks.

                                 

                                Are you fully comfortable with what an alpha channel is and how it works, as well as premultiplied versus straight alphas? Your Vegas project would have to be pretty radically different for it to result in such a luminance difference on that grass.

                                 

                                Files and channels work exactly as they're supposed to when all of the setitngs are correct. You don't have to make a Frankenstein of your AE project and your Vegas project in order to get the results you want. You should be able to create the file properly for equal use in either application.

                                 

                                Try some more troubleshooting with Carrera. Perhaps try removing your shadow catcher material and objects completely from a duplicate of your scene file. Render it with transparency and the light enabled. See if it makes a difference. By the way, what kind of framebuffer are you generating from Carrara? Are you choosing to render a premultiplied or straight alpha? Are you trying to embed other channels? When you tried it as a .tif, are you certain you saved it as a 32-bit tif (RGBA) without compression?

                                • 14. Re: Cannot get Premultiplied to work properly
                                  ingvarai Level 1

                                  Are you fully comfortable with what an alpha channel is and how it works, as well as premultiplied versus straight alphas? Your Vegas project would have to be pretty radically different for it to result in such a luminance difference on that grass.

                                  Not fully comfortable, no.

                                  Anyhows - The Vegas image is ok, I made a mistake with layers in vegas. In Fact, it is perfect in Sony Vegas. Look below for an updated image:

                                   

                                  > Are you choosing to render a premultiplied or straight alpha?

                                  Premultiplied.

                                   

                                  > Are you trying to embed other channels?

                                  Not that I am aware of

                                   

                                  > When you tried it as a .tif, are you certain you saved it as a 32-bit tif (RGBA) without compression?

                                  It only has TIFF as a choice, I did not see any other options. Maybe I must look closer--

                                   

                                  premul-images2.jpg

                                  • 15. Re: Cannot get Premultiplied to work properly
                                    TimeRemapper Level 4

                                    Can you post the .png (render) that you're using?

                                     

                                    And, you might want to read the links regarding alpha channels in my previous post. They can be hard to understand at first, but you need to get the concept down now. There's nothing to be afraid of!

                                     

                                    They simply define image transparency. Straight Alpha's are usually preferred because they maintain more accurate color information. You may want to try rendering your image with a Straight Alpha instead of a premultiplied one. Also, make sure that you're not trying to embed any other channels. You'll need to consult Carrara's documentation/user-base for more info there...

                                    • 17. Re: Cannot get Premultiplied to work properly
                                      TimeRemapper Level 4

                                      You definitely have something screwy going on in your Carrara settings. And you are rendering a Straight Alpha, not a Premultiplied one.

                                       

                                      If you invert the alpha in the Interpret Footage dialog box, you'll be able to see your cone:

                                       

                                      Here's how it may look by default:

                                      preInvert.png

                                      Composited over a red solid:

                                      compOverRed.png

                                      Here's the invert switch:

                                      invert.png

                                      And here's the result:

                                      compInvert.png

                                       

                                      Now you see that your light is getting embedded into your alpha channel somehow, just not how you want it, or it's not getting embedded into your RGB channels properly. You need to adjust some settings in Carrara.

                                       

                                      Also, you should try to avoid using .png as your still image sequence file format of choice. The way it handles alphas can be...substandard sometimes.

                                      1 person found this helpful
                                      • 18. Re: Cannot get Premultiplied to work properly
                                        ingvarai Level 1

                                        Now you see that your light is getting embedded into your alpha channel somehow, just not how you want it, or it's not getting embedded into your RGB channels properly.

                                        Ok, thank you very much for your help!

                                         

                                        > You need to adjust some settings in Carrara.

                                        I do not think there are more settings to adjust.. and besides of that, it works very well in Sony Vegas. I am more interested to see if there are settigs I can adjust in After Effects, to get the results I get in Vegas. Rendering out takes many many hours, sometimes a whole night. So I wish I can use what I already have made, by finding a setting in AE that can be adjusted..

                                         

                                        Also, you should try to avoid using .png as your still image sequence file format of choice. The way it handles alphas can be...substandard sometimes.

                                        Ok - but again - it works very well in Sony Vegas

                                        • 19. Re: Cannot get Premultiplied to work properly
                                          TimeRemapper Level 4

                                          You can get it to work in AE. It looks like you need two copies of your footage in your project window, one with the alpha interpreted as inverted, and one normal. You can composite those two in your timeline (set your inverted copy to screen):

                                          Screen shot 2012-02-10 at 3.19.33 PM.png

                                          Screen shot 2012-02-10 at 3.19.41 PM.png

                                           

                                          I think the thing to walk away from this with is that you really need to designate your settings properly, and understand those designations in Carrara. Otherwise you will end up wasting lots of time in the future. I understand that rendering 3D material can take a long time, which is all the more reason for you to do your best to get it right at the get-go. Also, no offense, but I really don't give a hoot about what Vegas does. It's not part of my workflow. It never has been, and probably never will be. I can't explain why Vegas is interpreting your footage differently than AE. Perhaps someone who uses Vegas can chime in on that.

                                           

                                          I really, really urge you to look more in-depth at your Carrara options/settings.

                                          • 20. Re: Cannot get Premultiplied to work properly
                                            ingvarai Level 1

                                            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. Here you can see the alpha channel displayed in After Effects. I rendered out two images, one with the shadow catching panel visible, and one with the panel's visibility turned off. And I also chopped up  the shadow catching plane in stripes, this shows it all, the Shadow Catcher steals the cone light.

                                            Now, all images look good in my Video NLE Sony Vegas, but that is maybe coincidence. Because the images with the shadow catcher behave strange. So it definitely is something with Carrara. Without the shadow catcher, or with only parts of it, the images is ok in both Sony Vegas and in After Effects. Thank you for your help!

                                            shadowcatcher-grid.png