x


plane rendering problem

I've noticed very strange behavior of Unity 3.5 plane rendering:

You may see on this screenshot that all objects are above the plane at the same distance alt text

Here you may see that a number of objects isn't rendered, even as they are between the plane and the camera alt text

Here you may see that it depends on the angle between the camera and the plane alt text

Why does this happen? Is it a bug or a feature? Can it be fixed somehow?

more ▼

asked Mar 08, 2012 at 03:45 PM

eugenem79 gravatar image

eugenem79
31 29 22 23

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Hi there,

At a guess, this could be a depth-buffer accuracy problem. If your camera's far clip distance is very large then the accuracy isn't able to cope with objects too close together. Try pulling back your camera's far clipping plane in the inspector to be just as much as you need, and see if that makes a difference.

more ▼

answered Mar 08, 2012 at 07:17 PM

Rob Fireproof gravatar image

Rob Fireproof
136 9 6 8

Hi! Decreasing far clipping distance doesn't help at all. Orthographic camera doesn't make a difference as well.

Mar 09, 2012 at 11:14 AM eugenem79
(comments are locked)
10|3000 characters needed characters left

Hi,

I have the exact same problem doing a lo-fi first person shooter project with a lot of planes. Indeed, the more the plane is parallel to the camera's forward, the more it seems to happen. But in my case, it's not the case all the time. Some plane are immune. I sould investigate more.

This is a quirky handling of plane rendering and I can't find any solution for the moment.

more ▼

answered Jul 17, 2012 at 11:48 PM

tiltaghe gravatar image

tiltaghe
3 5 6 11

(comments are locked)
10|3000 characters needed characters left

This sounds more like a depth-sorting issue then. The sorting is done (presumably) based on distance from camera to the center of the object. If the camera is tilted, then objects above the cutoff line could be further from the camera than the world, and so drawn before the world, and have the world drawn over the top.

That would imply that either your world pixel shader isn't depth-testing, or your satellites aren't z-writing.

I'd check that everything's in the correct render queue, and that the culling settings are correct for all your shaders.

(I'm no shader/graphics expert, so I could be way off the mark).

more ▼

answered Jul 18, 2012 at 08:46 AM

Rob Fireproof gravatar image

Rob Fireproof
136 9 6 8

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x872
x393
x382
x99

asked: Mar 08, 2012 at 03:45 PM

Seen: 1507 times

Last Updated: Jul 18, 2012 at 08:46 AM