• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by PristineCondition · Jun 12, 2011 at 09:27 AM · cameraclipping

Why is near clip plane necessary?

OK totally noob question here. I have searched but i cculdn't find a suitable answer. I can understand why the far clip plane is necessary to limit the amount of information drawn on the screen. But why the near clip plane? Why not just start the camera's view from the camera? If you have a movie camera in real life it records the images in front of it, right, not starting at 4 metres in front of it. So what's the deal with this one? Be grateful for an explanation.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image PristineCondition · Jun 12, 2011 at 03:10 PM 0
Share

Thanks for the replies guys, you gave me a lot to chew on there. Looks much more complicated than i thought, as always with computer graphics!

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by Bunny83 · Jun 12, 2011 at 11:53 AM

Also you might take a look at the camera matrix(wikipedia).

Actually it's the other way round. You don't need a far clipping plane but always a near clipping plane. It's a perspective projection with the vanishing point is your camera position. When the near-clipping plane distance would be set to 0 your whole scene would be projected onto a single point.

The mathematical background is that when setting up the projection matrix you have to calculate this:

 -(2 * zFar * zNear) / (zFar - zNear)

When zNear is 0 all z values would map to 0.

Here's a nice article about the projection matrix and some tricks how to setup one without far clipping plane.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Michael Katic · Oct 24, 2013 at 05:16 PM 0
Share

You don't need a far clipping plane but always a near clipping plane.

Not exactly. You need either a near or a far clipping plane to deter$$anonymous$$e perspective, correct?

avatar image Bunny83 · Oct 25, 2013 at 03:22 AM 1
Share

@michael-katic: Actually there are no real planes. It's just a value where the geometry is clipped because it's considered outside of the view frustum. Perspective projection in general doesn't need any clipping besides the camera point itself. So projecting the x and y values is quite easy, they are linearly mapped (like an orthographic projection) but in addition divided by the z value. That will give the perspective.

Homogeneous coordinates are between -1 and 1. So 0,0 is the center of the screen. For large z values the projected point will move towards the screen center. At infinity it would be the center.

However, the problem for the graphics card is that it doesn't perform a 3d --> 2d projection but a 3d --> 3d projection. The converted z value is needed for the z buffer. If you take the time to look into the PDF i've linked above, there's a nice image which explains the homogeneous clipspace. If you make the near plane very small (say 0.0000001), that would map half of the z-buffer-range to 0.0000001 - 0.0000002 and the other half to 0.0000002-farplane. This would result in endless z-fighting for most objects (which are usually further way as 0.0000002).

avatar image PhoneixS · Mar 29, 2017 at 04:19 PM 0
Share

The link to nice article need an f at the end, it should be http://www.terathon.com/gdc07_lengyel.pdf

avatar image Bunny83 PhoneixS · Sep 18, 2019 at 01:04 AM 0
Share

Since the question was just bumped again I finally saw your comment. Strangely Unity has somehow dropped the final f in the link. Even more strange when I edit my post the f is there... I just clicked "save" again without changing anything and it now has the "f" ^^.

avatar image
4

Answer by Oliver Eberlei · Jun 12, 2011 at 11:15 AM

Here is a great thread regarding the question

http://www.facepunch.com/threads/1075270-What-s-the-point-of-the-near-clipping-plane-in-3d-games

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image benjigga · Sep 17, 2019 at 05:01 PM 0
Share

The link is 404'd, but here is what Google cached:

The clipping plane is usually represented by a logarithmic scale. This means that if you set your clipping plane at the camera, the distance between the clipping plane and the camera would be zero. Log(0) is -infinity, so the near plane must be greater than 0.

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Editor's Camera Clipping Plane 12 Answers

camera near clipping results in z fighting 1 Answer

Unity (5) Scene camera Clipping 3 Answers

Polygons clipping at edge of screen 1 Answer

Weapon / Viewmodel clipping shader methods 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges