Download

The sunlight shine over the hat to the hair

light_through2.png

How to fix it?

In blender, the hat’s normal are all facing outside, and render in Blender the hat does cast shadow to the head.

I tried export the hat and the character to UE4 separately. I found that once the hat quite close to the character, the light start shine through the hat. It only cast shadow once the hat move far away. How to solve this problem?

Check the /Per Object/ shadow bounding box on your hat because it’s probably encompassing the character once it gets to a certain distance. You may want to make the bounding box very tight to the hat so that this situation does not occur. Not sure this is your issue, but it’s the first thing I thought of. Here’s a doc on basic shadows and that bounding box Shadow Casting | Unreal Engine Documentation

Take a look at the Wiki Lighting Troubleshooting guide (linked in my signature). With a dynamic light you’ll need to adjust the shadow bias of the light source. Before that you may want to test giving the asset some thickness though.

How to editor Shadow bounding box? I can’t find it.

Did you fix this?

That issue is most likely do to shadow bias in the light settings: 6.1 - Shadow Bias | Unreal Engine Documentation
Due to how shadow maps can cause some artifacts at certain angles, the shadow bias setting prevents that but can make things appear to be floating rather than having the shadows connect directly with the object that’s casting it.
You can try to adjust the setting but if you can’t get the result you want there’s the Contact Shadows feature which can fill in those problem areas, though it has an impact on performance: Contact Shadows | Unreal Engine Documentation