[SOLVED] - Terrain rendering, z-depth artifacts?

Hello world…

I have a plane that can be flown around over some heightmap generated terrain… tri-pod and cockpit views…

Everything looks good / as expected, except for some seemingly random artifacting…

Some terrain polygons/surfaces will visually flickr in and out of exsistance… its not all over the place, but with good visibility or high altitudes, SO many distortions can be seen at once, that it detracts…

All terrain is generated and used the same way, so I dont see any obvious reason for absolutely most of it to work, but a fraction flicker…

I dont even know if seamless terrain is a reasonable expectation for default-settings rendering…

If anyone has any thoughts on this, or has seen something scimilar in the past, I would be thrilled to hear from you… Vaguest ideas and half-broken links welcome :slight_smile:

Just solved this !

  • Some joker told me in a tutorial the standard projection field of view was PiOver4…

turns out I needed MathHelper.ToRadians(45f)

…And now everything is good… … … Lucky find!

45 degrees = pi /4 radians so where is the difference?

Yeah, I dont know! Thats why this bug in my code was a lucky find, that I could see no explanation for ! ! !

Maybe a rounding issue or something? But yeah, a WORLD of difference when rendering huge scenes, like in my flight sim…

Pi/4 looked like some polygons would fight over z-depth or blink in and out of sight… Ugly and unstable… Made me sad and worried about the future…

toradians(45) looks clean tight… Made me feel like I can do anything!

How were you defining Pi previously?

well, I wasnt really defining Pi, instead relying on the intellisence-delivered default-library definition of Pi…