gameboy Posted January 23, 2021 Report Share Posted January 23, 2021 When I rotate the camera lens, the shadow on the roof of the Municipal Center will flicker, and the color of the shadow will change from dark to light. 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 23, 2021 Author Report Share Posted January 23, 2021 (edited) @vladislavbelov @Stan` Please help me. commands.txt Edited January 23, 2021 by gameboy 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 24, 2021 Author Report Share Posted January 24, 2021 @Stan` @vladislavbelov Today, I tested the latest SVN24778, the shadow flickering problem still exists, please help me. Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 24, 2021 Author Report Share Posted January 24, 2021 @wraitii Please help. Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 24, 2021 Report Share Posted January 24, 2021 Flickering was also in a A23 it's not a new bug. Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 24, 2021 Author Report Share Posted January 24, 2021 @Stan` How to solve this problem? Can you provide a patch? Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 24, 2021 Report Share Posted January 24, 2021 I'm not sure. 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 24, 2021 Author Report Share Posted January 24, 2021 About @vladislavbelov? Quote Link to comment Share on other sites More sharing options...
gameboy Posted January 24, 2021 Author Report Share Posted January 24, 2021 @vladislavbelov My friend, can you come up with a patch for this problem? Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 4, 2021 Author Report Share Posted February 4, 2021 @vladislavbelov @Stan` I tested again and found that other maps did not have this problem, only this map had this problem. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 4, 2021 Report Share Posted February 4, 2021 It's part of a larger problem of models self-shadowing. Could be a shadow rendering bug or a model mesh issue (maybe some seams need welded, or there could be duplicate faces causing some sort of Z fighting). Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 4, 2021 Author Report Share Posted February 4, 2021 I agree with you that it needs his( @vladislavbelov ) help! Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 5, 2021 Author Report Share Posted February 5, 2021 I tested the latest SVN24835 and the problem still exists Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 5, 2021 Report Share Posted February 5, 2021 (edited) This kind of problem is typical of games using the method whereby the scene is rendered to a depth texture from a light source, and then the depth info is transformed and compared with when rendering from the camera. "Depth buffer" is it called? Precision is a big issue with this method. There are offsets that can be tweaked, but ultimately you'll end up either with shadows that don't make it like they should, or light that doesn't make it that should have. I once saw a paper about a possible solution for this problem, but I no longer have the link; it involved transforming the scene BEFORE rendering the depth textures, then compensating for it numerically in the depth render, so as to end up with a depth buffer that roughly aligns with the view frustrum and better uses the depth bits. A more expedient solution is to make sure the assets don't have cases of self-shadowing that's cast too shortly (from too shallow a depth difference). In the case of the building shown a few posts back, making that ledge twice as high would probably cure the problem, if the problem is what I think it is. Edited February 5, 2021 by DanW58 1 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 5, 2021 Author Report Share Posted February 5, 2021 I would be happy to test a patch if it comes out. Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 5, 2021 Author Report Share Posted February 5, 2021 @wraitii Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted February 5, 2021 Report Share Posted February 5, 2021 9 hours ago, DanW58 said: This kind of problem is typical of games using the method whereby the scene is rendered to a depth texture from a light source, and then the depth info is transformed and compared with when rendering from the camera. "Depth buffer" is it called? Precision is a big issue with this method. There are offsets that can be tweaked, but ultimately you'll end up either with shadows that don't make it like they should, or light that doesn't make it that should have. I suppose the mentioned problem is more about the light space moving. So each next camera position (particularly rotating, it's not so visible during camera translating) a shadow map texel has a different position in the real world space. 9 hours ago, DanW58 said: I once saw a paper about a possible solution for this problem, but I no longer have the link; it involved transforming the scene BEFORE rendering the depth textures, then compensating for it numerically in the depth render, so as to end up with a depth buffer that roughly aligns with the view frustrum and better uses the depth bits. We already have a some kind of solution for that. It's not the production ready, but it works. I plan it for A25. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 5, 2021 Report Share Posted February 5, 2021 (edited) Ah, really glad to hear you guys are working out a better solution. In the meantime, perhaps all this needs is a little bit of offset. I was looking through the shadow parts of the code and could not find a single offset tweak parameter anywhere. I think a tiny bit of tweaking is needed to make sure shadows are not killed by rounding errors. But perhaps there is tweaking in the shader; haven't looked at your shaders yet; not even sure what language they are in; I used to do a lot of glsl hacking in the good old days. Edited February 5, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 5, 2021 Report Share Posted February 5, 2021 Its GLSL and ARB Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 5, 2021 Report Share Posted February 5, 2021 Stan, thanks, but I can't seem to find any glsl files. I looked under graphics, under rendering... all I find is .h and .cpp files. Then again, I don't remember what the extension was for glsl files; it was 15 years ago... Quote Link to comment Share on other sites More sharing options...
nani Posted February 5, 2021 Report Share Posted February 5, 2021 (edited) they are inside the folder binaries/data/mods/*/shaders Edited February 5, 2021 by nani Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted February 5, 2021 Report Share Posted February 5, 2021 3 hours ago, DanW58 said: In the meantime, perhaps all this needs is a little bit of offset. I was looking through the shadow parts of the code and could not find a single offset tweak parameter anywhere. Shadows have offset, it's called bias. But it won't help here, since offset/bias removes flickering on surfaces that cast and recieve own shadows. But the issue above is about flickering on edges when camera is rotating. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 5, 2021 Report Share Posted February 5, 2021 /binaries/data/mods/public/shaders/glsl ? Ah, yes... Good job with the shaders... Looking at water_high.fs and so far I find nothing to fix. Except Fresnel, maybe; I once implemented real Fresnell, the whole equation, no simplifications, and it looked a lot better than any approximation. That was after 2 weeks of trying to find a good simplification, using DataFit, and finding nothing that approximated real Fresnel well enough, and finally biting the bullet and doing it by the book. Anyways, getting off topic here; can't say I understand how bias would not help, not that I insist it would. Anyhow, if a better solution is in the works, I rest my case. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 6, 2021 Report Share Posted February 6, 2021 (edited) On 04/02/2021 at 4:01 AM, wowgetoffyourcellphone said: It's part of a larger problem of models self-shadowing. Could be a shadow rendering bug or a model mesh issue (maybe some seams need welded, or there could be duplicate faces causing some sort of Z fighting). Indeed, a duplicate face could be the culprit. Does anybody know the filename/path of that mesh? I'd like to look at it in Blender. Edited February 6, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 6, 2021 Report Share Posted February 6, 2021 13 minutes ago, DanW58 said: Does anybody know the filename/path of that mesh? I'd like to look at it in Blender. binaries/data/mods/public/art/meshes/structural/ptol_civic_centre.dae 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.