Wierd Rendering

This is a discussion on Wierd Rendering within the Game Programming forums, part of the General Programming Boards category; I'm not quite sure how to describe it, so I'll post a screen. Anyone know why this is happening? Any ...

  1. #1
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070

    Wierd Rendering

    I'm not quite sure how to describe it, so I'll post a screen.
    Anyone know why this is happening?
    Any help will be very appreciated.
    Attached Images Attached Images  
    Memorial University of Newfoundland
    Computer Science

    Mac and OpenGL evangelist.

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586
    I have the same problem when I place atmospheres over my planets. The Z value between the atmosphere sphere and the planet sphere get smaller and smaller the farther away you get from the planet.

    There is a point at which the distance between them is so small that the Z buffer cannot accurately distinguish between the two and so Z fighting occurs. Basically certain pixels pass the Z Buffer test, but because the distance is so small between the two values - there are times when the wrong pixel passes the test.


    Solutions:
    1. Use a higher precision depth buffer
    2. Only render the second sphere when the object is close to the camera
    3. Use a Z bias

    Also make sure you are normalizing your normals as this sometimes causes that problem.

  3. #3
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070
    ok, thanx!

    -psychopath
    Memorial University of Newfoundland
    Computer Science

    Mac and OpenGL evangelist.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL Wierd **** - Order of Drawing Stuff?
    By Tonto in forum Game Programming
    Replies: 9
    Last Post: 11-09-2006, 08:56 PM
  2. scene graph rendering techniques
    By ichijoji in forum Game Programming
    Replies: 7
    Last Post: 03-18-2006, 11:17 PM
  3. Mesh Rendering: Z-Buffer and Lighting
    By Epo in forum Game Programming
    Replies: 6
    Last Post: 04-20-2005, 07:11 AM
  4. Manual rendering disappears
    By Magos in forum Windows Programming
    Replies: 7
    Last Post: 02-29-2004, 08:25 PM
  5. voxel based rendering
    By Silvercord in forum Game Programming
    Replies: 1
    Last Post: 03-20-2003, 04:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21