Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Rendering Problem

4: Adsense

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   

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



#2 Aressera   Members   

2895
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   Members   

1810
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   

199
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   

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