Use Occlusion Culling like a PRO | unity advanced tutorial

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 44

  • @NF-pk5mo
    @NF-pk5mo Před 2 lety +12

    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  Před 2 lety +2

      I'm glad I could help😁

  • @ArjanDuijs
    @ArjanDuijs Před 2 lety +7

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

  • @GocoYT
    @GocoYT Před 5 měsíci

    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

  • @BadBanana
    @BadBanana Před rokem +2

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

    • @NerdHead
      @NerdHead  Před rokem +1

      I an just working on a windows & mirror tutorial

    • @BadBanana
      @BadBanana Před rokem

      @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

  • @drwuu596
    @drwuu596 Před 26 dny

    If I could thumb up this button 100 times, I would do it! Thanks a lot, I was stuck at: I deactivate my game object but occlusion still happen! Thank you !

  • @Jimaniki
    @Jimaniki Před rokem +2

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

    • @NerdHead
      @NerdHead  Před rokem +1

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

  • @StillCisTho42
    @StillCisTho42 Před 2 lety +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  Před 2 lety

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

  • @Baddogz
    @Baddogz Před rokem +2

    very under subbed channel, great job!

    • @NerdHead
      @NerdHead  Před rokem +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 😁)

  • @slendiv13
    @slendiv13 Před rokem +1

    Thank you. You really made my life easier

    • @NerdHead
      @NerdHead  Před rokem

      Nice! What are you working on?

    • @slendiv13
      @slendiv13 Před rokem

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

  • @jonathandelgado2425
    @jonathandelgado2425 Před rokem +1

    Great job explaining. Very useful video.

    • @NerdHead
      @NerdHead  Před rokem

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

  • @hernandonj
    @hernandonj Před 2 lety +1

    Excellent video, Thank you!

    • @NerdHead
      @NerdHead  Před 2 lety

      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😁🙏

  • @brsgames5087
    @brsgames5087 Před rokem +1

    thank you!

  • @JAKEAVALON-rg8xm
    @JAKEAVALON-rg8xm Před 2 dny

    What can happen if I do that to moving object?

  • @watercat1248
    @watercat1248 Před rokem +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;
    }

  • @hymus8627
    @hymus8627 Před rokem +2

    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  Před rokem +2

      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 Před rokem +2

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

  • @levanan6824
    @levanan6824 Před rokem +2

    Very nice!

  • @Disisameme
    @Disisameme Před rokem

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

    • @hggyuu
      @hggyuu Před 10 měsíci

      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

  • @DwightPotvin
    @DwightPotvin Před 2 lety +1

    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  Před 2 lety

      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

  • @Stumpy_VR
    @Stumpy_VR Před 4 měsíci

    when i do that it makes everything dissapear

  • @hieptranngoc2584
    @hieptranngoc2584 Před 8 měsíci

    thanks

  • @shyamarama
    @shyamarama Před 2 lety +1

    Nice!

  • @NikkiMcMistie
    @NikkiMcMistie Před rokem

    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  Před rokem

      Aee you using external assets?

    • @NikkiMcMistie
      @NikkiMcMistie Před rokem

      @@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 Před 10 měsíci

      ​@@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 Před 10 měsíci

      @@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 Před 3 měsíci

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