Search Unity

Occlusion problem through arrowslits ( bug ? )

Discussion in 'General Graphics' started by grobonom, May 25, 2020.

  1. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Hi all :)

    First of all, lemme just introduce my whole scene:
    whole_scene.jpg
    A large medieval city in wich you can evolve at human scale through a 1st person view....

    A medieval city has arrowslits in its walls:
    arrowslit1.jpg

    My problem comes from occlusion system, culling things that should be seen through arrowslits.

    With the 2nd pic, it seems everything works fine from this side of the wall.
    Things to be culled are culled and things to be seen are visible.
    The problem comes when you look through the arrowslit from the other side of the wall:
    On this pic, all is okay:
    arrowslit2.jpg

    but on this one ( slight move of the camera from the previous pic ) the object behind the arrowslit disappears:
    arrowslit3.jpg

    The height of this 'hole' is usually between 0.8 and 2m
    and the width uses to be between 0.08 and 0.15m

    Of course i set up the min hole size to 0.04 in the occlusion bake params but even with this value, it appears umbra is unable to see through those arrowslits....

    Anyone got ideas of what's going wrong please ?

    Thanks in advance and
    happy unitying !
     
  2. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Bump ! :)

    Anybody for some advices please ?
     
  3. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    okay.
    I conclude noone uses U3D occlusion system...

    Too bad dev team wasted so much time on unused things :(
    Seems to be so usual :p

    Happy unitying !
     
  4. Tartiflette

    Tartiflette

    Joined:
    Apr 10, 2015
    Posts:
    84
    Have you tried adding occlusion portals in each arrow slit? I believe they are designed to do exactly that: force the occlusion system to consider holes that would otherwise get ignored.
     
  5. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Salut @Tartiflette :D

    To be honest i never caught the purpose of portals in occlusion system.

    I managed to solve my problem by lowering the smallest hole size but as expected, the occlusion data went from 7MB to 23MB :/
    With there setting things seem to work properly but am kinda deceived as most of the things i got to occude and most of my occluders are in a scal of several tens meters :/

    I gonna give a try on portals.....
    On simple scene and will report my results here.

    Thanks @Tartiflette for the idea :)

    Happy unitying !