Perspective

Started by
5 comments, last by ahmadi86 16 years, 10 months ago
Hello What's the difference between Matrix.PerspectiveFovLH and Matrix.PerspectiveLH Methods in directX?
Advertisement
Quote:Original post by ahmadi86
Hello

What's the difference between Matrix.PerspectiveFovLH and
Matrix.PerspectiveLH Methods in directX?
Compare the two functions. One takes a FOV and an aspect ratio, one takes a width and height of the viewport. That's the only difference.
Do you mean that Matrix.PerspectiveLH computes the FOV and aspect ratio
from width and height itself?
Quote:Original post by ahmadi86
Do you mean that Matrix.PerspectiveLH computes the FOV and aspect ratio
from width and height itself?
No, he means you can choose either function to create your perspective matrix depending on which set of parameters you wish to base it on. You can build your perspective matrix either way depending on how you have your engine coded. Do you want to supply <width, height> or <FOV, aspect> to describe your view?
I want to simulate a real scene (which is seen by the human eyes)
What type of perspective i should use?
Quote:Original post by ahmadi86
I want to simulate a real scene (which is seen by the human eyes)
What type of perspective i should use?
You can't really do that without introducing a lot of distortion. The human field of view is around 180° horizontally and 135° vertically (45° above, 90° below). If you try to create a projection matrix with corresponding FOV and aspect ratio your user will have a tough time moving around. Far more common is a 90° FOV.

The reason it's so small is that the user sits a distance back from the monitor, which doesn't occupy their field of vision. It's much more like the viewer is watching the game through a window. Cramming an oversized projection onto the screen will destroy the illusion altogether.

I'm afraid there's nothing you can do about it unless you change your target audience to VR or force them to hold their faces up to the screen [rolleyes].

Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
Thanks.

This topic is closed to new replies.

Advertisement