Hi! SketchUp camera match tool defines wrong camera orientation values. See the proof. I will use Photoshop to draw perspective scheme using trigonometry to check it.
So let’s have a rectangular canvas size like 2560x1440 (in pixels) and vertical FOV 30 deg. and so horizontal FOV will be 50,9 deg. Let it the level of horizon line be like x=20 deg. and also I will incline it to 30 deg (z=30 deg). Next, I draw a cube rotated to the camera on 45 deg. You can download my .psd document, I created here guidelines, contours, marked VP and MP (switch it on in Photoshop if it is turned off).
My goal is to prove that SU shows wrong camera orientation values. We are having the true perspective image, we know it’s real parametres, we know where the centre of the canvas is placed and it has not been moved, cropped, etc. That means SU should show exactly the same values. And no matter what kind of application instead of PS to use, I draw this image using trigonometry and I’m sure there is no any mistake in my perspective drawing so that’s why I don’t understand why does SU show different values.
Ok. Let’s have some more example of what I want to say. The same canvas 2560x1440 px. Now I’ll draw 3 point perspective image with next values:
horizontal FOV = 144°
vertical FOV = 120°
the level of horizon line 20°.
z tilt = 0°
Do you see that now the level of horizon line showed as -17.2° and tilted on 31.6°? So that’s what I want to call a mistake in SU match camera tool. How can these values be true according to trigonometry? If let these values from SU be really true then we would get another representation of the perspective image but not this one.
Here is I attached full image with all visible VP if need.
If SU detects VP correctly (and it really does it correctly) it must show the values correctly too. We’ve got an image with 2560x1440 and we draw it with vertical FOV 120°. So let’s find a place of needed position on coordinate system for the level of horizon line. 1440px/1,7321 (tan 60°) / 2 * 0,364 (tan 20°) = 151,30 px. So that is the place for the horizon line moved from the centre of the image to the top. But if we believe values of SU match tool then horizon line should be placed on 127,61 px from the centre to the top and if so then SU camera will no match the image any longer but it matches because we see on the screenshots that SU draws all the lines according to current perspective drawing.
Sorry for it’s difficult to read but you can download my images attached (that are not screenshots from SU workspace but «drawings”) and try to use match tool on your own machine to get the same I captured from my screen. Or maybe I didn’t understand you correctly and shall try to put your code above to SU ruby console or what?
Is the issue that the camera is actually being positioned incorrectly in PhotoMatch? Or that ACT report an unexpected value? (The latter might be an issue with the extension. Or differences in how you compute your expected results. I’m not sure what happens when Aspect Ratio is enabled, if calculations use the viewport aspect ratio or the camera aspect ratio…)