Search Unity

Occlusion Culling in PC/MAC???

Discussion in 'Editor & General Support' started by Juan, Nov 1, 2009.

  1. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    I have a city, and i have a lot of buildings, some of this buildings occlude other, that are near enought to be seen when you enter in a new street, but while you are not in this street you don't need to have it in the scene.

    Is there some kind of occlusion culling working automatically or is there some way to enable it?

    I think the buildings are loaded because there are inside the camera fustrum, but i cannot see them really.

    Thanks.

    Cheers.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    no, you need to implement such a system yourself
     
  3. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    Can you (or someone) suggest a path to achieve this?
    I'm not sure how to do that.

    Thanks and cheers.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I would recommend to check out gamasutra / gamedev.net on the topic.

    Likely you will use a portal - zone system
     
  5. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    Do you have the link, i'm looking for it in google and inside the sites but i cannot find anything with that topic.

    Thanks for your help, and sorry for bother you with the link thing :)

    Cheers.
     
  6. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    No link?

    I cannot find anything yet :p

    Cheers.
     
  7. lazalong

    lazalong

    Joined:
    Oct 13, 2009
    Posts:
    139
    Mh... the version comparison says that the iPod has occlusion culling: http://unity3d.com/unity/licenses

    Are you saying you don't have this feature on pc/mac?
    That would be strange, no?

    As http://unity3d.com/unity/whats-new/unity-2.6 says "we added ambient occlusion as a built-in feature".

    But I would love to have more info about this feature.
    Is it software based, hardware, both?

    Any body has more info?
     
  8. llde_chris

    llde_chris

    Joined:
    Aug 13, 2009
    Posts:
    205
    Ambient Occlusion and Occlusion Culling are very different.

    Ambient occlusion darkens corners etc in response to ambient light being occluded. Occlusion culling on the other hand reduces overdraw increasing performance dramatically for large indoor levels.

    I have no idea why iPhone gets occlusion culling while all the other versions of Unity don't though. Actually, I do find it strange that Unity doesn't seem come with any kind of occlusion culling.
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Unity iPhone and Unity are different apps right now, and have different development focus. It's more important to have this in Unity iPhone because of performance reasons. There are several features which were in Unity iPhone first, and were added to Unity later (for example, the "Is Readable" option for textures, Camera.layerCullDistances). So Unity will presumably get this eventually, and when Unity and Unity iPhone are merged, then I would guess they will both always have the same features.

    --Eric
     
  10. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    dreamora: can you drive me to those articles you talk about please? i don't find those.

    Cheers and thanks.
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The iphone only has a budget of 30 drawcalls instead of a 2000+ and a polygon budget of 15000 polygons.
    As such its a must have to do any 3D game at all in most cases.

    It was mentioned that it potentially will be backported to the desktop but thats surely no trivial task as the time to generate the occlusion on the desktop with significantly larger levels would be more than just long or require high end graphic cards. Already on iphone levels you can pretty "easily" spend hours to generate the data, on desktop games the gfx queries to generate the data would take significantly longer and the whole system is questionable there as you have the cpu power and graphics capabilities to handle it smarter.


    As for articles: I'm sorry but I can't offer any direct links.
    I built up my knowledge over the past years through various sources.