Jump to content
  • Advertisement

Archived

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

lakibuk

distorted proportions

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

If you intended to correct an error in the post then please contact us.

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? cubes

Share this post


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

-Prairie

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 )

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!