Jump to content


Artefacts in Mesh [Managed DirectX]


7 replies to this topic

#1 alexndr

    New Member

  • Members
  • PipPip
  • 28 posts

Posted 17 May 2006 - 04:06 PM

While zooming out my scene I found that there are artefacts in Mesh (see image below, GIF 66 Kb. I can upload original screens if need.). How to fix this?

Posted Image

10% luck, 20% skill, 15% concentrated power of will, 5% pleasure, 50% pain
and 100% reason to remember the name

My Weblog "Project Delta" » http://project-delta.blogspot.com/

#2 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 17 May 2006 - 04:50 PM

Maybe this recent thread will help: <edit: sorry, I linked to the wrong thread I can't find the one I was looking for :(>

Anyway, you probable want to search for Z-Fighting.
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*

#3 alexndr

    New Member

  • Members
  • PipPip
  • 28 posts

Posted 17 May 2006 - 05:14 PM

Actually, Z-Fighting occours when two or more co-planar polygons lie on the same plane, they share the same z-buffer values, but in my Mesh they dont lie on the same plane, they very close.

Posted Image
Posted Image

It seems like Z-Buffer has wrong values or smth else...Look at shelf pole.

10% luck, 20% skill, 15% concentrated power of will, 5% pleasure, 50% pain
and 100% reason to remember the name

My Weblog "Project Delta" » http://project-delta.blogspot.com/

#4 roel

    Senior Member

  • Members
  • PipPipPipPip
  • 697 posts

Posted 17 May 2006 - 05:20 PM

what are the distances of your near and far plane?

#5 alexndr

    New Member

  • Members
  • PipPip
  • 28 posts

Posted 17 May 2006 - 05:25 PM

Planes: 1.0f - 100.0f
The problem is in poor precision of the Z-buffer :] I changed DepthFormat from D16 to D24X8 and artefacts has gone.

10% luck, 20% skill, 15% concentrated power of will, 5% pleasure, 50% pain
and 100% reason to remember the name

My Weblog "Project Delta" » http://project-delta.blogspot.com/

#6 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 17 May 2006 - 05:26 PM

alexndr: it could still be Z-fighting. What is the precision of your depth buffer? If it is only 16 bits, try turning it up. Also, try increasing the near plane distance. The artifacts you are seeing are classic symptoms of Z-fighting.
reedbeta.com - developer blog, OpenGL demos, and other projects

#7 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 17 May 2006 - 05:27 PM

Ahh, never mind, you figured it out yourself :yes:
reedbeta.com - developer blog, OpenGL demos, and other projects

#8 alexndr

    New Member

  • Members
  • PipPip
  • 28 posts

Posted 17 May 2006 - 05:33 PM

Near plane was 0.01f, but not 1.0f as I wrote, increasing near plane also solves this problem. Thanks for help :)
Useful links:
http://nuttybar.dram...rch/002506.html
http://www.sjbaker.o...r_z_buffer.html

10% luck, 20% skill, 15% concentrated power of will, 5% pleasure, 50% pain
and 100% reason to remember the name

My Weblog "Project Delta" » http://project-delta.blogspot.com/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users