Hi again,
Thanks for your input! I have found the solution now:
The issue was not the camera field of view, but how I calculated the bounds of the viewplane (image plane). C4d fits the aspect ratio of the final render resolution into the size of the viewport in a specific way, that I reverse engineered. Here is the code for my solution, in case anyone else has the same problem:
double f=double(resolution[1])/double(resolution[0]);
double f2 =double(renderdata_resolution[1])/double(renderdata_resolution[0]);
double c = f2 / f;
double screen_window[4];
screen_window[0] = -1*c;
screen_window[1]=-f*c;
screen_window[2] = 1*c;
screen_window[3]=f*c;
In the above code, "resolution" is the resolution, in pixels, of the viewport and "renderdata_resolution" is the resolution we would have if rendering to the picture viewer.
/Filip