- Home /
simulating real world camera in unity
Hi,
I am trying to simulate a real world camera in unity. In the real world scenario, depending upon the following factors: Resolution, Field of view , and Working distance of the camera, the spatial resolution (pixel/meter) of the camera is defined.
Spatial resolution = No. of pixels / [2*Working distance*tan(Field of view/2)].
How can I simulate it in unity?
I can specify the Field of view in the GUI, and based on the aspect ratio of the sensor, I can chose the 'viewport rect' in the GUI. But what if 2 cameras have the same Field of view and Working distance but different resolution, say, one has half the other. I will have the same 'viewport rect' in that case. However, the image qualities will be entirely different. More specifically, the spatial resolution (pix/meter) will be different. How can that be simulated on Unity?
Thanks.