Jump to content

  • Log In with Google      Sign In   
  • Create Account

ugly zig-zag


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 2001 - 11:31 PM

How can I avoid this ugly zig-zag pattern at the crossing edge of polygons (I hope you know what I mean)? I already tried to increase the z-buffer bits from 8 to 16 and to 32 (<< BTW, does that work???) - but nothing changed. Gahre

Sponsor:

#2 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 2001 - 11:34 PM

You can contact me via ICQ if you want to see a screenshot.You can also browse my ICQ shared files folder if I''m online, the name is: "ugly zig-zag.bmp" (what a surprise!!!)

#3 Xwoodeye   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 2001 - 11:44 PM

the "fightin''-pixel-problem" can be removed by different approaches.
i know two of them:
1. scale down your models, reduce sight-range.
2. switch to a higher z-buffer resolution.

btw, you have to make sure the z-buffer really has a greater bitdepth. my good ol'' tnt2 card, i.e. only supports 24-bit z-buffer if you''re running at a 32-bit pixel bitdepth. if one doesn''t know it can very well take some hours till you find out, ouch... 8(

cu

#4 Xwoodeye   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 November 2001 - 11:46 PM

the "fightin''-pixel-problem" can be removed by different approaches.
i know two of them:
1. scale down your models, reduce sight-range.
2. switch to a higher z-buffer resolution.

btw, you have to make sure the z-buffer really has a greater bitdepth. my good ol'' tnt2 card, i.e. only supports 24-bit z-buffer if you''re running at a 32-bit pixel bitdepth. if one doesn''t know it can very well take some hours till you find out, ouch... 8(

cu

#5 duckbob   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 November 2001 - 12:35 PM

in this line...your numbers are gonna be diffrent
gluPerspective(fov,screenratio,minseperation,maxview_dist);

for what i''ve done, setting minseperation to .1 or below fixes the problem, play with this value to get somthing that prevents the jagged intersections...this might not be the propper way to do it but it worked for me

#6 gahre   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 November 2001 - 01:23 AM

Wow! Didn''t know that this value would solve my problem, but it did! I decreased it from 0.1 to 0.05 just for testing and I noticed that it got even worse, so I changed it to 2.0 and it''s gone! But why does this solve the problem? How come? I thought it would just change the near clipping value?

#7 Bad Monkey   Members   -  Reputation: 145

Like
Likes
Like

Posted 26 November 2001 - 04:08 AM

its because of the way z-values are distributed in the z-buffer... its not linear from near to far... its a curve (can''t think what type off hand... squared? cubic? exponential?), with more precision close to the near plane, and reduced precision the further away you get (towards the far clip plane)

Thats why its always good to push the near clip plane out as far as you can... it gives better precision further out

#8 Omaha   Members   -  Reputation: 100

Like
Likes
Like

Posted 26 November 2001 - 05:56 PM

I think depth coordinates are also normalized/clamped to 0.0-1.0, so if you have a huge distance between your frustum''s near/far planes you''re going to run into innaccuracies, which manifests itself as jaggy edges because the z-buffer can''t be more precise.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS