#### Archived

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

# distorted proportions

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

## Recommended Posts

i have some cubes in d3d,but there geometrical proportions are distorted,depending on the point of view. what have i done wrong?

##### Share on other sites
My best guess is that your projection matrix has some errors.

##### Share on other sites
I would agree with Countach, but in particular it appears that it''s your aspect ratio. Is it full screen or windowed?

-Prairie

##### Share on other sites
To some extents that is an inevitable consequence of any divide by z projection. When a cube is in the centre of the screen, it may appear perfectly square, but when it is off to one side, it can appear wider than it is tall.

This is because when working out screen co-ordinates, only the distance in z between the camera and vertex is taken into consideration, not the actual 3d distance (pythagorus in 3d, d = sqrt ( x*x + y*y + z*z ), where x,y and z are the difference between camera position and vertex position ).

Theres nothing that looks acceptable that you can do to fix this. If you actually take into account the 3d distance instead of just the z distance, then you get a very strange distortion (actually, the same distorted view our eyes produce, although it''s hard to notice).

If on the other hand, you are saying that even when centered on the screen, your cubes are wider than they are tall, then decrease the vertical fov (or increase horizontal fov).

##### Share on other sites
Prairie: it''s fullscreen
simon_brown75: they don''t even look square in the center of screen,must be some error in my calculations
but thx,i will check the matrix & stuff

##### Share on other sites
aeh, what is the aspect ratio?

##### Share on other sites
How are you settings up your projection matrix? Does it allow for a seperate vertical and horizontal FOV, because that is what is wrong. Try decreasing the vertical fov.

Edited by - simon_brown75 on February 15, 2001 2:13:21 PM

##### Share on other sites
If you''ve got DX8 and the Help file that comes with the SDK look there. I know that sounds obvious, but I just looked and they actually walk you through it. If you still get stuck after trying that, just post what you did and what the current results look like.

-Prairie

p.s. Just realized that they''ve taken out the aspect ratio variable from the projection matrix function in version 8 (it was there in 7 )

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 11
• 16
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633003
• Total Posts
3009849
• ### Who's Online (See full list)

There are no registered users currently online

×