Jump to content

  • Log In with Google      Sign In   
  • Create Account


Rendering Problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 CatmanFS   Members   -  Reputation: 187

Like
0Likes
Like

Posted 08 February 2013 - 11:20 PM

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.



Sponsor:

#2 Aressera   Members   -  Reputation: 1310

Like
1Likes
Like

Posted 09 February 2013 - 01:04 AM

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?



#3 Geometrian   Crossbones+   -  Reputation: 1427

Like
0Likes
Like

Posted 09 February 2013 - 01:37 PM

Parts of the terrain that overlap itself are rendered partially

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


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.

#4 CatmanFS   Members   -  Reputation: 187

Like
0Likes
Like

Posted 09 February 2013 - 01:40 PM

 

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.



#5 CatmanFS   Members   -  Reputation: 187

Like
0Likes
Like

Posted 09 February 2013 - 01:49 PM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS