PDA

View Full Version : Weird zig-zags on cubes



05-02-2001, 04:24 PM
I'm currently being introduced to OpenGL through a class I'm taking. I've created a 3d maze that can be rotated and viewed from any angle. The maze consists mostly of cubes (provided by glut) and some display lists of ants and an anteater.

The problem I'm having is that when I rotate the camera, I see weird zig zag shapes forming in the edges between cubes of different colors. If I turn on lighting, it's even worse: all the cubes have zig zag shapes roughly corresponding to the correct shading on them (I've put shading on 'smooth') and I can also see the edges between adjacent cubes even though they're right next to each other. There's some horrible blockiness going on. However, the ants and the anteater look perfect. Anyone knows why this is happening and how I can stop it?

Korval
05-02-2001, 05:28 PM
It sounds a little like z-fighting. How close is your front-clipping plane? You might want to try moving it out some distance.