3 Replies Latest reply on Jul 27, 2015 6:42 AM by Rick Gerard

    Displacement Not As Expected - Suggestions or Alternatives?

    Marc Trzepla

      I think I just discovered that Displacement Map doesn't work the way I thought it did.

       

      I have this image... (grey is transparent, by the way)

       

      Disp 01 Source.jpg

       

      And this displacement map...

       

      Disp 02 Disp Map.jpg

       

      and I expect that if I horizontally displace it I'd get this...

       

      Disp 03 Expectation A.jpg

       

      or at the very least this...

       

      Disp 04 Expectation B.jpg

       

      but I get this instead...  (value 725)

       

      Disp 05 Result A.jpg

       

      and this.. (value 1275)

       

      Disp 06 Result B.jpg

       

      So.

       

      - Why does Displacement Map slide over pixels that are mapped to grey which shouldn't be affected? (like the aqua, blue, and pink?

       

      - Why do pixels that are displaced go "under" the un-moving parts of the image?

       

      - Why do pixels that are displaced not "come out the other side" after going under un-moving parts of the image?

       

      And probably the most important question...

       

      - if Displacement Map doesn't do what I want it to do, can anyone recommend an alternative?  Preferably something that ships with After Effects, though I'm willing to entertain the idea of 3rd party plugins.

       

      Thanks,

       

      Marc

        • 1. Re: Displacement Not As Expected - Suggestions or Alternatives?
          Mylenium Most Valuable Participant

          Well, your map makes zero sense, so yes, you do not understand how this works. Displacements require gradients to stretch out stuff. All the effect does is apply a transform with a multiplier and that multiplier is the same for the same color. In order to stretch out a 5 pixel square you will have to have a 5 pixel gradient underneath it. that of course doesn't do you much good, since multiplying just 5 grey levels across the whole screen width will inevitably cause it to quantize and have banding, so your whole approach is unsuitable. So instead of trying to play it quick & dirty using effects I'm afraid you will really have to lay out at least some parts of it as proper "geometry" e.g. using shape layers and animate that.

           

          Mylenium

          • 2. Re: Displacement Not As Expected - Suggestions or Alternatives?
            Marc Trzepla Level 1

            Thanks for the quick reply.  I started with gradients but when my actual project (this rainbow pict and displacement map are both tests) started distorting parts of the image that shouldn't have been moving, looking like a wormhole from Interstellar, I thought, "let me reduce this to basics to get at what's really going on here.  Two colors.  White full-on and grey no-effect."     The end result for the project will actually require part of the image to be moved the full multiplier (white), part of the image to be moved a fraction of the multiplier (light grey) and part of the image not moving at all (50% grey).  The fact that parts of the image mapped to 50% grey were ending up being translated - just like my example above - was really confusing.

             

            - Any idea why parts of the image mapped to grey move at all?

             

            - Any suggestions on how to achieve a result that doesn't move the parts of the image mapped to grey?

             

            Thanks,

             

            Marc

            • 3. Re: Displacement Not As Expected - Suggestions or Alternatives?
              Rick Gerard Adobe Community Professional & MVP

              Maybe this old blog post of mine will help: Advanced Displacement Maps

               

              In your example the parts under gray don't move, but the image under white does. You are expecting the pixels boundary between the gray and white to create a mask so you can move just the block in the white area. Displacement mapping would create some very unusual results if that happened. Using a gradient to create most of the visual effects you would use a displacement map for would turn into a complete mess. You can use red and the opposite of red (0º and 180º in hue) to move the pixels on the red side one way and the pixels on the opposite of red or minus red the other, but you can't cut out the boundary between them and create an alpha channel or transparency.