Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
2
Question by Nach0 · Mar 17, 2015 at 12:57 PM · unity 5camerameshclippingprocedural generation

Procedurally generated mesh disappears from certain camera angles

This issue is best explained with a gif, so: alt text

Essentialy I have this procedurally generated mesh, and for some reason in both the editor and the scene view, looking at it from certain angles causes it to not render.

I know it's not a clipping plane problem - I have the near clipping plane set to the smallest possible value, and I've set both the near and far planes to various values to no avail. Also, if it were a clipping plane problem, it wouldn't be happening in the scene view.

It's also not an occlusion culling problem - I have that disabled on the camera.

What is going on here? Why is this mesh disappearing? Any help would be much appreciated!

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 Cherno · Mar 17, 2015 at 01:21 PM 0
Share

I had this problem with a normal mesh (not generated), the vertices were about 2 units above the origin and as soon as the origin was out of the screen space the mesh didn't show up. I might try to remember tanoshimi's suggestion about checking if the bounds are correctly set up.

1 Reply

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

Answer by tanoshimi · Mar 17, 2015 at 12:59 PM

Given you've said this is procedurally-generated, my guess is that you are not correctly recalculating the bounds of the mesh, so Unity is culling the renderer because it considers to be out of the camera view.

Can you confirm that you call RecalculateBounds at the last stage of generating your mesh?

Comment
Add comment · Show 7 · 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 Nach0 · Mar 17, 2015 at 03:27 PM 0
Share

Thank you! I'm an idiot! I made some changes to the way the meshes were made and forgot to re-add the RecalculateBounds step!

avatar image $$anonymous$$ · Apr 21, 2016 at 01:11 PM 0
Share

You are my savior !

avatar image tapticc · Oct 31, 2016 at 08:07 PM 0
Share

Thanks @tanoshimi , timely re$$anonymous$$der!

avatar image dozhwal · Jul 23, 2017 at 01:18 PM 0
Share

Thank you ! i forgot this. and if you want to be sure your mesh is always visible (in case for example if it is dynamic) , you can set bounds to : mesh.bounds = new Bounds(transform.position, new Vector3(float.$$anonymous$$axValue, float.$$anonymous$$axValue, float.$$anonymous$$axValue));

avatar image tanoshimi dozhwal · Jul 23, 2017 at 01:23 PM 0
Share

You could, but that means it will never be culled even if it's completely outside the camera frustum, making it use up pointless rendering cycles.

avatar image blewert · Aug 26, 2017 at 09:59 AM 0
Share

You da real $$anonymous$$VP

Show more comments

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.

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

Passing Underneath Section of a Mesh 0 Answers

Fill in mesh? 2 Answers

Prevent inner edges from being at front 0 Answers

Good Game by One Person, Is it Possible? 2 Answers

Mesh Decal System 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