12 Replies Latest reply on Jan 4, 2014 12:35 AM by Rick Gerard

    3d lights casting shadows create moray patterns

    samhamann Level 1

      When I rotate a layer in 3D space with a point light casting shadows on it, it creates a vertical line pattern. If I use a spotlight, it creates a moray pattern. When I use ambient, it goes away, but so do the cast shadows. How can I fix this? I am looking at the composition at 100% annd I am using square pixels. I have set the  bit depth to 32.

        • 1. Re: 3d lights casting shadows create moray patterns
          Rick Gerard Adobe Community Professional & MVP

          That's not much info to go on. Are you seeing the problem on render? If the answer is yes then you are seeing compression artifacts. If the problem is in the composition window set the resolution to Auto and view the composition at a Zoom Factor of 100%. If neither of these solutions work then give us a screenshot showing all changed properties revealed on the problem layers by pressing the U key twice. With the setup you are describing I have never had a problem with a shadow.

          • 2. Re: 3d lights casting shadows create moray patterns
            Mylenium Most Valuable Participant

            You need to provide screenshots and exact settings.

             

            Mylenium

            • 3. Re: 3d lights casting shadows create moray patterns
              samhamann Level 1

              Here are some screenshots.

              The only thing that has keyframes is each "panel" rotating 180 degrees on y.

              If I make the light an ambient light as you see on the last shot. The problem goes away.

              Vertical 02.jpgsetup.jpgambient.jpg

              • 4. Re: 3d lights casting shadows create moray patterns
                Rick Gerard Adobe Community Professional & MVP

                Are you using GPU acceleration to render the preview? What does it look like if you render a frame to a Photoshop file???

                 

                Did you really cut the image up into all those elements? Did you Try Card Dance or Card Wipe? That plug-in will do what you are trying to do with on a single image layer with a controller (gradient) layer hidden.

                • 5. Re: 3d lights casting shadows create moray patterns
                  samhamann Level 1

                  If I add a light on the side and reduce the intensity of the main light to 95%, I get a better result...2 lightss.jpg

                  • 6. Re: 3d lights casting shadows create moray patterns
                    samhamann Level 1

                    I get the same result from the photoshop render.

                    Yes, I did cut it up. Should I feel stupid?

                    I need to have the "backside" of the flipped panel to be white- do those plugins do that as well?

                    That would be much easier!

                    What is the difference between CardDance and CardWipe?

                    • 7. Re: 3d lights casting shadows create moray patterns
                      samhamann Level 1

                      I tried CardWipe, but it doesn't cast shadows from each panel on to each other. Is tehre a plugin that does that?

                      shadows.jpg

                      • 8. Re: 3d lights casting shadows create moray patterns
                        Rick Gerard Adobe Community Professional & MVP

                        I see vertical lines on your image where teh cards are not flipping. I think that may be the source of the problem. What format is the image? Is it a scan from a halftone image (printed image)? Try saving the image as a PSD. Can you post the image? Is it video?

                        • 9. Re: 3d lights casting shadows create moray patterns
                          samhamann Level 1

                          No. It is high rez photography.

                          There is no moray if I turn the lights or the shadow off so it is not built in to the image itself.

                          If I build the exact same effect in Cinema4D, there is no moray or vertical banding.

                          If I make the light ambient, the stripes vanish. But, so do the shadows.

                          It's a conundrum.

                          • 10. Re: 3d lights casting shadows create moray patterns
                            Andrew Yoole MVP & Adobe Community Professional

                            I find fairly regular anomalies with AE lighting, to the point that in most complex 3D setups I almost always have to find workarounds to make spot-fixes to AE scenes that have shadow hiccups. The most common is shadows that "pop" in and out of frame randomly during camera moves.  Like I say, this is generally in quite complex 3D setups, not like your fairly straightforward one.

                             

                            The most common issue that causes this banding in shadows, I've found, is when two layers are intersecting in the same space.  In the demo setup below, which I've set up just like yours with a Point Light and an Ambient light, note that the bottom masked inner segment is one layer and no banding is visible.  The top segment is two identical layers in the same space, and the banding occurs.

                             

                            Screenshot 2014-01-04 13.25.54.png

                            Are you, perhaps, using two layers for each segment - one for the front image and one for the back?  This is almost certainly the issue if so.  Work around the problem by turning off (either trimming or keyframing opacity) the layer/side of each segment when that layer is not visible to the camera. Or, ensure that the two layers don't intersect, by positioning them a few pixels apart in Z space.

                            • 11. Re: 3d lights casting shadows create moray patterns
                              samhamann Level 1

                              I am definitely using two layers, one for the front and one for the back so that when the "frames" flip, the back will be white. I am using an expression in the opacity transform to only have the layer opaque when it is facing the camera. that way, when I have to slide the transition according to the edit I won't have to slide all the opacity keyframes alomg with the rotations. I guess I will have to keyframe the opacity and slide that keyframe along with the rotation. Thank you so much for your help.

                               

                              when I set the opacity as a keframe that turns on only when the are visible all the banding issues dissappear.

                              • 12. Re: 3d lights casting shadows create moray patterns
                                Rick Gerard Adobe Community Professional & MVP

                                I apologize but I should have caught this from your second screenshot. Because you scaled it down it was very hard to read the timeline. Your interference pattern is caused by the back layer. IF keyframeing the opacity solves the problem your expression is not written correctly or it was not applied to both layers.

                                 

                                Instead of keyframing the opacity you have two other choices. One, offset the anchor point of the back layer by 1 or 2 pixels in Z, or two, fix the expression.

                                 

                                The expression should be:

                                 

                                     if (toCompVec([0, 0, 1])[2] > 0 ) value else 0


                                Here's an effects preset and here's a sample (CS6) comp showing how to set up the comp. I would suggest that you start building your own library of animation presets. Any time you write an expression or set up an effect that you might use again save an animation preset. I have a couple hundred of them in a dropbox folder with an alias to my usual effects and presets folder so thy are available to me anywhere I work. Saves a bunch of time....