- Home /
The issue was actually 2 different issues. One is answered in the question, and the other one need to be re-write in another post so it can be explained clearly.
Camera clipping planes : hidden planes when the transform position is too far
Hello,
I have a problem with apparently camera clipping planes. Depending on my camera's position, the black borders of my areas are hidden :
Pic1 : you can see 3 areas with black borders
Pic2: if I move the camera, so the position value of my border is too far from the field of view, my plane is hidden
After reading other topics, I played with the "Near" value of my main camera. And indeed, turning 0.3 to 0.01 is making things better. But it's not enough, my problem is still here and I already have "Near" to the minimum value. Increasing "Far" doesn't change anything.
Other (important ?) note : at start, my black border is square-shaped, then to match with my area size, I modify the position of the vertices, and at the end the black border position is at the bottom right of the area. Maybe I can solve my problem by inversing my computation and taking the top-left as base, but I didn't test that yet.
Is there anything else I can do ? Thank you for your help.
Answer by chrstw · Aug 26, 2016 at 04:47 AM
I am not sure how your scene is set up, but it sounds like maybe you have a Z-Fighting issue. How close together are the Black and Grid planes? Z-Fighting typically occurs when the floating point accuracy of the Z-Buffer isn't high enough to be able to determine which object is closer to the camera. Adjusting the Near clipping plane changes the accuracy of the Z-Buffer. It usually presents in a visual artifact where some of the object behind clips with the object in front and changes as the camera moves around. The pictures you included don't look like what I would expect from Z-Fighting, but your mention of changing the Near clipping plane helping makes me think along these lines.
Anyhow, just a guess, but if you were to move the planes so that it was more obvious which was on top it could help.
Hi chrstw, thank you for your reply. After reading your post, I wonder if my problem is actually 2 problems : the Z-Fighting problem, and the other problem.
I manually put my borders at y++++ to separate them clearly from my grid, but the issue is still here, with the exact same behaviour : the plane is hidden when it's position value is far from the camera.
$$anonymous$$aybe I really had a Z-Fighting issue exactly as you described, but in this case, setting the "Near" value of the camera to 0.01 resolved this issue, then only the other one remains.
$$anonymous$$y instinct tells me that my mesh manipulation could be involved here. It's like if Unity was considering the size of my border object as the basic size it had at start. So when this size is out of the field of view, Unity thinks that no part of this object is in the field of view => the object does not need to be rendered.
If you have an idea about how I could fix this, I take it ^^. I continue my investigation
EDIT : after a few test, I am pretty sure I am right about the issue. I am going to re-write my problem in another post