• Advertisement
Sign in to follow this  

Rendering Problem

This topic is 1809 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement