|
|
> I thought there had been some discussion about this, Way Back When (TM), but I
> could not locate a thread.
>
> I was wondering if there were some way to calculate the positions of the four
> corners of the visible render frame, or unit-length-vectors that point from the
> camera in those directions.
>
> If there are other formulas for calculating schtuff associated with the final
> render and field of view, that would be helpful as well.
>
> Currently just interested in typical perspective camera, though I also use
> orthographic frequently.
>
> Thanks
>
>
If you use an orthographic camera WITHOUT the angle keyword, located on
the Z axis and looking toward +z, the dimentions are :
Top left : up, -right
Top right : up, right
Bottom left : -up, -right
Bottom right : -up, right
For any other projections, it's not obvious. You'll need to use some
trigonometry. This can give you the direction vectors that are parallel
to the edges of the rendered image. As a starting point, take a look at
the file screen.inc that is made to deal with such situations.
Alain
Post a reply to this message
|
|