Search Unity

3.2 Water over billboard trees

Discussion in 'Editor & General Support' started by Quanhan, Feb 11, 2011.

  1. Quanhan

    Quanhan

    Joined:
    Feb 11, 2011
    Posts:
    5
    I have a graphics where the new 3.2 water is appearing over the top of trees once they turn into billboards like this screenshot:



    I have a ATI 4870 running the 11.1 drivers. It does this on all of my projects except one, and I can't work out why its fine on that scene.
     
  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I would create a minimum sized project that recreates this issue and file a bug report. As I understand it, the new ocean shader is a work in progress, not all its features were finished in time for the release of 3.2. It could also be that something in your water shader settings is causing this, the new shader is pretty complex (I'm still a long ways from completely understanding it myself).
     
  3. Quanhan

    Quanhan

    Joined:
    Feb 11, 2011
    Posts:
    5
    I have found out what is causing this in some projects and not others.

    It only does it when deferred lighting as the rendering path. If I use forward it doesn't clip over billboards. Instead I get a strange double reflection based on where the camera is looking :(
     
  4. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I'm also seeing weird reflection / refraction errors when using forward rendering. I've submitted a bug report and suggest you do the same.
     
  5. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    I get the same here.

    deferred rendering and the bilboarded trees are displayed behind the new water.
     

    Attached Files:

  6. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    I quickly created a Project scene and with default assets likewise got the same result

    Filed a bug report with project folder.
     
  7. Quanhan

    Quanhan

    Joined:
    Feb 11, 2011
    Posts:
    5
    Thanks for the replys, I think I have found another bug which is related and I am putting together a bug report / project. At least I know I am not alone with this issue :)
     
  8. CodeMonkey

    CodeMonkey

    Joined:
    Mar 2, 2011
    Posts:
    1
    You can fix the issue by changing the queue order for the water. Edit FX-Water3.shader and replace all instances of:
    "Queue"="Transparent"
    to
    "Queue"="Transparent-200"

    The billboard trees use Transparent-100, and the water just needs to come first

    Note that you'll probably need to restart the editor for the change to take effect, that seems like a bug as well....
     
    dome281095, realGalaxy and croco2 like this.
  9. Quanhan

    Quanhan

    Joined:
    Feb 11, 2011
    Posts:
    5
    This works perfectly, thanks :)
     
  10. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    friendly reminder

    -bump-

    candidate 1 3.4 released
     
  11. winterkewl

    winterkewl

    Joined:
    Oct 28, 2011
    Posts:
    53
    Wow thanks for this tip, the same problem still exists in the 3.5 water4 shader and this fixed it right away. Thanks!
     
  12. Zaffer

    Zaffer

    Joined:
    Oct 21, 2010
    Posts:
    266
    Hi CodeMonkey,

    I have a similar problem only with a Transparent/Bumped Specular shader which I used for a river and lake water. As you can see from the attached picture, the river/water shows through the tree in front of it, but only when the tree is billboarded.
    You wrote:
    Your code sounds like it would work for me, but I can't find an edit button for the Transparent/Bumped Specular shader. Is there a way to edit this shader? Thanks.
     

    Attached Files:

  13. Zaffer

    Zaffer

    Joined:
    Oct 21, 2010
    Posts:
    266
  14. maskayop

    maskayop

    Joined:
    Oct 11, 2014
    Posts:
    2
    I fixed this problem by changing shader FX/Water4.

    Everywhere in
    Tags {"RenderType"="Transparent" "Queue"="Transparent"}
    I just commented out the words "Queue"="Transparent", like this:
    Tags {"RenderType"="Transparent"}// "Queue"="Transparent"}
     
  15. domoperk

    domoperk

    Joined:
    Feb 25, 2015
    Posts:
    1
    The solution that maskayop provided worked great! Thank you! Unity4.6
     
    Pozonu likes this.
  16. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    This is not a solution, if I do this, a set of 9 water advanced (4) patches will not render anymore, only the closest one of the 9 will render.
    I cannot believe this bug is in since Unity 3 and never fixed even in Unity 5.
    At least, changing that on Water4 advanced on Unity 5.0.1 Mac
    Some words about this from Unity ?
     
  17. AleksZotov

    AleksZotov

    Joined:
    Nov 3, 2014
    Posts:
    3
    In Unity 2017.1.0f3 bug Water4 is corrected by the change "Render Queue" to "Geometry".
     

    Attached Files:

    egartnuc and dudester like this.
  18. egartnuc

    egartnuc

    Joined:
    Jun 2, 2018
    Posts:
    23
    Worked for me, as well. Just interresting how this problem just popped for me from nowhere, after numerous create/delete terrains and water4's in the same project, this S*** happened. Oh well. Solved. Thanks.
     
  19. dtagame

    dtagame

    Joined:
    Apr 1, 2021
    Posts:
    1
    Good Lord... you save me man, I was having the same issue in Unity 2020.3.1.1f the problem was solved by changing the Render Queue to geometry
    Captura de Pantalla 2021-06-01 a la(s) 09.41.32.png