Understanding Zoom, Field of View, focal length, cameras and CAD

Started by prl, November 02, 2014, 01:39:54 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

prl

Quote from: Dean on November 06, 2014, 09:16:54 AM
In Cad, there must be a defined (calculated) space, correct

Not sure I follow.  Generally I am assuming that CAD and whatever it is displaying is simulating a camera. So far I've identified the three camera variables above.  Two exist in SketchUP, three in C4D, and I'm still thinking about how many we have in DesignCAD.

Maybe you mean that wherever the camera is positioned in 3d space and whatever it is looking at in 3d space with whatever camera zoom level and camera lens size is ultimately cropped onto a film plate which for us is the screen.

Dr PR

Damn this &*%$%^ forum! I just spent 30 minutes typing a discussion of depth of field and suddenly it disappeared - it has happened once too many times and I may never try to answer a complex question again!!!!!!!!!!

AAAArrrrrggggghhhhhhh!

That kicks you back to the page before you started the post, and you can't get back! If you click "Reply" you start over with a blank post.

I think it happens of you hit a numeric keypad key with Num Lock off! It is horribly poor design in the forum software!

Phil
DesignCAD user since 1987

Dr PR

OK, take a deep breath and open Notepad. Copy everything to Notepad while you type so if the *&^%$@! forum software blows away everything you have spent the last 30 minutes typing you have a backup copy.

If Simple Machines had programmers with more intelligence than chimpanzees we wouldn't have to do this!

Phil
DesignCAD user since 1987

prl

Quote from: Dr PR on November 06, 2014, 01:48:13 PM
OK, take a deep breath and open Notepad.

Sorry Phil.  Didn't realize this also happens to you. Thought it was just me. For long posts, I open NotePad first (actually PsPad), and type everything there, then copy to the forum message box.

Dr PR

prl,

Look at the attached image (blue-eyed grass, or Sisyrinchium angustifolium).* Notice how you can see tiny hairs at the ends of the petals on the left and right? Notice how the tips of the petals closer to and more distant from the camera are a bit blurry? This is an example of "depth of field." In real world cameras everything from zero to infinite distance from the lens will not be in focus. Only part of the space in front of the camera will be in focus - and that is the depth of field. That's the "executive summary."

In CAD everything in the drawing is always in focus.

If that's all you need to explain depth of field you can skip the rest.

****

Now, about depth of field in real world cameras. It is an extremely complex function of:

Film speed
Available light
Lens optics
Aperture
Shutter speed

1. Film speed. This is a measure of how much light (time) it takes to make a properly exposed picture. Different films had different exposure requirements. These were rated as ASA or ISO numbers. Larger numbers were "faster" films, meaning they could capture images quicker than low number "slower" films. However, larger numbers also meant the film was grainier - meaning that they had lower ability to resolve very tiny details.

Electronic imaging elements have similar problems and also have ASA/ISO ratings (larger numbers are better - and more expensive). Some technologies can capture light faster than others. The "film speed" influences how fast the subject can be moving without getting a blurred image. It also influences all of the other factors mentioned above. Electronic sensors also have a "graininess" but we call the grains pixels, and the more pixels the sharper the image will be (and more expensive).

It takes a finite amount of time to generate an image with real world film/electronic sensors, and that influences everything else about making photographs.

In CAD we are concerned only with the number of pixels in the image. This influences image clarity, but it also influences how long it takes to create an image. Fortunately, in all other aspects CAD has infinite film speed.

2. Available light. Obviously, you can't take pictures without light. But the amount of light available, and the "film speed" determine the necessary lens settings, and this influences just about everything else. Basically, more light is better.

In CAD we essentially have infinite available light so we don't have to worry about it.

3. Lens optics. Real world lenses are not perfect. There is light loss and image distortion to compensate for. Lenses are rated for their ability to gather light and focus it on the imaging element. This is expressed as an "f number" such as f1.2. F3.5 or f2.4-4.5 for a variable focal length (zoom) lens. As you might guess, the longer the focal length the less light gathering capability if all other things are equal. To increase the light gathering ability the size of the glass lens elements are increased. Telescopes work this way, so a 200 inch telescope can collect more light than a 2 inch telescope in the same amount of time under the same conditions.

The f-stop of a lens influences how long it takes to gather enough light to properly expose the imaging element. This depends upon the ASA/ISO of the imaging element. Lower f-stop numbers are better. Of course, lower f-stop means higher cost.

4. Aperture. Inside camera lenses there is a thingy with a bunch of overlapping leaves that can slide over each other to reduce the diameter of the opening through which light passes on the way to the imaging element. This is called a diaphragm. The size of the opening (aperture) can be adjusted to control the amount of light falling on the imaging element to get a perfect exposure. This depends upon the ASA/ISO of the imaging element.

Lenses have a maximum aperture when the diaphragm is fully open. This is the minimum f-stop rating of the lens. As the aperture is closed (stopped down) the f-stop  number increases. The minimum aperture size determines the maximum f-stop for a lens. So a lens may be rated as f1.2 with the aperture wide open and f16 with the aperture as small as possible with the lens design.

Again, the aperture is adjusted so that with the amount of available light just the right amount of light falls on the imaging element to get a correct exposure.

5. Shutter speed. This is the amount of time the imaging element is exposed to light. Obviously, with film you couldn't allow light to fall on it all the time or it would soon be overexposed and not be exposed correctly at the moment you wanted to take a picture. Electronic imaging elements work the same way. Each pixel accumulates enough photons to generate the proper voltage for correct exposure. After taking a picture they must be "cleared" to prepare for the next picture.

The shutter is normally closed to prevent unwanted light from exposing the imaging element. The shutter is opened for the correct amount of time to allow enough light to fall on the imaging element to produce a correct exposure. This depends upon the ASA/ISO of the imaging element.

Slower shutter speeds allow longer exposures to bring in more light for a good exposure where the available light is low. For brighter scenes the shutter speed is shorter to limit the amount of light to get a good exposure.

Shutter speed also influences the sharpness of the image when the subject is moving. Longer shutter speed cause a blurrier image, so for fast moving subjects you need a shorter shutter speed (faster shutter). Faster shutters are more expensive.

****

Now, what does all of this have to do with depth of field?

Camera lenses have a minimum focal distance. Anything closer to the lens than this distance cannot be focused correctly onto the imaging element and will be blurred. For example, I have a 105 mm macro lens that can focus down to about half a foot. My 18-70mm zoom lens can focus down to about a foot, and my 70-300mm zoom lens has a minimum focus distance of four feet.

All lenses have a maximum focal distance of infinity.

This is a limitation of all real world lenses. Fortunately our CAD "lenses" are perfect and everything in the drawing is focused correctly.

Lenses have a focusing ring to adjust the focal distance from the lens to the subject. All lenses have a "sweet spot" where the light from a subject is focused perfectly (more or less) on the imaging element - this is called the focal point. Everything in the scene closer to or more distant from the focal point is blurred to some extent. The farther from the focal distance the greater the blur. The real world distance from the shortest distance to the longest distance that is in focus is the depth of field.

In the attached image the focal point is on the yellow flower parts at the center in order to get as much of the flower in focus as possible. The flower is about 5/8 inch or 15 mm across, and the depth of field is about 1/2 inch or 12 mm. Focal distance was about 6 inches, the minimum for the macro lens. Under the given lighting and wind conditions this was the best depth of field I could get.

The minimum image resolution of the imaging element determines what is or is not blurred. Basically, where details of the image are smaller than the pixel size the image is considered in focus. Where details are larger than the pixel size it takes multiple pixels to capture the details so the image isn't as sharp - blurred. So in CAD we increase the pixel count to minimize the relative size of the "jaggies" in the picture.

Camera lens depth of field changes as the focal point is changed. When focused at infinity the depth of field is greatest, but objects at the minimum focal length won't be in focus. As the focal point is adjusted closer to the lens objects at infinity become blurred and closer objects come into focus. At the minimum focal distance the depth of field is shortest.

Now take a deep breath.

As the f-stop increases (smaller opening) the depth of field increases. So at maximum f-stop (minimum aperture) you get the greatest depth of field possible. At maximum aperture opening (minimum f-stop) you get the shortest depth of field. This is true at all focal distances.

So to get the greatest depth of field we stop the lens down to the minimum aperture. This reduces the amount of light getting to the photo element, so we increase the time the shutter is open (slower shutter speed) to get in enough of the available light to properly expose the picture. But slow shutter speeds mean the subject can't be moving or the picture will be blurred. And the total amount of light needed to correctly expose the picture depends upon "film speed" or ASA/ISO rating of the photo element.

****

This is why some people make great pictures (they understand this stuff) and others don't (they don't understand).

Be thankful that modern cameras have an automatic exposure mode that adjusts f-stop and shutter speed to match available light and expose the picture correctly. They usually have several operating modes to adjust the camera settings to match the needs of the picture for the existing lighting conditions. For example, a "flower" mode will adjust to get the best close-up depth of field, and a "sports" mode will adjust for the fastest shutter speed to capture images of fast moving objects.

But these preset modes will not always match the needs of the picture. The better cameras allow the user to override the automatic settings to select shutter speed, f-stop and even ASA/ISO of the photo element. But you have to know how this all works to get good pictures.

Got it? Simple, isn't it? NOT!

Phil

* Or whatever the taxonomists are calling it today.

DesignCAD user since 1987

Dean

Quote from: prl on November 06, 2014, 01:15:37 PM
Quote from: Dean on November 06, 2014, 09:16:54 AM
In Cad, there must be a defined (calculated) space, correct

Not sure I follow.  Generally I am assuming that CAD and whatever it is displaying is simulating a camera. So far I've identified the three camera variables above.  Two exist in SketchUP, three in C4D, and I'm still thinking about how many we have in DesignCAD.

Maybe you mean that wherever the camera is positioned in 3d space and whatever it is looking at in 3d space with whatever camera zoom level and camera lens size is ultimately cropped onto a film plate which for us is the screen.

The chess set drawing is a good example
The "point of view" sets the film plate and the "distance of view" adjusts the focal length. It's that delicate balance between the two ,in Cad.
The "fly by zoom in" defines the distance without distortion. It hits the film plate.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

prl

Dean, thanks for joining in and as always adding to an exciting discussion (well at least for me).  So using the three camera terms I know of,  camera position, camera lens setting (camera zoom, perspective depth, focal length, field of view, whatever you want to call it), and aperture width, what would "fly by zoom in" mean in terms of those settings?  Is there a fourth optics parameter I'm not understanding?  Maybe something only CAD can do and not real cameras with lenses?

Phil,  holy educational cow!  Thanks.

Now back to Lar.  In your C4D graphic,  can you post a couple of screen shot comparisons of what happens when you adjust the aperture width dialog but leave the field of view setting at 60 degrees.


Dean

Watch closely, https://www.dropbox.com/s/rfnna8bmqjzy5u9/Fly%20by.wmv?dl=0

I'm moving the mouse forward then back with >left click Ctrl +Shift and "fly by" enabled. There's a "defined" space. I basically hit a wall. I can't move past it.
Not seen in the video,with "fly by" off, I adjust the 'focal length' Then the "point of view" changes.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

Lar

Quote from: prl on November 07, 2014, 04:31:10 AM
Now back to Lar.  In your C4D graphic,  can you post a couple of screen shot comparisons of what happens when you adjust the aperture width dialog but leave the field of view setting at 60 degrees.
Well, Prl, while you were posting I was preparing the attached images.
The first is a page from C4D's manual on cameras. The 2nd is my drawing explaining the relationships between the 3 camera properties in question. What it boils down to is that changing the A/W changes the FOV without changing the F/L (so what you request is not possible). What result this has on the perspective/distortion of the image I will have to investigate later.

The A/W control seems to be unnecessary in CAD but C4D goes overboard with everything, which is cool and can be very educational but can also be very daunting.

Lar

prl

Thanks Lar.  I love the explanation from the C4D manual.  And your graphic is great. 

So now back to Phil,  he mentions focal distance, the distance from where the blue lines cross (what is that called?) to the focal point (the sweet spot) or should it be focus point of the object in the distance.

prl

I guess I'm still getting tripped up with camera terminology.  Is the point where the two blue lines in your graphic (or red lines in the graphic below) cross called the focal point or first or second point of convergence or what?  Phil, help!!!! And what is the distance from the crossing lines to the object "sweet spot" focus called.  Darn all these terms.  A wordologist's job security.



compared to this graphic.  No wonder I'm confused.  Will the real focal length please take a bow.




edit: Believe it or not guys, I will tie this all back to DesignCAD and the perspective depth buttons once I understand it.

prl

Dean, okay. I've watched your videos.  You're on to something though I suspect it has something to do with the DesignCAD Theory of Parallel Visibility topic where we were exploring clipping planes, view centers,  etc. 

So far I haven't been able to understand where the camera is when all that clipping occurs.  When you back out, it looks like the camera is backing out so it isn't a perspective depth parameter in the sense of a camera lens zoom. 

Still thinking about all this.  Anyone else care to add their "perspective".   :) And of course I borrowed that from Dean.  It "lenses" itself to the topic.


prl

Dean (or anyone else), do you understand what DesignCAD is doing in the movies you made??

Questions:

1.  For the "easy over" movie, remind me.  Are the objects moving and the camera is stationary or the objects stationary and the camera is moving?  In many of the "Star War" trick movies I made, the objects are stationary and I'm manipulating the camera position and where it is looking.

2.  For the "fly-by", looks to me like the camera is moving between clipping planes.  Is there a way to know where the camera is?

Dean

Yes, I know what's happening..
"Over easy" was created only with camera's using the walk through animation tools.
"Fly by" was displaying the movement of the camera in a predefined "space".
"view point" sets the film plate or "space" look closely at what I did in that video
Hit "Y" left click and hold Ctrl+Shift > move mouse up the screen then down = "focal length"
Hit "Y" enable "fly by" left click and hold Ctrl+shift  . move mouse up the screen then down = "walk in"
Other 3d programs do all of this automatically .
What works now, for this scene might not work the same after making minor changes in the "edit user define views window" or the view toolbox and or zooming with the mouse. It's best to create and save camera's or views. V24, first build, is all screwy with views not saving or jumping around..


Sorry, :)I had to add this,it was on my mind :)
Remember the old classic "Abbott and Costello' routine "who's on first" This thread just might be headed that way.
Costello says "Hey Abbott!, I just got this new camera, what is Zoom?
Abbott says "It depends on the Zoom"
Costello says "But I don't know what the Zoom is"
Abbott says   "If you don't know what the zoom is, then how can I tell you what the zoom is
Costello says "But I thought you knew what Zoom was"
Abbott says  "I do but it depends on the zoom"
Costello says  "The guy at the camera store said  that I can Zoom with this camera"
Abbott says  "Yea, but what kind of zoom is it"
Costello says " Here, you take the picture"


DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

prl

Quote from: Dean on November 07, 2014, 11:32:39 AM
"Over easy" was created only with camera's using the walk through animation tools.

Never did warm up to DesignCAD's animation tools. Remind me, objects moving or camera moving?

Quote"view point" sets the film plate or "space" look closely at what I did in that video

You're using some different terminology and/or concepts than I've currently got stuck in my mind.  You're trying to show me something that I'm not understanding.  Give me a bit to digest this.  Remember, I have a one track mind and you're on the adjacent track. Sometimes I wake up in the middle of the night and say, of course.  Lar does that to me too.