ted.mcclung Posted August 29, 2016 Share Posted August 29, 2016 We've been experiencing a bug for a while where our tree billboards would flicker black in a really obnoxious way, that looked a lot like z-fighting. Recently though I've tracked it down and discovered that it isn't caused by z-fighting after all. We assumed it was so dark because it was caused by shadowed billboards being sorted incorrectly and showing up in front of other trees, but it's actually a problem with alpha testing not working properly. The first attached image shows this problem manifesting itself in a line. This is the point where the juniperoxy billboard intersects the willow billboard (the tree). You can see this in the second image where alpha test is turned off for the juniperoxy. Looking at the 4th image, you can see it's not just rendering black pixels there, it's actually rendering the transparent portion of the billboard image as opaque. For some reason when two billboard polys intersect in a certain way, it renders part of the image at 100% opaque alpha. In the short term, I've worked around this by painting a green tree pattern into the black portions of the tree billboards, and it's reduced the amount of flickering the user can see, however it's still very noticeable on groups of trees with some color variation. Is there a fix for this? We're on version 2.2.1, btw. Link to comment
silent Posted August 30, 2016 Share Posted August 30, 2016 Hi Ted, Could you please provide a small test scene with your billboards? It will surely speed up this problem fixing. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
ted.mcclung Posted September 2, 2016 Author Share Posted September 2, 2016 Here's a test scene. The problem happens mainly for distant trees, and is much more obvious when the camera is zoomed in. unigine_project.rar Link to comment
silent Posted September 5, 2016 Share Posted September 5, 2016 Hi Ted, Thank you for the test scene. Could you please also give us advice where to put the camera and what steps we need to do to actually see the described issue? I've tried to fly around and disable Alpha test for juniper materail, but can't get the same results that you show us in the first post. Maybe I'm doing something wrong? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
dred Posted September 7, 2016 Share Posted September 7, 2016 Silent, Put the camera around 450, 450, 200, look down a little bit so that all of the trees are in view and use the mouse to look left and right, while the camera is moving you see quite a bit of black flickering. from this position i can see the issue Ted outlined in his first image in a couple of spots also the issues in the fourth picture. Its a little more prominent if you disable the Juniper node, also reducing the FOV on the camera helps, if you change it to 15 degrees, you can pick out the individual issues a bit easier. Here are a couple of images on the test scene, they both have the Juniper disabled, one is at the default 60 FOV and one is at 15. Thanks for any help you can provide, Dusty Link to comment
silent Posted September 8, 2016 Share Posted September 8, 2016 Hi Dred, Thank you for the update. Indeed, there is a bug in 2.2.x version with grass imposters. It seems that I can't reproduce it with current 2.3 stable version. Unfortuantely, we either can't provide you a small fix, because rendering changes internally were too complex and some parts of the code were heavy refactored, sorry. If you will upgrade your projects to 2.3 you will have correct impostors rendering. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
dred Posted September 9, 2016 Share Posted September 9, 2016 Silent, It does look like it's fixed in 2.3. I was hoping there might be a simple shader fix, We are currently working on the update, but with the limited time we have remaining for our release it becomes a much larger task. Thanks Dusty Link to comment
justin.ead Posted September 16, 2016 Share Posted September 16, 2016 Discarding certain alpha pixels in the deferred shader in the same fashion as the depth and auxiliary shaders results in the above alpha-related z-fighting disappearing, although there still remains a handful of normal opaque ones that z-fight. Ultimately, turning on logarithmic depth or using the new inverse z depth in 2.3 also fixes all of it by preventing the trigger of identical depth values from occurring in the first place. Link to comment
Recommended Posts