feature request: focal length parameter for perspective view

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
atererus
Posts: 32
Joined: Thu Mar 11, 2021 2:28 pm
Location: the Netherlands
Contact:

feature request: focal length parameter for perspective view

Post by atererus »

Feature request: angle of view parameter for perspective view.

Rationale: in order to (re)construct 3D object from photographic pictures by having the picture as a planar image in 3D space, the camera angle of view in prespective mode needs to be adjusted. I could position the camera in FreeCAD-0.16. This gave me just one plane of depth that maps to the 3D object on the 2D image in 3D space. So I must move back and forth in order to map a feature at a different distance from the camera, which would be needed if the camera stays where it realy is and the lens's opening angle matches the angle ov view in perspectiveview. (note that I did try perspective view, but after to much trouble to get it mapped continued work in orthographic view.

EDIT: perhaps I just think I am moving the camera and FCCamera without the requested parameter will do the job in perspectiveview. I am now in the process of upgrading to 0.19, FCCamera did not work in my 0.18 that I recently compiled (due to wrong paths and manual installation I gave up on this).

Real use case : kind of doing photogrammetry manually, more details you find in my webpage through my profile.

Justification: I didn't find such a thing searching the web and found other users that ask/try to seek camera controls. So there seems to be a justifiaction for such feature in FreeCAD.

Related links:
https://en.wikipedia.org/wiki/Angle_of_view
https://forum.freecadweb.org/viewtopic.php?f=3&t=1816
https://forum.freecadweb.org/viewtopic.php?t=6745
https://wiki.freecadweb.org/index.php?t ... o_FCCamera
https://github.com/FreeCAD/FreeCAD-rend ... Cameras.md
Last edited by atererus on Sat Mar 13, 2021 10:14 pm, edited 4 times in total.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: feature request: focal length parameter for perspective view

Post by chrisb »

You have already a link to FCCamera in your post. You can use it for controlling the camera position.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
atererus
Posts: 32
Joined: Thu Mar 11, 2021 2:28 pm
Location: the Netherlands
Contact:

Re: feature request: focal length parameter for perspective view

Post by atererus »

Thank you,

I rethink now about my problem that I experience, which is that only one depth on the image matches that of the 3D model, I had to reposition every time in order to get another detail mapped. At least I was only asuming that I was fully controlling the camera. What exactly moving forward/backward, zooming in/out, magnification, focal length, and image size (35mm) really means. Now to rethink about these subjects makes this more clear, they are not all orthogonal dimensions that each requires a unique parameter to fiddle with. But I am still not a photographic technican and have just to try out and experience this new knowledge. Perhaps this time I will succeed in getting the job done, or can exactly pin point why not. Thanks for responding. Will be back when I know more about it ...
atererus
Posts: 32
Joined: Thu Mar 11, 2021 2:28 pm
Location: the Netherlands
Contact:

Re: feature request: focal length parameter for perspective view

Post by atererus »

I tried to install the FCCamera macro on my 0.18 version, but failed to get it to work. Will try again as soon as I have 0.19 running.
Read my profile in order to get more detail about my tools and preferences.
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: feature request: focal length parameter for perspective view

Post by run_the_race »

chrisb wrote: Fri Mar 12, 2021 12:12 am You have already a link to FCCamera in your post. You can use it for controlling the camera position.
Camera position is different to the focal length of the camera.
Please check out this video that explains what focal length is: https://www.youtube.com/watch?v=UBuaG1_sA5k

The default focal length in perspective mode distorts the object quite drastically when rendering small objects.
atererus
Posts: 32
Joined: Thu Mar 11, 2021 2:28 pm
Location: the Netherlands
Contact:

Re: feature request: focal length parameter for perspective view

Post by atererus »

Please provide me with links to *FreeCad* articles about all kind camera parameters. Position, focal length distortion etc ... I while ago I started working on scripts, but stumbled on not having enough information. Internet is quite slow here (30 Kb/s downto 5 Kb/s) and it is not fun searching that way, so please do the search for me, and I'll restart, and continue working on a camera GUI.
Read my profile in order to get more detail about my tools and preferences.
Post Reply