DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

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 07, 2014, 11:32:39 AM
Remember the old classic "Abbott and Costello' routine "who's on first" This thread just might be headed that way.

Dean, this will frighten you.  You're really starting to think like me.  I did a version of this in the beta forum lampooning the solid surface solids versus the solid surface surfaces.   And I was just scratching the surface trying to find some solid entertainment . . . .

Dean

Quote from: prl on November 07, 2014, 12:11:53 PM
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.


You can't move objects in "Walk through mode", only make camera view adjustments.
I used your term 'film plate" (from an early post in this thread) I thought you would understand.
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, 12:31:27 PM
I used your term 'film plate" (from an early post in this thread) I thought you would understand.

Got you with that term.  Do you consider the camera is positioned at the film plate or at the lens or at the convergence point.  Remember I've got a few questions out to Phil and Lar asking them to clarify the graphics in reply #40, since the two graphics say different things.

prl

Dean,

I'm trying to link the camera terminology Phil is explaining and the less than concise DesignCAD terminology. 

In DesignCAD we use the words "view center" and "target position" which is what I'm asking Phil to tell me what that is in camera speak. It is the point at the end of the focal distance, specifically the point we are looking and focused at in 3d space. It is that 3d x,y,z point that DesignCAD will orbit the camera about.

In DesignCAD we use the words "viewer position" to mean camera position which is suppose to represent our eyes.  That point, our eyes or the camera is also called a point of view.




Dean

Yes, I see :) and all of this changes with different camera settings. Look at the advanced camera tools in sku.
Working with Dcad
I think our eyes, as we are looking at the screen is the sensor
The "view point" = this sets two things 1) the calculated area (film plate) 2) Camera lens
In view mode hold left click drag forward while depressing Ctrl+Shift is adjusting "view distance" lens (focal length perspective) within the "calculated area"
In view mode, hold left click drag forward while depressing Ctrl+Shift with "fly by"on  is you "walking in "with the camera while maintaining  the pre defined calculated perspective view.
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

Now consider the button you're clicking in the fly-by movie.  The button has the following command:

Set viewer position by view center

Doesn't that mean, put the camera directly on what it is looking at.  In other words, put your eyes directly in contact with the item you are looking at?  The distance between camera and target = 0?  Not sure what that means.

samdavo

Herewith a comment from the peanut gallery.
I was trying to avoid reference to cameras or lenses  (certainly avoiding multiple lenses), and stick instead to :-
2 point perspective, or maybe
"3 point perspective" (= 2 point perspective with scene rotated about x axis  because you are looking up or down) ,  (i.e. where tall buildings can apparently taper when you look up towards the penthouse).   

as defined on wiki, viz:-
http://en.wikipedia.org/wiki/Perspective_(graphical)

If anyone remembers geometric drawing from school days, there was
1. a picture plane (eg A4 or A3), (edit) always perpendicular to line of sight - compare sitting in optometrist chair with head and eye locked in direction - and a tracing plane in front of your eye.
2. a distance to said picture plane,
3. and a distance to object. 
4. I believe there is also the option (edit) of rotating the rectilinear scene relative to the viewer and picture plane.

I believe that relative ratios of these dimensions determine both zoom and field of view.
So I drew a tall yellow building beside a long green building.
The green building correctly tapers (smaller) in the z-direction-distance.
However the yellow skyscraper tapers larger (??) in the y-vertical-distance.

My conclusion is that DCAD is (or can be) extremely approximate,  especially with close view distance. (edit) and/or poorly chosen view centre.


PS This is what that wiki website says - interesting that they add the rider [dubious - discuss]  - sounds like they are as confused as we are, lol.
QuotePresent : Computer graphics[edit]
CAD software, and some computer games (especially games using 3-D polygons) use linear algebra, and in particular matrix multiplication, to create a sense of perspective.

The scene is a set of points, and these points are projected to a plane (computer screen)[dubious – discuss] in front of the view point (the viewer's eye). The problem of perspective is simply finding the corresponding coordinates on the plane corresponding to the points in the scene. By the theories of linear algebra, a matrix multiplication directly computes the desired coordinates, thus bypassing any descriptive geometry theorems used in perspective drawing.[dubious – discuss].

That website also has an example of Sketchup having only 2 point perspective ( or more correctly horizontal-line-of-sight-2-point perspective), i.e where all vertical lines are parallel in the drawing.

For the vertical perspective, they claim this is 3-point perspective; 

(edit) Best description :-
QuoteOne-point, two-point, and three-point perspectives appear to embody different forms of calculated perspective. The methods required to generate these perspectives by hand are different. Mathematically, however, all three are identical: The difference is simply in the relative orientation of the rectilinear scene to the viewer.

Dean

Quote from: prl on November 07, 2014, 01:38:48 PM
Now consider the button you're clicking in the fly-by movie.  The button has the following command:

Set viewer position by view center

Doesn't that mean, put the camera directly on what it is looking at.  In other words, put your eyes directly in contact with the item you are looking at?  The distance between camera and target = 0?  Not sure what that means.
Yes, In Dcad terms (view point) the"0" does make sense. It defines the range of the fov.
The hold Left click drag up+down the screen with mouse with Ctrl+Shift depressed clearly displays this.
i'm going to call the mouse movement "Fov" from now on, ok :)
And "Fov" with "fly by' enabled makes sense too. The camera is moving.
We could be looking at this from two different  :)angles. 
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, 02:50:49 PM
Yes, In Dcad terms (view point) the"0" does make sense. It defines the range of the fov.

You're going to have to explain that.  Mathematically the thing you are looking at and your eyes are at the same point, so there can be NO fov.  You have defined a singularity.

And to add,  the fact that we see anything means DesignCAD isn't honoring either the viewer position or the target position. 


Edit:  and since we are all tripping over DesignCAD terminology, the following all mean the same thing and same point in space.

viewpoint = point of view = camera position = your eyes = viewer position

samdavo

Quote from: prl on November 07, 2014, 03:05:44 PM
Edit:  and since we are all tripping over DesignCAD terminology, the following all mean the same thing and same point in space.

viewpoint = point of view = camera position = your eyes = viewer position
weird though, that "view centre" is something else (and needs to be set carefully in DCAD).
i.e. Herewith the same building that was distorted above (when view centre was near the green building) ... but if I select the red sign on the penthouse of the tall building as "view centre", then at least the vertical taper behaves itself. 

But clearly the eye (= "camera position") is opposite the third-point of the high building, i.e. is not at the level of the penthouse.

PS What I have done is set "view centre" on that red sign - followed by :-
a. rotating the view angle (so that I am looking up at that sign from -15deg to it),
b. zooming, (for better framing), and
c. panning down (ditto).

In the extreme case, you don't even need the "view centre" to be included in the "field of view / picture frame" (?)    I'm sure this makes sense to the experienced players here, but it is nonetheless difficult to fully grasp for a 3D-newbie like me.

prl

Quote from: samdavo on November 07, 2014, 03:33:43 PM
weird though, that "view centre" is something else (and needs to be set carefully in DCAD).

In DesignCAD, "view center" means the point in 3d space about which DesignCAD will spin the camera when you hit the "set view", aka orbit command.  And since it is the point you are looking at and is also called, target position, target point, etc. I am wrong.  DesignCAD will maintain the view center or orbit the model even though I can pan the drawing off the screen.  In other words, I'm looking at an empty screen but the view center is off the screen.

Here is a routine to set it with a single point.  They start your orbit command.

'Program: vch.d3m (view center here)


if sys(1) = 0 then
  Setpoint "Set a point to for view center . . ." 1
  if sys(1)=0 then end
endif 
 

>SetViewerPoints
{
  <Usepresetpoints
}

sys(1)=0


end

Dean

Quote from: prl on November 07, 2014, 03:05:44 PM
Quote from: Dean on November 07, 2014, 02:50:49 PM
Yes, In Dcad terms (view point) the"0" does make sense. It defines the range of the fov.

You're going to have to explain that.  Mathematically the thing you are looking at and your eyes are at the same point, so there can be NO fov.  You have defined a singularity.

And to add,  the fact that we see anything means DesignCAD isn't honoring either the viewer position or the target position. 


Edit:  and since we are all tripping over DesignCAD terminology, the following all mean the same thing and same point in space.

viewpoint = point of view = camera position = your eyes = viewer position

Your "eyes" are the sensor, they are not all at the same point.
In this video  https://www.dropbox.com/s/71aggj0d879tnal/Target%200.wmv?dl=0
There's a noticeable target "0', at first I'm changing the perspective then with 'fly by" enabled I'm walking with my camera and after I hit target "0" I can't go any further.
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

samdavo

Quote from: prl on November 07, 2014, 03:42:07 PM
Here is a routine to set it with a single point.  They start your orbit command.
Thanks.
I was using another of your macros, very similar ( i.e. vct) to set the red sign as the centre.  But vch.d3m looks even better.

Quote' Program: vct.d3m (view center this)

sys(1116)=0

if sys(80)=0 then
  Message "Nothing selected. . . press any key to continue"
  END
end if

x =(sys(196)+sys(198))/2
y =(sys(197)+sys(199))/2
z =(sys(200)+sys(201))/2

>sethandle
{
<Type 0
<pointxyz [x,y,z]
}

>SetViewerPoints
{
<pointxyz [x,y,z]
}
sys(1)=0

>setview
{
}
end

Moving on, herewith two views of that skyscraper, one a reflection of the other in an imaginary pool.  (- in truth it is simply the same boxes mirror-copied about the XZ plane).

In both views, the red penthouse sign is the view centre,  - vertical view angle for the top one is -15deg,  and for the bottom one +35deg.  (2 cents).

You end up with a taper both up and down :) - Can any other programs do that?

All I need now is a way to get rid of the "DCAD margin/border" around the views.

PS
Dean,
thanks for those posts and movies - plenty of study required to get to your level of skill ( or prl's or lar's or phil's for that matter) :)

samdavo

Quote from: prl on November 07, 2014, 03:42:07 PM
In DesignCAD, "view center" means the point in 3d space about which DesignCAD will spin the camera when you hit the "set view", aka orbit command.
prl et al,
I note that "view center" also determines the taper of vertical lines - (and is not just the orbit point).
i.e. the difference between the distorted view above (reply #51) and the "undistorted" one (reply #54) tapering slightly as it rises is that the view center is changed.

Putting that another way - in reply #57 I show the building and its reflection tapering up and down respectively - where the view center in each view is the red sign at the penthouse.   If I separate those views (see attached) you will note that vertical lines taper out from the "view center" in each case (shown circled).   Not only that, but the yellow block nearest the view center in each case is compressed vertically compared to the other.

As I understand it, SKU would make vertical lines parallel in perspective view (?) and probably without those compression effects (?) 

(edit) I suppose all those tapers make sense (to a point) when you consider that the left-hand view is looking up at 15deg to the "view centre" (believe it or not !!);

and the right-hand view is looking down at 35deg to its "view centre" (ditto!).     

What is disconcerting imo, is that the taper continues beyond the "apparent horizon line".


I am guessing (proven in second jpeg) that the way to get parallel vertical lines
(when seen in perspective)
is to set the view centre on the apparent horizon line, (and centre of frame)
and have a vertical view angle of zero  (2 cents)

Dr PR

prl,

Sorry, there are too many different discussions mixed up here for me to be able to make much sense of it. And a lot of it is irrelevant.

You asked something about blue lines crossing that makes no sense to me.

The use of the word "aperture" in Lar's CD4 example doesn't make any sense to me - at least in camera terms. However, I do see what they are trying to do. They are creating an artificial depth of field, but it doesn't work that way with cameras. It doesn't show things outside this field. With cameras things in view that are not within the depth of field are still visible, but are blurred.

Also, I have avoided saying anything about how cameras work inside - especially the optics. This is entirely irrelevant for CAD. When I talk about focal distances I just mean how far  from the front of the lens.

When I talk about "focal point" or "sweet spot" I mean the place in the field of view of the camera where the image is best in focus with the current camera settings. This has nothing to do with the objects in the field of view. The camera can be adjusted so none of the objects are in focus, but it still has the "sweet spot." It is the job of the photographer to adjust the camera so the sweet spot coincides with  the object to be photographed so it is in focus in the picture. Again, this is irrelevant to CAD since the depth of field (sweet spot) is infinite - everything in front of the virtual camera is in focus.

I'm sorry I even responded about how real cameras work. It is mostly irrelevant and has lead the discussion away from how virtual cameras should work.

Phil
DesignCAD user since 1987