Use Occlusion Culling like a PRO | unity advanced tutorial

Поділитися
Вставка
  • Опубліковано 26 чер 2024
  • You know how to use occlusion culling?
    Do you want to be better at it?
    Here you will learn everything there is to know about how to use occlusion culling. Using Area, Portals and more!
    Join my discord:
    / discord
    www.patreon.com/NerdHead?fan_...
  • Навчання та стиль

КОМЕНТАРІ • 42

  • @NF-pk5mo
    @NF-pk5mo 2 роки тому +10

    Thank you so much, I had assumed backface threshold affected the geometry only, and not the bake data. I turned it back to 100 and it fixed all my issues!

    • @NerdHead
      @NerdHead  2 роки тому +1

      I'm glad I could help😁

  • @GocoYT
    @GocoYT 3 місяці тому

    Thank you - this issue was killing my frames in high object areas. I tried googling the issue for ages and finally found your video to help! :D

  • @ArjanDuijs
    @ArjanDuijs 2 роки тому +6

    cheers man, lots of info. well done! ill need to view it a couple of times

    • @NerdHead
      @NerdHead  2 роки тому +1

      Glad you love it😁

  • @Jimaniki
    @Jimaniki Рік тому +2

    Thanks, your tutorials are very good, i hope you will continue

    • @NerdHead
      @NerdHead  Рік тому +1

      Thank you very much, I am still posting but slow.. Some cool stuff coming soon😁

  • @jonathandelgado2425
    @jonathandelgado2425 Рік тому +1

    Great job explaining. Very useful video.

    • @NerdHead
      @NerdHead  Рік тому

      Thank you very much, if you need any other subject, let me know and I will make it😁

  • @hernandonj
    @hernandonj 2 роки тому +1

    Excellent video, Thank you!

    • @NerdHead
      @NerdHead  2 роки тому

      Thank you again😊 I really appreciate you going from one video to another. It lets me know that I am doing something right and gives me great motivation to make more videos😁🙏

  • @BadBanana
    @BadBanana Рік тому +1

    Occlusion portal
    That's what I needed man thank you
    I've got windows with custom transparent mesh renders

    • @NerdHead
      @NerdHead  Рік тому

      I an just working on a windows & mirror tutorial

    • @BadBanana
      @BadBanana Рік тому

      @NerdHead actually it diddnt work in the end what I did was make the rooms non static so the insides weren't occluded.
      I wanted them to be excluded from rendering when miles out but this was a workaround I ended up settling for.
      Custom gfx can be cumbersome at times
      I'd be interested to see your window tutorial
      I have mirrors that work pretty well... Well... they're a bit wierd
      They render the reflection of the scene but not the character facing them
      I think real-time mirrors on mobile would be too heavy to have them all over the place considering how many I'd end up with in my city scene
      But yeah
      They work fine for what they are
      Cheers

  • @brsgames5087
    @brsgames5087 Рік тому +1

    thank you!

  • @StillCisTho42
    @StillCisTho42 Рік тому +2

    Thanks for the video dude, I´m making an isometric game and was under the impression the backface threshold was going going help me hide the back walls of my buildings but that doesn´t seems to be the case. I´m just gonna remove the back geometry directly in Blender. TY

    • @NerdHead
      @NerdHead  Рік тому

      Happy to help😁
      You can look up LOD in unity, this might help you in your case

  • @slendiv13
    @slendiv13 Рік тому +1

    Thank you. You really made my life easier

    • @NerdHead
      @NerdHead  Рік тому

      Nice! What are you working on?

    • @slendiv13
      @slendiv13 Рік тому

      @@NerdHead HDRP horror game. That's why I need a lot of optimisations 😂

  • @Baddogz
    @Baddogz Рік тому +1

    very under subbed channel, great job!

    • @NerdHead
      @NerdHead  Рік тому +1

      Thank you so much! Because of this comment I set down to finish a new video (next next one out is because of you 😁)

  • @shyamarama
    @shyamarama 2 роки тому +1

    Nice!

  • @hieptranngoc2584
    @hieptranngoc2584 6 місяців тому

    thanks

  • @Disisameme
    @Disisameme 10 місяців тому

    i did it like in the video but unity i still rendering object behind other objects, anyone knows how to fix it?

    • @hggyuu
      @hggyuu 8 місяців тому

      Do you fix it? I'm making maze and camera still visualize itself view but it shouldn't render when I standing under wall and don't see nothing behind, but it still render all camera view ahead

  • @hymus8627
    @hymus8627 Рік тому +1

    When we bake it really work now right ?
    because when we exit visaulize mode it look like nothing change but when we play it actually change right ?

    • @NerdHead
      @NerdHead  Рік тому +1

      If it works in visualize mode, it will.
      You can enable and disable this and check to see if the game stats (fps and batches) changed

    • @hymus8627
      @hymus8627 Рік тому +1

      @@NerdHead Thank you my fps really change from 70-90 to 110-130

  • @Stumpy_VR
    @Stumpy_VR 2 місяці тому

    when i do that it makes everything dissapear

  • @DwightPotvin
    @DwightPotvin 2 роки тому

    I am unable to get this to work no matter what I try. I have the static set correctly, yet all I am getting is fulcrum culling. Small occlusee objects are not being culled out by large occluder objects. I have tried using occlusion areas and without them, same result.

    • @NerdHead
      @NerdHead  2 роки тому

      Hey, can you please send more info (what setting are you using, an image of your scene, are you using any assets?) and I will answer you as soon as I can.
      You can send it in discord server
      discord.gg/sZmAkFXeRT

  • @watercat1248
    @watercat1248 Рік тому +1

    thank but i still don't understand what is the occasion area
    one other thing is eny way to make wean player is insane in room to disable all the other rooms for the view ?
    (i know that is possible if i disable the room with code but what i say is if unity have system like this by default)
    in my game i have created a system for dynamic camera range before even learn abut Occlusion Culling the way this system works is pretty simple wean the player is in close area the see less and wean the player is in open area the see feather it very semple code
    this the triger eneter code
    private void OnTriggerEnter(Collider collision)
    {
    if (collision.TryGetComponent(out CameraDistans Distans))
    { Distans.Viewview_Distance(ViewDistances); }
    }
    and this the code for you need to add to the player
    public Camera camera;
    public void Viewview_Distance(float ViewDistances)
    {
    camera.farClipPlane = ViewDistances;
    }

  • @NikkiMcMistie
    @NikkiMcMistie Рік тому

    I must be doing something wrong... My camera still renders through walls no matter what I put as the parameters. All objects are static and are both ocluders and ocludees

    • @NerdHead
      @NerdHead  Рік тому

      Aee you using external assets?

    • @NikkiMcMistie
      @NikkiMcMistie Рік тому

      @@NerdHead Yeah. It seems that it only works for models that have backfaces as well, like unity cubes.
      I also did forget to click on bake for the static game objects so thats why nothing worked in the start lol

    • @hggyuu
      @hggyuu 8 місяців тому

      ​@@NikkiMcMistieSame problem, but I instisiate prefab walls on scene and then I can't bake it, it seems like it should be before starting scene, how to bake it after creating in play mode?

    • @NikkiMcMistie
      @NikkiMcMistie 8 місяців тому

      @@hggyuu it should work after baking it in edit mode before generating the scene in play mode. worked for me in unity 2021 yesterday anyway

    • @pranaygarg6443
      @pranaygarg6443 Місяць тому

      @@NerdHead @NikkiMcMistie same problem, I am using external assets but I have marked them occludee static, but still they are rendering through walls

  • @levanan6824
    @levanan6824 Рік тому +1

    Very nice!