#### Archived

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

# projection matrix

This topic is 6175 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I don't know how to setup a correct projection matrix in directx7. I am using the helper function from the tutorials: float near=1.0f; float far=1000.0f; float viewport_width=800.0f; float viewport_height=600.0f; D3DUtil_SetProjectionMatrix(matProj, fFOV, fAspect, near, far); How do i calculate fFOV and fAspect ? My graphics looks distorted, this should be cubes: Edited by - lakibuk on June 26, 2001 2:32:12 PM

##### Share on other sites
The FOV will be how many degrees around you can see, humans see about 90, but you don't wan't to use that as your FOV in a game, probably around 60 will work.
The Aspect is your windows width/height. If you use standard screen resolutions as your window sizes (or if you use fullscreen), your aspect is about 1.33333333333333... and on and on, but you could get away with 1.33333f;

Edited by - Slinger on June 26, 2001 2:52:38 PM

##### Share on other sites
could it be that aspect is height/width ?

##### Share on other sites
...and what''s wrong with using 90 for FOV?
Last I checked, that''s what Quake, and its precursors, and its sequels, all use...

If you''re only calling the function once to set up your matrix, you should probably feed it (window width / window height) rather than precalculate it, so you get the most precision the system supports. Incidentally, you HAVE to do this if you run in a window where the aspect ratio may not be fixed

##### Share on other sites
lakibuk> the aspect is the width/height.

TrIaD> a 90 degree FOV looks strange on a computer monitor, its all distorted, and can give some people motion sickness. I''m almost positive that Quake uses a 60 FOV.

##### Share on other sites
quote:

humans see about 90, but you don''t wan''t to use that as your FOV in a game, probably around 60 will work.

"Normal" people have a FOV of more than 180 degrees.

quote:

...and what''s wrong with using 90 for FOV?
Last I checked, that''s what Quake, and its precursors, and its sequels, all use...

There''s nothing *wrong* with 90 degree FOVs. There''s nothing *wrong* with cubism either. It just doesn''t look right.

You can use any FOV that you like for your game. But to make the graphics look right the FOV must depend on the size of the monitor and the distance to the monitor:

In this case the FOV should be set to 80 degrees.

Note that in real life you shouldn''t sit that close to your monitor

• 9
• 23
• 10
• 19