I did a little Googling and found this nice description of the Panini projection on the wiki for the panotools photo processing software: The General Panini Projection - PanoTools.org Wiki
Essentially, it’s a cylindrical projection: compared to the flat plane used for a rectilinear projection when rendering 3d scene into a 2d frame buffer, it will keep horizontal angular distances constant in pixel size across the entire view (unless you use some projection parameters to vary it).
This can help solve two specific problems:
- most people have ultrawide monitors at a size and viewing distance that gives them a smaller physical FOV than the virtual FOV used in the simulator – this is what causes visible distortion on flat ultrawide monitors, when the angular distances in your eye don’t match the angular distances from the rendering.
- for curved monitors, if the virtual camera point and your physical eye position don’t both match the center point of the curvature, you will get additional distortion from any projection
I did some arithmetic earlier, and for a 34" diagonal flat 21:9 monitor, assuming a 90 degree horizontal FOV (which in X-Plane roughly matches my view in MSFS), the existing flat projection should be correct at a viewing distance of about 15.6" (a 45-degree angle from center to each edge of the screen, for a total FOV of 90 degrees) – however a comfortable viewing distance for me is 26", making the physial FOV much much smaller at this monitor size.
To avoid distortion, I would need a 56.6" diagonal flat 21:9 monitor – or I would have to alter the projection. (Note a flat 32:9 monitor would have to be significantly larger than that to avoid distortion. I didn’t do the math for curvature, but I’m pretty sure I’m not sitting at the center point of the curve of my current 34" 21:9 non-flat monitor either. Will have to look up the details on that later!)
The Panini projection looks like exactly something you’d want for this, as it can reduce the horizontal “stretching” effect either completely or partially, which makes it look more like you used a smaller FOV on a tinier world.
I’m not sure offhand whether it’s possible to natively render the 3d scene into a cylindrical projection and have everything line up right; the fact that straight lines don’t appear straight in the projection is likely to be a problem there.
This probably means you have to render to a larger resolution than the screen, and apply a transformation on the rasterized output.
Looks like in the Unity engine this is a post-processing effect after rendering, which makes sense:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.1/manual/Post-Processing-Panini-Projection.html