Announcement

Collapse
No announcement yet.

Focal legth vs Aspect ratio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Focal legth vs Aspect ratio

    You know how when you change the aspect ratio of the rendered image the maginification in the viewport changes.

    Well I HATE that. So I thought what is the relationship:
    this is my raw data:
    ASPECT FL
    0.104 637.500
    0.208 346.600
    0.417 181.805
    0.625 122.805
    0.833 92.805
    1.000 77.705
    1.333 58.805
    2.000 39.200
    4.000 19.700
    8.000 9.860

    I have establisther there is a hyperbolic relationship

    But Its a polynomial and I cannot figure it out.
    Anyone do better than: FL = 66/AR ?
    which almost works, but bloody well doesnt
    Raj

  • #2
    I don't think there is a relationship between the two.

    The focal length will not change when you adjust the aspect.

    The aspect is just croping or revealing more or less of the image top and bottom ONLY.

    You could think of focal length as the field of view (or angle) horizontally, this does not change.

    If you want to see more horizontally you either have to move you camera back, or increase the viewing angle (by decreasing the lens length). - the aspect or image size does nothing

    If you want to see more vertically you can do the above, OR change the height of the image size.

    But changing the size of the image horizontally does nothing for what you see as this is fixed by the lens length.

    Hope that is a bit clearer.
    Last edited by bob-cat; 02-02-2011, 06:15 AM.

    Comment


    • #3
      Ok I thought I would illustrate my point

      These are all test renders with no cropping.

      for Aspect ratios > 1 the image is cropped
      for aspect ratios <1 the subject in the image is shrunk.
      when framing an image for render I don't want more stuff in the vertical field if I use a narrower aspect. I want the subject the same pixel size, but the image to be narrower.
      in all of these the focal lenght of the camera and ints position is unchanged.
      Raj

      Comment


      • #4
        No, all your images ARE the same, but if you render a smaller image......well of course your subject is going to "appear" smaller because your image size is smaller?

        You need to keep the larger (of the width or height) image dimension the same when changing the aspect ratio.

        eg.....Render a 1200 wide x 900 high image = 1.333 Aspect - Then render a 1200 wide x 600 high image = 2.0 Aspect

        Overlay them in photoshop, you will notice the top and bottom croping of the apect 2.0 image, but the horizontal field of view (or zoom) is exactly the same.
        Last edited by bob-cat; 02-02-2011, 06:17 AM.

        Comment


        • #5
          when I am framing I want the subject to stay exactly the same pixel size.
          when the aspect ratio of the viewport is greater than the aspect ratio of the rendered image the subject is cropped
          when the aspect ratio of the viewport is Less than the aspect ratio of the rendered image subject is shrunk

          I want it so that in both situations the image is cropped.


          I have found the answer:
          Code:
          getScreenScaleFactor <point3>
          the technique is this: set the rendered aspect ratio to the viewport aspect ratio.
          measure the screen scale factor of the target of a targeted camera
          change the aspect of the rendered image. If it is greater than the viewport - no problems.
          if it is less, recalculate the screen scale factor and divide this number by the original scale factor from above. Multiply the focal length of the rendering camera by this number and voila.
          It works.
          when you shrink the screen horizontally the subject will remain the same pixel size and be cropped out rather than shrunk.

          Unfortunately this will change with every movment of the camera so I might have to set up a scripted controller that will change the base value for each movment of camera. But generally with framing, I rarely move the camera. A rotation will not affect the result. Its not easy rotate a targeted camera though.
          Raj

          Comment


          • #6
            Ok, now I understand, your just talking about the viewport........thought you were talking about the rendered image as in hit render.

            Comment


            • #7
              Maybe Overscan script can help you:
              http://scripts.breidt.net/#overscan

              The bad news is it doesn't work with VRayCam :/

              Comment


              • #8
                Originally posted by Codi View Post
                Maybe Overscan script can help you:
                http://scripts.breidt.net/#overscan

                The bad news is it doesn't work with VRayCam :/
                Yeah bummer about no vray cam but a simple workaround... With a vrayCam view active but not selected, press "p" for a perspective view, then Ctrl 'C' to make a new standard camera-->run the script then run lele's physicalcam converter and your back in business (of course you may need to set exposure, DOF, etc).
                www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

                Comment


                • #9
                  I actually got it working pretty well, but you have to select an arbitrary point in space in front of the camera rather than the targetobject. so you can set a vector say [0,0,-50] (along z axis of camera) and mulitply by the camera transform matrix. Using this method means that he screen scale factor doesn't change with movement of the camera. It does change with changes in focal lenght and therefore has to be recaclulated. You can write a scripted controller to connect the 2 but you can completely stuff up the view port with these settings so I thought it a little dangerous.
                  Raj

                  Comment

                  Working...
                  X