• 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
0
Question by Ajes · Feb 01, 2014 at 01:49 PM · spherecircleclipping plane

How to make the MainCamera 'far clipping plane' a Sphere

I've searched a long time with different tags like viewdistance drawdistance circle sphere.. but I cannot find any information about this..

How do I set the "draw distance" called "Clipping Planes - far" on the main camera, to a Circle/Sphere form? I can see further in my gameworld near the edges of my screen because the "draw distance" is set to a square as default!

Like in Minecraft, you can set this "draw distance" to a sphere or square, you just loose some FPS if you choose sphere...

Is it really possible that this feature is not implemented in Unity3D ?

Kind regards

Comment
Add comment
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

4 Replies

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

Answer by Kiloblargh · Feb 01, 2014 at 08:02 PM

I found this with a quick Google search...

Camera.layerCullSpherical

There's no global setting but the solution is to set the far clip plane further away and then use per-layer culling for all visible layers to cull them before that distance and set layerCullSpherical to true.

Comment
Add comment · Show 2 · 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 Ajes · Feb 01, 2014 at 09:02 PM 0
Share

Thank you, I will try this out again, I looked at it before, but I did not think at that time that it would work. But I'll try now :)

avatar image Ajes · Feb 03, 2014 at 12:06 PM 0
Share

got it to work now, sadly it isn't pretty, because my game uses chunks.. and every chunk is 1 gameobject.. the far clipping plane is making a much smoother transition from nothing to the chunks.. would be nice if there just were a possibility in the near future to just set the far-clipping-plane to a sphere or circle :D

avatar image
1

Answer by Zafir · Dec 18, 2017 at 07:05 AM

you should set the layer's layerCullDistance and set the camera's layerCullSpherical as true
like this
float[] distances = new float[32];
distances[0] = 20 //smaller than your camera clipping planes's far value
Camera.main.layerCullDistances = distances;
Camera.main.layerCullSpherical = true;

Comment
Add comment · 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
1

Answer by JoeStrout · Jul 25, 2018 at 02:51 PM

I believe you could do it by rendering an inverted sphere with a DepthMask shader, positioned before everything else in the render queue.

Comment
Add comment · 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
0

Answer by Lasent · Feb 01, 2014 at 03:28 PM

Yeah, I'm kinda new to Unity, but I think that's not implemented. If it really bothers you, you could set up a script for every bigger gameobject so that it disables the MeshFilter when the distance is greater than a maxDist between the camera and the gameobject, but I don't know performance-wise how that handles.

Comment
Add comment · 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

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

21 People are following this question.

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

Related Questions

creating a procedural sphere 0 Answers

How to contain particles in a circle (or sphere) 0 Answers

using multiple primitive colliders instead of mesh collider for an arc? 0 Answers

Clamp x,y within circle, z to sphere 0 Answers

How to keep an object within a circle/sphere (radius) - NO RECTANGLE 3 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