Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game The Unity Editor and Scene Setup Position the Camera

Ranvir Sahota
Ranvir Sahota
9,844 Points

Near set to 0.03

I understand that near is when camera view begins and far is when it ends. I looked into the unity documentation to find out why near is set 0.03 and I found this: clipping planes also determine how depth buffer precision is distributed over the scene. In general, to get better precision you should move the Near plane as far as possible. I more or less can't undetsand this becuase I don't know what depth buffering is and I did look into what it was but MSDN used technical terms I have yet to understand and other explanations I looked at didn't seem to explain it all too well. So can someone explain to me what depth buffer is and how setting near as close as possible improves the prescision?

1 Answer

Alan Mattan贸
Alan Mattan贸
Courses Plus Student 12,188 Points

What can happen is that far objects can confuse the other in which is draw from far to the front. And when you rotate the camera, the game object superposition can flicker in the distance.

Ther rendering path Is a complex topic, but the game engine rendering is different from a traditional infinite ray from the camera rendering. The real-time rendering put in an order one by one triangle meshes from far to near.


More distance to cover, more GPU expensive it will be. You can increase shadow quality and avoid artefacts problems by adding multiple cameras with different clipping planes for a PC development. You can make a fast rendering specific for mobile buy rendering only one camera with a very low distance between clipping planes (and adding, for example, simple fog). Is important to keep the near clipping plane as far as possible. I never notice a quality drop difference between wide (0.01>30.000u) or short (0.3>150u) clipping planes. For debugging artefact and differences you can look how a particular frame is build up by using the particular new Unity tool Frame Debugger:


Shadow distance has a much bigger quality impact and influence.