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 /
  • Help Room /
avatar image
0
Question by globalenemy · Nov 02, 2015 at 02:04 PM · cullingocclusion

Culling and a sphere

I have a large sphere and alot of objects moving around it. When theese objects are behind the sphere they obviously don't need to be rendered. When I was making maps with Radiant there were theese things called portals, but since there now is a game called f-ing PORTAL I couldn't find anything when searching with that word. A day later I found out about "Occlusion Culling" and I played around a bit with that after reading some stuff.

This is how far i got with it: http://gfycat.com/DeepWindyLark

now the objects behind the sphere are still rendered until I get reeeeally close to my sphere. That's a start, but not my goal. I thought maybe it could work if I add a circular plane inside my sphere but that had no effect.

I really don't understand this topic that well and I'm out of ideas in how to search for some answers. I don't know if occlusion culling is the right way here, or if I am doing it wrong.

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

1 Reply

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

Answer by Statement · Nov 02, 2015 at 02:17 PM

First off, don't expect occlusion culling to be 100% perfect. Occlusion culling subdivides your scene into PVS and it could be useful to visualize the volumes to get a sense of how it works.

Secondly, moving objects need Occlusion Areas.
Try placing an Occlusion Area around your sphere.

If you haven't already, reading everything in the manual about occlusion culling is a start. If there are phrases or topics that you don't understand, figure out what those mean, and then read it over again.

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 Statement · Nov 02, 2015 at 02:21 PM 0
Share

If you want to make your own occlusion culling, you could also project the sphere into 2d viewspace together with the bounds of objects in the scene and turn off renderers if they are inside the 2d "flattened sphere". Note that it will not be a simple circle test because viewing from an angle will shear the shape. But I haven't thought long and hard on it, it's just what popped up in my head.

avatar image globalenemy · Nov 02, 2015 at 03:27 PM 0
Share

Occlusion Areas make it work, kind of. It's pretty hard to place theese areas around a sphere.

Is it bad to have a 'moving' and maybe even 'changing' Occlusion Area? I attached a single OA to my camera and it seems to be working. But I would also need to change the sizes of the OA, while moving the camera, to make it work completly (since a OA can't rotate).

avatar image Statement globalenemy · Nov 02, 2015 at 03:34 PM 0
Share

I was under the impression that you'd put the OA to cover the sphere and generate cells, or possibly put several OAs around the surface of the sphere. I don't think OAs are supposed to be moved around, but I also don't know if it's ok to move them around. Generally when it comes to baked/cached/structures I assume that data has to be rebaked if parameters change. Try out what works and what not. Run the profiler and see if you get any performance warnings. (See profiler)

You can see the warning triangle on the right side in this screenshot from the manual. In that example, Crowd$$anonymous$$anager.Update does 12 things that are flagged as warning. Drilling down the tree would reveal which calls Unity flags warnings for.

avatar image globalenemy Statement · Nov 02, 2015 at 04:00 PM 0
Share

I was under the impression that you'd put the OA to cover the sphere and generate cells

When I was looking at the pictures in the manual I thought that OAs don't work like that. I didn't even think of doing just one OA around the scene. Just tried that and it does the job perfectly. Now, as long as my camera is also inside the OA, objects behind the sphere disappear like they should.

http://gfycat.com/SkinnyEuphoricIslandcanary

Thank you very much, for the help!

ps: Unity Tech. please update that $$anonymous$$anual!

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

32 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

Related Questions

Light.layerShadowCullDistances not working 0 Answers

Occlusion culling rendersing through walls and objects (everything is static) 1 Answer

Is using multiple cameras, culling masks, and layers expensive on mobile? 1 Answer

How do you use "UnityEngine.Rendering.CullMode.Off"? 1 Answer

Is there a way for a camera to cull an object that doesn't have a MeshRenderer? 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