Sign in to follow this  
CatmanFS

Rendering Problem

Recommended Posts

CatmanFS    199

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
Aressera    2919

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
CatmanFS    199

 

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
CatmanFS    199

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this