5 Replies Latest reply on May 14, 2016 12:46 AM by Mylenium

    How Do IFlatten 2.5D to a regular flat 1d animation and keeping perspectives?

    duncand89835542

      I'm working processing games asset files and as a part of this I have to mimic 3D animations with flat assets; letters spinning in the round for example. I can fake this up pretty good using the faux 3D features of AFX but I cannot take advantage of that for the final export - I'm are limited to scaling, rotating, and transparency of the sprite sheet assets.

       

      How I've been using this technique is to throw layers into depth and then rotate them providing a clear depth cue. I then bake the animation (a script keyframes every single frame) and turn off the 3D switch. This works to a point. (Notice the 'edge assets when seen edge on faking the 3D feel of the letters) What is missing from this is the foreshortening effect that happens in a 3D space as an object rotates. To get around this shortcoming I've been manually scaling the image to squish it in the direction of the rotating. That way I get a little bit of parallax motion and with the squashing and stretching it comes out as a reasonable facsimile of a 3D rotation.

       

      The problem is this is very limited - of course. Works great for a simple wiggle or even full rotation on the X-axis, or the Y-axis, but not both. Both it gets tricky to keep it looking believable. The example here looks fine, but more complexity and it breaks.

       

      Does anyone know of a script or technique that can bake in the visual foreshortening as a scaling factor?

       

      Am I asking too much of After Effects?

        • 1. Re: How Do IFlatten 2.5D to a regular flat 1d animation and keeping perspectives?
          Dave LaRonde Level 6

          I'm asking myself why you'd want to go through all the hassle of it in the first place.  There is barely any difference between your two examples.  Plus once it's rendered, it's all 2D anyway!  If 3D and faux 3D look almost the same, what are you trying to accomplsh?

          • 2. Re: How Do IFlatten 2.5D to a regular flat 1d animation and keeping perspectives?
            duncand89835542 Level 1

            I'm trying to accomplish a completely flat animation that makes use of pre-established sprite elements. The one on the left is not true 3D. It's layers of 2D in 3D space to mimic the look of a 3D word rotating.

             

            In the end, I can't use the one on the left. It has to be flat in 2D because the game engine sources a texture sheet and simply moves them around based on my AE animation. So even though the 2.5D looks great, it can't be rendered ingame.

             

            This particular example is not a problem but an example. I'm working on an animation that pushes the envelope of this technique though.

            • 3. Re: How Do IFlatten 2.5D to a regular flat 1d animation and keeping perspectives?
              Mylenium Most Valuable Participant

              Use effects. You know, there is a Transform effect and I could think of a million ways to rig up stuff using Corner Pin and Bezier Warp to simulate all kinds of perspective distortion intra-layer, including your spinning 3D layers. A simple cosine expression would take care of it.

               

              Mylenium

              • 4. Re: How Do IFlatten 2.5D to a regular flat 1d animation and keeping perspectives?
                duncand89835542 Level 1

                I think perhaps I have not sufficiently explained.

                 

                There can be no effects. If I make a stroke around something I can't use the stroke effect, I have to open the file in PSD, add a stroke, save the asset out and then update it in AE. 

                 

                Imagine that each layer is a cut out piece of paper (the only difference being that this paper can stretch) on a flat surface. Imagine that another program takes the instructions/animations created by me in AE and applies them to the self same assets used by AE  to recreate the animation on a custom, stand-alone platform. This other rendering program can move, scale (including stretching and squashing but not skewing), rotate and affect transparency but nothing else.

                 

                The final animation has to be a simple flat moving around of the elements and that's it. It's a very strange limitation, I admit. However I think I've managed to make some very 3D like illusions within these constraints.

                • 5. Re: How Do IFlatten 2.5D to a regular flat 1d animation and keeping perspectives?
                  Mylenium Most Valuable Participant

                  Well, but must you actually rotate and scale your sprites? Most people would avoid sprite transforms of that kind for performance reasons and to avoid sampling issues and just create a sprite sheet containing all animations baked in. The whole approach sounds slightly odd, though of course I don't know what game you are doing and what engine you are using. I can't even imagine what advantage there is supposed to be in trying to do the perspective stuff the way you do. Your sprite sheets and up being just as big since you need more steps for the tilted perspective and that causes just as complex traversal when looking up the rows and columns. It's really not clear to me what you are trying to achieve that you couldn't with a flat, fully baked spritesheet, given that your engine seems unable to apply vertex transforms/ deformations on your textured planes. This is nothing you can solve with all the fancy tricks in AE even if it would be completely possible to generate such vertex data.

                   

                  Mylenium