Problem with projecting Godot game onto a curved screen - distortion of objects on the sides of the screen

Dear Godot Community,

This is my first time posting in the community, so please do let me know if there are any ‘best practices’ I am not following, I’m looking forward to be part of this open source community :slight_smile:

Godot Version

4.3

Question

` How can I adjusted projection of my project onto a curved surface without distortion of the image?

I have been building a Virtual Reality game for a while now. The idea is that it will be projected onto a curved screen, which is roughly the shape of a half-moon shape (not a perfect circle, but pretty close). My game now works nicely when I run it on my normal computer. However, when I connect my computer to my laser projector (DLP3010 Texas Instruments projector), and project onto some rear projection material set up in a half-moon shape, the objects that are located in the side most parts of the field of view in the game become quite distorted. I have tried adjusting the FOV of the Camera3D as well as other properties, I have tried using a subviewport based on asking ChatGPT , but I have not had any success so far with rendering the projection in a way to avoids the distortion of the more ‘peripheral’ objects in the field of view. Dear community, if you have any suggestions I could follow, I would greatly appreciate it. My project is available on GitHub GitHub - AnnaStuckert/VR_game `

Best, Anna

PS. I hope this question is appropriate for this forum, and that my problem description is sufficient, otherwise please let me know.

Looks like a bad projector sheet, not flush at all. Are you sure this is a Godot only issue?

No I am simultaneously looking into procuring another projector sheet (suggestions welcome, looking at ordering this type RTL-Y23 Dark Black Rear Projection Film — Altiel Online Shop). However, if I take the projector sheet and push it back so it is more like a flat screen surface rather than curved, it does improve to shape of the projected image, so I suspect it might be a combination of issues.

Are you using a flat projector? That would increase the pixel density for the curved edges if you aren’t accounting for the viewing angle. I think you would need a post processing shader to un-project the game with foveated and stretched rendering on the sides.

Just like if you bounced the right half the projection with a mirror you would have to tell the game to flip the right half of the render.

By a post processing shader, do you mean this would unprotect my game from a 3D to 2D space, to stop the stretched rendering, and then a new type of rendering would be applied (maybe fish eyed)?
And such a shader, would it be applied directly to the camera 3D?

A fish eye along the x axis might be what you are looking for. VR headsets spend a lot of time and research on how best to distory and project each eye image into their lenses, I’m sure your projector does at least a little bit of this kind of processing for it’s lenses too, but it expects a flat screen on the other end. Usually this math is dialed in to the hardware, if you intend to set up this curved projection elsewhere you may have to tweak the projection again.

If you have played TF2, here’s an example of what a VR headset has to distort to produce a palatable image for the user.