Weird Rendering Error

I have created some instrument gauges in Cinema 4d 11.5 and imported them into Unity 2.6.1. When I animate the gauge parts like the needles, I get some bad rendering at runtime. The needles leave black trails when they rotate and a artificial colored sphere renders some of its polygons black when it animaties.

My camera is orthographic, but I tried perspective too and it didn't help. The editor camera renders it fine at runtime, its just the game display that's messed.

Any ideas what might cause this?

Added image of what is displaying: alt text

From the looks of it, I'd say this is a matter of zbuffer precision. You can deal with cases like this by:

  • moving the near clipping plane further away
  • moving the far clipping plane close (much less effective)
  • modify the geometry of the two objects that are so close to eachother to be less close to eachother
  • use some smart shaderbased trick where you tell one object to always render after the other, and have one not write in the depth buffer.

I would point out that similar artifacts can occur when importing from Maya if History is not first deleted. I'm assuming similar issues can occur when using Cinema 4d.

I tried your suggestions which didn't work and then replaced the camera with a new camera and the problems is gone. The new camera has somewhat different settings. Does anything in the "BAD Instrument Panel Camera" (see attached) settings hint at what is wrong? I had previously tried varying settings such as turn ortho on and off, but it didn't have any affect. Or maybe it was just a bad camera.

alt text