Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by SVER · Nov 09, 2016 at 02:15 PM · cameraoptimizationocclusion culling

How to exclude certain moving objects from occlusion culling

Hi, I've successfully set up occlusion culling areas which are now culling most of the objects I need culled. The issue is that I am making a networked game which involves a mechanic that allows players to see others through walls. This uses a shader which is activated on the player mesh allowing the other player to see them. The problem is that the occlusion culling areas are also culling the other players, causing them to be invisible even to the 'xray camera'.

We need the occlusion culling areas because they are culling other moving objects and have even helped with culling static objects, but we don't want the players occluded. Is it possible to exclude specific moving objects from the culling?

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 SVER · Nov 11, 2016 at 11:28 AM 0
Share

I've fixed my issue so that we can see other players through walls now by using a second depth only camera. Problem is that the occlusion culling seems to be occluding one of the player's bodies and only showing their head... So excluding the character from the occluding would still be great.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Radiangames2 · Jan 20, 2017 at 07:07 AM

I ran into this problem as well (a distant game world marker would get occluded). The best workaround I've found:

 mesh = this.GetComponentInChildren().mesh;
 
 mesh.bounds = new Bounds(Vector3.zero, Vector3.one * 10000f);

Basically this makes the mesh always render, because the bounding box is enormous.

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 IndieFist · Jul 23, 2019 at 03:09 PM 0
Share

Thank you! this help me with my outline shader, because i cannot get working with occlusion. When you want to get the item in the normal state should i use: mesh.bounds = new Bounds(Vector3.zero, Vector3.one ); ??

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

83 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 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 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 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

2D occlusion culling - is this possible ? 1 Answer

Optimize Occlusion Culling and Particle Systems in a House sized scene 0 Answers

Rendering to screen with two different resoulution. 0 Answers

Occlusion Culling freeze standalone player (Unity 5) 1 Answer

Deleting GUI Layer creates GC Allocation? 1 Answer


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