Author Topic: Global Snow 2 Decals Version Causing Transparent Trees on LOD2 Branches  (Read 706 times)

whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi folks,

I've run into another issue, this time with SpeedTrees becoming transparent so you can see behind them, just like grass becoming transparent problem. I've narrowed it down and it only happens on LOD2, not LOD0 or LOD1, and it only seems to affect the Branches. Fronds and leaves are not impacted. So I have an okay workaround right now of changing LOD2 Branches shaders back to normal Nature/SpeedTree shaders instead of Global Snow 2/Nature/SpeedTree shaders, but it would be preferable to have that fixed.

I have reproduced it by creating some Palm SpeedTrees from the free SpeedTrees pack, moving their LOD0 and LOD1 sliders way to the left so you get the LOD2 very quickly when backing up. You don't even have to enter play mode; you can see it from the editor. Just scroll back away from the palm trees and as soon as you hit LOD2 to they will become transparent. I created some colored terrain just so it would have something to contrast against and so you could see the terrain through the tree.

Here's my project where I reproduced it: https://drive.google.com/file/d/1evFXNbQwh5HgKxyli7qhX7BmrwFnqTs1/view?usp=sharing

Thanks!

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5943
    • View Profile
Thanks for the project, will take a look into it soon and get back to you.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5943
    • View Profile
It seems I can't replicate the issue with the different LODs or billboards:
Here's a video with some tests: https://youtu.be/D2yptmLBzRA

The original trees were "Tree Creator" trees and not SpeedTrees so I added one Palm speedtree.
You can see in the video the billboards react to the "Billboard Coverage" but they never get transparent..

Maybe the repro scene was not saved correctly?

whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi,

Here's a video of the issue:  https://youtu.be/AeZCX5_WOaU

I think I might have had both versions of the test project in that zip, so I repackaged it to eliminate confusion. Here's an updated version:

https://drive.google.com/file/d/1B-zeG_aXHYsWDd_d9w0z8Fk5mXGxyb8s/view?usp=sharing

I just used that exact version to make the video showing the issue.

Thanks!

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5943
    • View Profile
Thanks for the new project. Yes, it confirms there's no transparency issue - it's the "style" used to cover billboards. To add variety to the snow over the single billboard quad (since billboards have uniform normals), it uses the albedo green color as a "noise" factor, producing that kind of effect.
I've improved the billboard shader so it gives more importance to the vertical position. Check out latest v1.4.1 version and use the "Billboard Coverage" slider in the inspector to control the amount of snow on those billboards.

whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi,

Unfortunately that does not appear to have fixed the issue. I still think it is about LOD2 and not Billboards. Here's a screen shot from my project using the new version of your Global Snow Decal version:


A before and after:


You can see right through the trees. The light shines through them, you can see the sky/hills that are behind them drawn through them.

I think it's LOD and not billboard because when I turn the shader LOD2 branches (just branches, not fronds or leaves or whatever) from Global Snow 2/Nature/SpeedTree back to just Nature/SpeedTree the issue no longer occurs.

Edit: I added a video.

https://youtu.be/3UJhczg8CaE
« Last Edit: January 20, 2020, 05:55:13 PM by whydoisay »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5943
    • View Profile
Thanks for the video. I just tested the repro project on a different machine and still couln't reproduce the issue.
According to the video, it looks like you're using a sky manager or bloom/depth of field effect. Can you disable it and verifying if it's interfering in some way?


whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Hi,

I'm using Enviro Sky & Weather with the Distance Blur enabled. I'll try disabling some stuff.

Will report back!

whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Okay after some extensive testing, I can pretty definitively identify where the problems are coming from. When Enviro Sky & Weather has distance blur, volume clouds, OR fog enabled, the trees turn transparent when you get far enough from them. And it's definitely LOD2 AND Billboard, because when I have Billboard using Nature/SpeedTree Billboard and LOD2 is still using GlobalSnow/Nature/SpeedTree you can still see through the tree before it gets to billboard and becomes solid again. But if you have fronds/leaves stay GlobalSnow/Nature/SpeedTree on LOD2 and JUST switch branches to Nature/SpeedTree it's no longer see through.

If you have volume lighting, flag clouds, sun light shafts, and moon light shafts enabled, no problems.

However, none of these problems come up if I have LOD2 and Billboard using the Nature/SpeedTree and Nature/SpeedTree Billboard shaders respectively. I can get by using the Global Snow/Nature/SpeedTree shaders for LOD0 and LOD1 and the regular Nature/SpeedTree for LOD2 and Billboard if I have to, but I guess the question is what is different about the GlobalSnow/Nature/SpeedTree shaders that doesn't work with Enviro's distance blu, volume clouds, and fog when regular Nature/SpeedTree shaders do no have the same issue?

Thanks.
« Last Edit: January 24, 2020, 11:18:33 AM by whydoisay »

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5943
    • View Profile
I've tested with Enviro and could reproduce the issue. Image effects that depends on depth buffer produce a similar issue with renderers that do not write to camera depth buffer. I've modified the billboard shader of the snowed speed tree so it should fix the issue. Please try the updated package from the beta board (beta 3).

whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Great! Thanks very much! I appreciate all your efforts.

whydoisay

  • Newbie
  • *
  • Posts: 18
    • View Profile
Okay, I've had some time to test it pretty thoroughly and there's good news and bad news. The good news is that the transparent tree issue is fixed in both LOD2 AND billboard! Thanks very much for that!

I am, however, noticing a new issue where when you go from LOD2 to billboard, for some reason billboard is much brighter than LOD2, as if it were glowing. Almost like an emission is applied to it.

Here's a video if it occurring:

https://youtu.be/JDrzTQqx9hE

Thanks!

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5943
    • View Profile
I've clamped the snow contribution in the billboard shader to avoid overexposure (use the new beta). However, since the billboard has no normals, the shader uses a different way to compute snow. You may need to reduce the "BillBoard Coverage" slider. If problem persists, maybe the lighting is causing this. In that case, could you send me a new repro with same settings, including Enviro?
« Last Edit: January 27, 2020, 12:48:26 AM by Kronnect »