Rendering Problem

Started by
3 comments, last by CatmanFS 11 years, 2 months ago

I have an issue trying to render objects.

As you can see the object in question is the terrain, it's one solid mesh, part of a siplay list added in immediate mode. Parts of the terrain that overlap itself are rendered partially and you can clearly see the terrain behind the hill in the image.

I've tried different combintations of culling faces and depth testing, but nothing seems to work.

Airlight is looking for game developers
Advertisement

I'd say it looks like half the normals have the opposite direction from what you want, which would explain why nothing you do seems to work (since half of them will always be wrong). Check your terrain loading/normal calculation code, or perhaps the model itself could have bad normals?

Parts of the terrain that overlap itself are rendered partially

http://en.wikipedia.org/wiki/Z-fighting

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

Nope, the normals are all ok, seems this would be the problem, because I was having similar issues with a mesh that had reversed normals and it wasn't displaying correctly. At one point I was using double sided lighting, and the problem went away, but for the life of me I can't get it to work again.

Airlight is looking for game developers

I tried increasing the resolution of the depth buffer, and larger objects with further away overlapping pieces seem to have the same problem.

Here is another picture, more close up of the triangles in question.

I know it has something to do with lighting, on a model of a plane I have the back faces seem to want to render over the nearer ones.

Airlight is looking for game developers

This topic is closed to new replies.

Advertisement