Invisible materials still cast ground plane shadows #3624
Replies: 4 comments
-
Ha, saw this on Twitter and guessed there might be a bug report incoming... Looks like we're just failing to set the alpha parameters on our |
Beta Was this translation helpful? Give feedback.
-
Haha, didn't want to tag you, thought you'll see it here anyways :) |
Beta Was this translation helpful? Give feedback.
-
Partly; we may also need to trigger a shadow re-render. Do you want to give it a shot? I'm busy with some test infra at the moment, so it may take me some time to get to it. |
Beta Was this translation helpful? Give feedback.
-
Hmm, this may not be so easy after all. Shadows use an override material, so it's uniform across all the objects. Plus it has no connection to things like the glTF MASK/BLEND modes, etc. And in blend mode, honestly it's pretty unclear what the right answer would be anyway. I think this may be part of a feature request for transparency-aware shadows (blue shadow for light through blue glass, etc). I'm afraid this is out of scope for us at the moment. It looks like you're trying to accomplish mesh variants using the material variants extension, is that right? I think this would work if we actually set the visibility on these objects. I've been considering adding that as an API for awhile, just waiting for a good reason. Maybe this is it. Honestly, we get so many questions about hiding objects that we should really make a decent example so we can make sure it all works well. Any interest in working together on it? |
Beta Was this translation helpful? Give feedback.
-
Description
Looks like the ground plane shadows don't take alpha clipping into account, leading to implausible results - there's a cube here with alpha=0, cutoff=0.5 and mask mode:
Live Demo
Sphere with an invisible cube:
CutoutTest.zip
Bit more complex - this file contains three variants. Switching variants should ideally recalculate ground shadow:
VariantTest.zip
Version
Beta Was this translation helpful? Give feedback.
All reactions