Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 4.3.1 Occlusion Culling and Water 4 reflection issue.

Discussion in 'Editor & General Support' started by derkoi, Nov 29, 2013.

  1. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    I'm having some unwanted effects where the reflection of trees on Water 4 are effected by occlusion culling in version 4.3.x It was fine with the only OC.

    Here's a video:



    Is there something I'm missing or is it a bug?

    Thanks
     
  2. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,616
    I suggest to file a bug report
     
  3. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    I can confirm this is an issue Unity3D has a realllllllyyyyyyyyyy long time. I reported this bug more then once using Unity3D. I also reported this bug on the forums but never ever had an answer.

    I have no clue what causes this. However I found out setting the occlusion culling unit size lower or higher changes the amount of errors in the reflection. I also found out when you are behind an Cube which has collision but mesh-render off, this happens like if it wants to hide the trees but only in the water reflection. So I had turned off all these invisible collision boxes there static Occludee / Occluder off. but still this was happening now and then.

    I would like to know the real issue behind this problem. Since 3.5 I have never been able to completly remove this issue from my games. I always ended up not baking occlusion for those parts having this reflection bug.

    I'm waiting for some inside info about this too, let's see if this time someone can find a solution. :)
     
  4. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
    That's interesting JDMulti, in my particular scene it was fine prior to 4.3, or at least unnoticeable.
     
  5. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,616
    I honestly would report the error for each new version of Unity...Unity guys are so busy that they mostly take in consideration only errors for the last published version.
     
  6. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    I have it troughout couple of project from Unity version 3.5 up to 4.3. Things disappear in reflections while clearly visible in the water. This happens a lot when using terrains with trees bushes or custom geometry on it. It's really anoying and it seems no one knows a solution to the problem. :/
     
  7. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,237
  8. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    That's indeed possible to fix it. However, turning this off in a scene with a huge terrain will skyrocket the drawcalls? I have to try this out. But I was completely sure Unity would handle geometry for reflection in combination with occlusion culling perfect. But when I have these errors in my reflection I can assume it doesn't handle culling for reflections that well :S

    Is this something that Unity Developers will work on, or do we have to get around it with this solution? Which means Occlusion Culling for reflection camera's isn't possible without render buggs.

    Would like to have an answer on that from Developers tho. maybe it isn't needed at all and does Unity already handle reflection geometry perfectly. But at this point I don't know.
     
  9. DMTSource

    DMTSource

    Joined:
    Jul 11, 2013
    Posts:
    36
    Yeah this is probably not a bug as its just the reflection and refraction cameras in the water utilizing the occlusion culling feature as mentioned above. You can go into the water scripts and add:

    refractionCamera.useOcclusionCulling = false;
    and
    reflectionCamera.useOcclusionCulling = false;

    in the appropriate locations for the pro water for example and things will work fine. Of course this will trash performance and increase the draw calls drastically so its suggested you have a highly optimized scene in mind. In my example I had a very complex scene that reflected hardly anything with layer masking, but I wanted to use the refraction to show a runway underneath the water without it getting the occlusion bug. Worked out great with OC off.
     
  10. mgc90403

    mgc90403

    Joined:
    Dec 24, 2013
    Posts:
    20
    Worked like a charm - thanks!!