Archived

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

wdkv

Problems in viewing pipeline maths

Recommended Posts

wdkv    122
I just finished reading Tricks of The 3D Game Programming Gurus by Andre LaMothe and have started writing my own software engine. I have this problem that increasing the field of view decrease the visible area and vice versa. I think the problem is with the view distance. I calculate it as in the book: view distance = 0.5 * veiw plane width * tan( field of view / 2) The problem is easily fixed by using the inverse of the viewing distance and all the other calculations, but i recon it is just covering up for some other mistake. does anyone have any ideas?

Share this post


Link to post
Share on other sites
JohnBolton    1372
Either you read it wrong or there is a typo in the book.

width/2 = distance * tan(angle/2)

so

distance = width/2 / tan(angle/2)


John Bolton
Page 44 Studios
Current project: NHL Faceoff 2005 PS2

Share this post


Link to post
Share on other sites