Archived

This topic is now archived and is closed to further replies.

KingPin

Horizontal and vertical FOV?

Recommended Posts

KingPin    122
I searched for a similiar post before I posted this...no luck Is it possible to use both, a horizontal and vertical FOV against the projection plane? I figured the projection math might go something like this, but i''m not certain...
  
aspectRatio = screenW/screenH
hViewDepth = (screenW/2) * tan(hFOV/2)
vViewDepth = (screenH/2) * tan(vFOV/2)
screenX = (screenW/2) + (x)(hViewDepth/z)
screenY = (screenH/2) - (apsectRatio)(y)(vViewDepth/z)
  
Would this create horiz and vert FOV''s or just some garbadge? "1-2GB of virtual memory, that''s way more than i''ll ever need!" - Bill Gates "The Adventure: Quite possibly the game of the century!" - The Gaming Community

Share this post


Link to post
Share on other sites
bishop_pass    109
I''m not going to dissect your math, but the concept is pretty simple.

Pick what FOV you want for one dimension. Then, given the aspect ratio, derive the other FOV. Or, pick both FOVs, and one screen dimension, and derive the other screen dimension.

Of, throw caution to the wind, pick all of the numbers independent of the others, and get either get a squished or squashed rendering.

___________________________________

Share this post


Link to post
Share on other sites
KingPin    122
So if I understand right, the horiz viewdepth (distance from the view point to the proj plane on the XZ dimension) must equal the vert viewdepth (view point to proj plane on the YZ dimension)?


"1-2GB of virtual memory, that''s way more than i''ll ever need!" - Bill Gates
"The Adventure: Quite possibly the game of the century!" - The Gaming Community

Share this post


Link to post
Share on other sites