How do I remove the stretching caused by changing a RenderTexture's dimensions?
I am having a issue related to the output of a SceneCapture2D being stretched. I have a simple environment with a rig of cameras that is meant to represent the user's viewpoint, like this: The problem is that when I render these cameras to a CAVE-like system like this, the textures are stretched: The cameras' FOVs are each 50.4 degrees (the FOV of the CAVE/number of cameras), and rotated such that their HFOVs should not overlap. The textures are all 720x720px right now. Obviously, it would make more sense to make the textures have the same aspect ratios of each screen (675x1080px), but when I do that, the images are no longer continuous: I'm guessing that modifying the texture's aspect ratio is somehow modifying the Horizontal FOV, causing the cameras' frusta to no longer share a side, but with no visual frustum like with a normal camera, there is literally no way to tell what's happening. I seems as if the texture that represents the output is NOT actually what the camera is rendering to; rather, it seems like my desired aspect ratio is just being cut out of some internal square texture, but without any documentation, I don't know how to troubleshoot this. Ideally, I would like to manually define the vertical FOV or aspect ratio for the SceneCapture, but it doesn't look like there's any support for that. Any thoughts?
asked Feb 21 '18 at 03:41 PM in Everything Else
I have fixed my problem! Evidently, it looks like the "FOV" parameter for SceneCaptures is actually diagonal FOV. Now, I get an undistorted image. I hope this helps others working with scenecaptures, even if you aren't doing exactly the same thing!
answered Feb 21 '18 at 04:33 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here