This sounds as if the light is not set to cast realtime shadows but baked shadows (baked lighting). Does the shadow also disappear when the light is set to dynamic (non-baked lighting)?
[UE4] Unreal Light Support
Harald wroteThis sounds as if the light is not set to cast realtime shadows but baked shadows (baked lighting). Does the shadow also disappear when the light is set to dynamic (non-baked lighting)?
https://i.imgur.com/c6kLa1s.png
https://i.imgur.com/06CihAt.png
https://i.imgur.com/0a9cpCK.png
I don't quite understand why the light is treating the movable Spine Skleton Renderer
this way, why it tries to treat it as if it were a static object, only casting baked shadow. This behaviour is rather inconsistent. Unfortunately I could not find any material or component settings that would solve this issue with Blend Mode
Translucent
.
Thus the solution (at least for now) should be to change the blend mode of the SpineUnlitNormalMatial
parameters as follows:
Change
Blend Mode
toMasked
.
Connect the
Opacity Mask
input pin from the sameMultiply
output pin that is going to the now grayed-outOpacity
input pin.
Could you please give this a try and let us know if it fixes the issue for you as well? Then we can include an additional material with the spine-ue4 runtime for casting shadows with these settings.
Harald wroteI don't quite understand why the light is treating the movable
Spine Skleton Renderer
this way, why it tries to treat it as if it were a static object, only casting baked shadow. This behaviour is rather inconsistent. Unfortunately I could not find any material or component settings that would solve this issue withBlend Mode
Translucent
.Thus the solution (at least for now) should be to change the blend mode of the
SpineUnlitNormalMatial
parameters as follows:
Change
Blend Mode
toMasked
.
Connect the
Opacity Mask
input pin from the sameMultiply
output pin that is going to the now grayed-outOpacity
input pin.
Could you please give this a try and let us know if it fixes the issue for you as well? Then we can include an additional material with the spine-ue4 runtime for casting shadows with these settings.
Hello! the result is already better! But the problem is in the translucency of the spine texture. They look terrible.
https://i.imgur.com/xjvoRM2.png
Do you mean the noisy pixels around the feet of the skeleton? Or the dark outline around the parts?
Unfortunately it seems that UE4 Materials don't allow for a combinartion of both alpha test ("masked", binary 0 or 1) and alpha blend (gradually translucent) functionality. So I'm afraid when using Blend Mode
Masked
, you sacrifice gradual alpha blending (semi-transparent regions), while on the other hand, when using Translucent
blending, it will not write to the shadow buffer, unless setting the light source Mobility
parameter to Movable
to still cast a shadow on translucent materials. As an alternative, you could split the mesh in two and assign different materials, but that's not a very elegant solution. So I assume setting the light source Movable
seems like the best option for your scenario unfortunately.
It's a pity that UE4's materials don't provide more fine-granular adaptations of these simple parameters.
Harald wroteDo you mean the noisy pixels around the feet of the skeleton? Or the dark outline around the parts?
Unfortunately it seems that UE4 Materials don't allow for a combinartion of both alpha test ("masked", binary 0 or 1) and alpha blend (gradually translucent) functionality. So I'm afraid when using
Blend Mode
Masked
, you sacrifice gradual alpha blending (semi-transparent regions), while on the other hand, when usingTranslucent
blending, it will not write to the shadow buffer, unless setting the light sourceMobility
parameter toMovable
to still cast a shadow on translucent materials. As an alternative, you could split the mesh in two and assign different materials, but that's not a very elegant solution. So I assume setting the light sourceMovable
seems like the best option for your scenario unfortunately.It's a pity that UE4's materials don't provide more fine-granular adaptations of these simple parameters.
Thx!