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. Dismiss Notice

Bug Object shadows changing shape & turning on/off + popping in/out broken billboards(?)

Discussion in 'Editor & General Support' started by LastFractal, Oct 9, 2023.

  1. LastFractal

    LastFractal

    Joined:
    Mar 6, 2022
    Posts:
    25
    I'm facing this issue since a few months. I thought it was only the tree models that had this issue, but turns out the bush models (which are set to static) share the same behavior too. I'm using mixed lighting.

    I believe this is caused by some shader but I'm not sure (FYI, I'm using CTI (Custom Tree Importer) shaders for the trees). I attached a GIF down below, which you can clearly see bushes changing shapes:

    giphy.gif (480×270) (It doesn't show this specific gif here for some reason)

    There is a weird behavior on trees too, I believe they don't fade from billboards/LODs to full models properly. Focus on the small tree:


    I ran out of clues. How can I fix this? There are too many options for lighting and graphics so I'm not attaching all of them. But I may attach the one you're curious about.

    Asset store link to the tree asset I'm using, which also includes the CTI shaders. Bushes are not included.

    I'm using 2022.3.10f1 LTS with URP.
     
    Last edited: Oct 10, 2023
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,749
    The way the leaves pop into view when the trunk becomes visible behind the other trunk makes me think it might be occlusion misconfiguration, eg, occlusion that does not consider the entire tree.

    You can trivially prove / disprove it by disabling occlusion temporarily.
     
  3. LastFractal

    LastFractal

    Joined:
    Mar 6, 2022
    Posts:
    25
    I disabled both Occlusion Culling and Ambient Occlusion, but unfortunately the results were the same.

    However, I always get some shaders errors on build which I think they're related with this issue:
    upload_2023-10-10_12-58-12.png

    Another thing I want to add is that, the shadows of these bushes here only gets broken on build (they work completely fine in the editor). However, the tree models popping in/out issue always exist on both build and the editor.

    I don't think it's related to occlusion though. What happened on the GIF was likely coincidental. Because when I move the camera at a certain distance, they change shape (I had to zoom in because it only happens within a certain distance, it has terrible quality but you should be able to notice it) (and again, this is after I disabled both the Occlusion Culling & Ambient Occlusion):
     

    Attached Files: