Perpective Correction

Started by
2 comments, last by C0D1F1ED 18 years, 10 months ago
Hi. On this image the tiger http://mega.ist.utl.pt/~amak/cv/imagem-deformada.JPG is deformed and all objects when they are near to a screen corner. How i resolve that?
Advertisement
I would check how you are setting up your perspective matrix. I have never used Direct3D myself but from what I have been told, unlike OpenGL you have an
extra stage in calculation of final values. It might be that in setting up
the projection matrix is wrong or that bad values are being passed in (denormals
etc). Try checking your projection matrix and also to see whether it might be
passed in as a transpose of the actual values. Apart from this I can't figure
out the possibility why.
Quote:
Perpective Correction

Adding an s as the fourth character would be correct!

On a more serious note, check your projection matrix and also your view matrix. If you are using D3D you might want to check the functions that D3DX offers for constructing both matrices. You can use them anyhow, or use them temporarily as a reference.

Greetz,

Illco
It looks like you have a very big Field of View (FOV). This is the horizontal viewing range, expressed as an angle. A normal FOV is about 90 degrees, or pi / 2 radians. It looks like in your application it is something like 140 degrees, which will cause this kind of deformation around the edges. So check your API documentation on how to set a proper FOV for the projection matrix.

This topic is closed to new replies.

Advertisement