CurryKitten / CurryKitten-Sim

FPV quad simulator
67 stars 7 forks source link

Picture is being stretched weirdly in low-res 4:3 aspect ratio #92

Closed CurryKitten closed 3 years ago

CurryKitten commented 3 years ago

I got a comment from a user on YouTube saying the sim was very weird when barrel-rolling at low-resolution on a 4:3 aspect ratio. Further prompting revealed he was using 640x480. Sure enough, in this combination of resolution and low detail, the landscape does appear to stretch weirdly when rolling. It's in higher resolutions as well, just more obvious when the resolution is low.

I think this is down to the emulated sensor size I'm using in the cameras. Referring back to my original notes, I looked at real life specs and found that the camera sensor was 6.35mm wide. But if I used that in both the X/Y dimensions then the picture would look too squashed (thinking about it with a 4:3 sensor, you'd expect the Y dimension to be 4.76mm anyway) I manipulated the Y valude until I thought it was right, and got to 2.5mm. What I need to do is have another look at this whilst in a 4:3 aspect ratio and decide what it needs to sit at and then alter this in runtime based on the resolution settings.

CurryKitten commented 3 years ago

After doing some tests, I'm finding I need to reduce the size of the X size of the sensor, rather than doing anything with the Y. This does have the effect of narrowing the picture slightly, but it brings things far more into perspective and eliminates the shearing effect that was taking place. This will go into the 0.55b release.