17 Replies Latest reply on Aug 14, 2009 1:59 AM by Victor Burgin

    Vanishing Point Exchange - How to place the camera ?

    Victor Burgin Level 1

      When I import a .vpe file into AE, I'm given a "custom" camera with an un(real)worldly focal length, and six-figure position and zoom values. My 3D scene is in extreme close-up.

       

      My intuition is to give the camera a 35mm preset, set the zoom in real-world terms (I know,... I'm not in the real world anymore, Toto) and then move the camera position to my required start point.

       

      I've been trying this, with multiple variations, all day and am getting nowhere - whatever I do results in either correct geometry at an unusable distance, or a nicely composed frame with unacceptable geometry. (I got lucky once early this morning - but have since been unable to repeat the result).

       

      A question to those who, unlike me, know what they're doing: How should I go about this ??

       

      Thanks !

        • 1. Re: Vanishing Point Exchange - How to place the camera ?
          Mylenium Most Valuable Participant

          Does the image size in PS match your AE comp? The values can cet very large, but should not be out of this world. Only large images shoudl produce large values. Also make sure to select the correct reference plane. If you select items with very little perspective distortion, the algorithm will naturally assume a very "flat" (long) lense and offset the position values more than it would with a stronger lens...

           

          Mylenium

          1 person found this helpful
          • 2. Re: Vanishing Point Exchange - How to place the camera ?
            Victor Burgin Level 1

            My file is 5139 x 5433 pixels. My Comp is 1400 x 1050. The point of the large file, of course, is to be able to move forward into the 3D space without losing resolution.

             

            I don't think the reference plane can be an issue in this particular case. The still is a centered view straight down a large box-like hall – made in heaven for vpe, I would have thought.

             

            A side question: as a general rule, should I try to stop thinking in real world terms (I've come to AE from photography and video), and so stop worrying when my lenses seem to come from Klingon ?

             

            Thanks !

            • 3. Re: Vanishing Point Exchange - How to place the camera ?
              Adolfo Rozenfeld Adobe Employee
              A side question: as a general rule, should I try to stop thinking in real world terms (I've come to AE from photography and video), and so stop worrying when my lenses seem to come from Klingon ?

              Why do you feel that, Victor? In what way the AE camera lenses contradict real world lens behavior for you?

              • 4. Re: Vanishing Point Exchange - How to place the camera ?
                Mylenium Most Valuable Participant

                My file is 5139 x 5433 pixels. My Comp is 1400 x 1050. The point of the large file, of course, is to be able to move forward into the 3D space without losing resolution.

                 

                It still may be exactly be the reason why you end up with such large values. If possible, you should have the solution calculate on the final comp size. You can always replace the image and scale it, when necessary.

                 

                A side question: as a general rule, should I try to stop thinking in real world terms (I've come to AE from photography and video), and so stop worrying when my lenses seem to come from Klingon ?

                 

                That should per se not be a problem. The decisive factor is to get the filmback size and the focal length right, the rest should more or less fall into place naturally. The only caveat here is, that the camera derives all its math from the comp size, so of course if your images are way larger then the actual visible area, dialing in the same values will yield different visual results. Pretty much the same as with VPE - since all these calculations are monoplanar, there is no way to derive these values automatically. Only more complex calculations as they are used in 3D matchmoving software can achieve that.

                 

                Mylenium

                • 5. Re: Vanishing Point Exchange - How to place the camera ?
                  Victor Burgin Level 1

                  Thanks - I'm encouraged and frustrated as I don't know enough to be able to act on your remarks. Could you please expand on them a little ?

                   

                  < If possible, you should have the solution calculated on the final comp size. You can always replace the image and scale it, when necessary.>

                   

                  Should I ? :

                   

                  1) Crop my image to the Comp aspect ration (4 x 3 in this case)

                   

                  2) Resize the cropped image to the Comp pixel dimensions (1400 x 1050)

                   

                  3) Set perspective planes in the Vanishing Point filter window and save .vpe file

                   

                  4) Import the .vpe file into AE

                   

                  5) Assuming the model is visible and legible, make the required Camera movement.

                   

                  6) ... and then ? This is where I'm confused:

                   

                  i) I can't replace the source as if it were a single image (import new, option-drag onto old) because my 'source' is a collection of PNGs.

                   

                  ii) I can't go back and make new, full-size, PNGs from the large file because in order to do that I would have to set the perspective planes again, and I wouldn't draw them exactly the same the second time around.

                   

                  <The decisive factor is to get the filmback size and the focal length right ...>

                   

                  How do I decide what is "right", and what steps do I take to get it right ?

                   

                  Thanks again, I very much appreciate your patience

                  • 6. Re: Vanishing Point Exchange - How to place the camera ?
                    Victor Burgin Level 1

                    < Why do you feel that, Victor? In what way the AE camera lenses contradict real world lens behavior for you? >

                     

                     

                    Adolfo, this could be a long story, but as you did ask ...

                     

                     

                    I'm working with a spherical panorama of an architectural interior. I've extracted a rectilinear view down the interior space from the equirectangular image, and put it through PS Vanishing Point to bring it into AE as a 3D model. I now want to make a camera movement through that space.

                     

                    What kind of movement? Well, I look around the space again in my QTVR movie, and I remember how it felt to be in that space, and then I decide. So, in my head, I'm back in the space, with a 35mm lens on my camera, and I'm walking towards the end wall – which is about 12 meters away.

                     

                    Well, no, actually, I'm in AE. My Camera is called "Custom", it's Zoom is set at "2.651e", and its Position coordinates read 2569.5, 2716.5, and (the one I'm trying to approach the wall with) -5154348 pixels. I can't even grab the camera in Top view as even at 1.5% it's totally off my 30" display (Uh, oh ... real world space thinking rears its stupid head again!)

                     

                     

                    See my problem? I've never reached into my camera bag and pulled out such a lens.

                     

                    (BTW, Did you think I was complaining about AE? Absolutely not. I have nothing but admiration-approaching-awe for AE and for those who build it. I just want to know what mind-set will best help me understand how to work with it.)

                     

                    There's the background. Here's another real world question: I just bought a Mac Pro 8-Core with 16GB RAM and a fast RAID so I could work easily with my (present case) 5139 x 5433 pixel image - am I being too optimistic? If so, what would be a realistic maximum image size?

                    • 7. Re: Vanishing Point Exchange - How to place the camera ?
                      Adolfo Rozenfeld Adobe Employee

                      Yes, cameras inherited from Vanishing Point can be really alien, because of the way AE (or PS when returning VP as a PS 3D layer) has to extract a camera from perspective planes, ie from where there was no camera to begin with. This sometimes leads to very odd values.

                      AE cameras you create directly are more earthly in nature.

                       

                      You could try this:

                      1. Create a new AE camera, starting for example with the 50 mm preset. Make sure this camera is above the camera inherited from VP in the layer stack order.

                      2. Select a VP plane layer in the AE comp that you know is oriented towards the front.

                      3. Go to View > Look at selected layers. The new camera will point at that layer, and thus the camera will be straight relative to that plane.

                      4. Delete the original

                       

                      Here's another real world question: I just bought a Mac Pro 8-Core with 16GB RAM and a fast RAID so I could work easily with my (present case) 5139 x 5433 pixel image - am I being too optimistic? If so, what would be a realistic maximum image size?

                       

                      That's a long subject. But before tackling that long subject, yes, there should be a very good reason to work at such resolution. Except for high-end film work, you're unlikely to target a medium that could take advantage of such a frame size.

                       

                      Such large frame sizes are challenging for a 32-bit app. Even if AE can take advantage of more than 4GB of RAM by launching rendering instances for each core (each potentially using up to nearly 4 GB), it still can't address more than 4 GB at the same time. This means you would have to get a ton of RAM (16 GB at least), limit the number of cores to around 4 or turn multiprocessing off completely, and use half or quarter resolution while working in AE. The final render could be the more challenging step, and again, you're unlikely to need (or take advantage of) such a large file for motion work.

                      1 person found this helpful
                      • 8. Re: Vanishing Point Exchange - How to place the camera ?
                        Victor Burgin Level 1

                        << You could try this:

                        1. Create a new AE camera, starting for example with the 50 mm preset. Make sure this camera is above the camera inherited from VP in the layer stack order.

                        2. Select a VP plane layer in the AE comp that you know is oriented towards the front.

                        3. Go to View > Look at selected layers. The new Comp will point at that layer, and thus the camera will be straight relative to that plane.

                        4. Delete the original >>

                         

                        That's brilliant - thank you so much. This points the camera squarely at the front vertical plane (in the real world terms of my scene, the end wall of the hall). I'm no longer lost in space.

                        I then change the camera Position Z-axis value to bring the camera closer to this plane and ... Uh oh! the other four planes (side walls, floor and ceiling) become stretched into a streaky blur. Where did I go wrong ?

                         

                        << there should be a very good reason to work at such resolution. Except for high-end film work, you're unlikely to target a medium that could take advantage of such a frame size.>>

                        In clarification ... My final output is a QuickTime movie played from hard disk to a video projector. I work to a  frame size of 1400 x 1050 pixels to match the SXGA+ native resolution of my preferred projector (avoiding rescaling and loss of resolution in the projector). The size of my AE Footage image (in this case) is 5139 x 5433 to allow me to move my 1400 x 1050 frame around the footage to simulate camera movements. In the case of the "dolly in" towards the wall in my .vpe 3D set, 1400 x 1050 original pixels is the extreme limit of the movement beyond which I cannot go without interpolation and loss of resolution.

                         

                        So to rephrase my question, with apologies for lack of clarity first time around, what would be a realistic limit to the pixel count of my footage image given the limitations of my system: 2.26GHz Quad-Core, 16 GB RAM and fast RAID ?

                         

                        (I've just ordered CS4, even though CS3 is more than adequate to my "aesthetic" needs, as I believe it offers better management of multiprocessing – and in the hope it will make my OpenGL problems go away.)

                         

                        Thanks again !

                        • 9. Re: Vanishing Point Exchange - How to place the camera ?
                          Victor Burgin Level 1

                          PS - (vis-à-vis the four-step camera placement) - when I select the (new) camera, no camera diagram appears in the top view, not even at 1.5%, and not even the point of interest.

                          • 10. Re: Vanishing Point Exchange - How to place the camera ?
                            Adolfo Rozenfeld Adobe Employee

                             

                            That's brilliant - thank you so much. This points the camera squarely at the front vertical plane (in the real world terms of my scene, the end wall of the hall). I'm no longer lost in space.

                            I then change the camera Position Z-axis value to bring the camera closer to this plane and ... Uh oh! the other four planes (side walls, floor and ceiling) become stretched into a streaky blur. Where did I go wrong ?

                             

                             

                            If you want to post a screenshot, feel free to do it.

                             

                            I suspect what you are seeing is a limitation for textures extracted from planes which have wild perspective shifts. When planes are more perpendicular to the "real" camera, the less actual texture information in the original, especially as pixels go further away from the camera. Zooming/orbiting with a 3D camera just makes this much more obvious So, there are some real world limitations when navigating pictures turned into 3D scenes in this way.

                             

                             

                             

                             

                             

                             

                            In clarification ... My final output is a QuickTime movie played from hard disk to a video projector. I work to a  frame size of 1400 x 1050 pixels to match the SXGA+ native resolution of my preferred projector (avoiding rescaling and loss of resolution in the projector). The size of my AE Footage image (in this case) is 5139 x 5433 to allow me to move my 1400 x 1050 frame around the footage to simulate camera movements. In the case of the "dolly in" towards the wall in my .vpe 3D set, 1400 x 1050 original pixels is the extreme limit of the movement beyond which I cannot go without interpolation and loss of resolution.

                             

                            So to rephrase my question, with apologies for lack of clarity first time around, what would be a realistic limit to the pixel count of my footage image given the limitations of my system: 2.26GHz Quad-Core, 16 GB RAM and fast RAID ?

                             

                            There should be no problems in such a case. In any case, just leave a couple of CPUs free in Memory and Multiprocessing, so that the other instances have more memory available to them.

                             

                             

                             

                            (I've just ordered CS4, even though CS3 is more than adequate to my "aesthetic" needs, as I believe it offers better management of multiprocessing – and in the hope it will make my OpenGL problems go away.)

                             

                            Multiprocessing in CS4 should be better, not worse. Sometimes "better" means taking a more conservative approach

                            In CS3, MP was more an "all or nothing" kind of thing, even if people used a buried text preference to turn off some cores. There are now officially supported management options for users.

                            • 11. Re: Vanishing Point Exchange - How to place the camera ?
                              Adolfo Rozenfeld Adobe Employee
                              PS - (vis-à-vis the four-step camera placement) - when I select the (new) camera, no camera diagram appears in the top view, not even at 1.5%, and not even the point of interest.

                               

                              Yes, this is also a consequence of the 3D AE camera having some extreme position values, which put it outside the POV of the top view.

                              So, you could add a couple of steps before 1), which would be:

                               

                              • Create a Null Object (Layer > New > Null Object).
                              • Select the position and orientation properties for the VP plane you used as reference. Copy them and paste them into the null object.
                              • Parent all VP planes to the Null object.
                              • Reset all transform properties for the Null object.
                              • Perform the other 4 steps mentioned in the other message.

                               

                              Just to make it clear, what we are doing is moving all VP planes to the center of the AE 3D scene, then create the camera.

                              • 12. Re: Vanishing Point Exchange - How to place the camera ?
                                Victor Burgin Level 1

                                Again, very many thanks for your generosity with your time and attention.

                                 

                                < Multiprocessing in CS4 should be better, not worse. >

                                 

                                That's exactly what I meant. Having spent endless hours with CS3 and my new 8-Core Mac, troubleshooting crashes on scrubbing and rendering, I finally threw in the towel and ordered CS4 in the hope that the problems would go away. I received and installed CS4 yesterday and things just seemed to get worse!

                                 

                                I've read and reread everything I can find online - especially Adobe's own OpenGL troubleshooting advice (yes, with CS3 I did find the undocumented feature of limiting core use in the Prefs file - it didn't help). The only way I can get any work done now, in CS4, is with the OpenGL plug-in out on the desktop, and Render Multiple Frames Simultaneously turned off - so the very things that should be helping me work faster are driving me nuts.

                                 

                                I do want to get back to you when I've had time to fully explore your ideas about working with .vpe - but for the moment I'm just trying to limp through to my deadlines with whatever compromises and workarounds I can concoct.

                                • 13. Re: Vanishing Point Exchange - How to place the camera ?
                                  yenaphe Level 4

                                  Well as Adolfo said, you have a 4gb per process limitation because AE is a 32bit app. The way AE render engine works needs to fit your elements in one cotnius space in Ram. If your frame fail to be loaded into ram, export will fail.

                                   

                                  Now back to this 4gb limitation. In MacOs AE can access up to 3.5gb of Ram, and in Windows up to 2gb of Ram because of the way the OSes works. This amount is per process, and you can go up to 3gb in Win if you use a special argument in boot.ini (search google for /3gb)

                                   

                                  Now, it's easy to calculate if your image size will fit to ram. What AE does is decompressing your footage into ram, so each pixel is uncompressed, in order to calculate the final output. A pixel has 4 channels of data, R,G,B & A, each channel taking 8bit, 16bit or 32bit. That means that a single pixel takes from 32bit to 128bit of memory uncompressed.

                                   

                                  Now take your input dimension, 5139 x 5433 and multiply it by 4 for the 4 channels, and then by the bit depth of your project:

                                   

                                  in 8bit 5139 x 5433x4x8 = 893 445 984 bits = 0,8Gbits

                                  in 32bit 5139 x 5433x4x32 = 3 573 783 936 bits = 3,3Gbits

                                   

                                  As you can see, 1 frame takes a very large amount of ram, and this is without any effects applied. In 32bit your render will surely fail.

                                   

                                  You also have to take into consideration that during the render, AE also caches data to render faster, and this cache also takes space in Ram.

                                   

                                  So unless AE becomes a 64bit app in the futur your huge amount of ram won't help to go beyond this problem as long as AE will stay in 32bit

                                   

                                  Seb

                                   

                                  PS: if you enable multiprocessing AE can use most of your ram, but will still be limited to 4gb max per processes.

                                  • 14. Re: Vanishing Point Exchange - How to place the camera ?
                                    Victor Burgin Level 1

                                    Thanks Sébastien

                                     

                                    Si je vous ai bien compri (je suis nul en maths):

                                     

                                    1) The frame size is not really the issue, the size of the footage image is the problem.

                                     

                                    2) AE in Mac OS has either a 3.5gb or 4gb per process limitation (you cite both figures, I'm a little confused there).

                                     

                                    3) If I work in 16 bit (staying with the present example):  5138 x 5433 x 4 x 16 = 1 786 544 256 bits = 1,66 Gbits

                                     

                                    4) So shouldn't my 1.6 Gbits fit into the 3.5gb space OK ? (OK x 8, if I understand "3.5gb" as bytes rather than bits)

                                     

                                    What am I missing?

                                    • 15. Re: Vanishing Point Exchange - How to place the camera ?
                                      yenaphe Level 4

                                       

                                      1) The frame size is not really the issue, the size of the footage image is the problem.

                                       

                                      2) AE in Mac OS has either a 3.5gb or 4gb per process limitation (you cite both figures, I'm a little confused there).

                                       

                                      3) If I work in 16 bit (staying with the present example):  5138 x 5433 x 4 x 16 = 1 786 544 256 bits = 1,66 Gbits

                                       

                                      4) So shouldn't my 1.6 Gbits fit into the 3.5gb space OK ? (OK x 8, if I understand "3.5gb" as bytes rather than bits)

                                       

                                      What am I missing?

                                       

                                      1) Tout a fait

                                      2) 4gb est la limite hardware. Mac os a besoin d'un peu de ram, d'où le 3,5gb

                                      3) C'est ça

                                      4) Oui.

                                       

                                      english:

                                       

                                      1) yes

                                      2) 4gb is the hardware limitation of 32bit adress space, 3,5 is the software limit due to MacOs needing some ram to run

                                      3) yes

                                      4) yes

                                       

                                      The ram needed can increase if you are using memory incentive effects such as keylight for exemple.

                                      • 16. Re: Vanishing Point Exchange - How to place the camera ?
                                        Victor Burgin Level 1

                                        So, according to the calculations, I should not be having any problems !?

                                         

                                        Effects are not really an issue, as in most cases I use AE only to add movement to still photographs. I have tried reducing the image size by 50% and working has indeed become a lot easier - but this limits the length of my dolly track! If the maths won't cut it then I suppose that trial and error alone will tell me what the maximum viable file size will be.

                                         

                                        Now I'll go back to the OpenGL troubleshooting documents but working with a smaller file.

                                         

                                        It's been enormously helpful to have the footage-size issue pointed out to me, as I had ignorantly supposed that frame size was the only significant factor. Thanks again.

                                        • 17. Re: Vanishing Point Exchange - How to place the camera ?
                                          Victor Burgin Level 1

                                          PS - for anyone out there following this (which has drifted off topic) - check out the recent posts about the RAM issue from Sébastien and Mylenium