# Self Shadow in realtime?

**URL:** <https://forums.unrealengine.com/t/self-shadow-in-realtime/373728>\
**Category:** Rendering\
**Tags:** Shadows, cast-shadow, unreal-engine, question\
**Created:** [October 19, 2016, 1:18am UTC](https://forums.unrealengine.com/t/self-shadow-in-realtime/373728 "2016-10-19T01:18:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MathieuSP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MathieuSP](https://forums.unrealengine.com/u/MathieuSP)\
**Post date:** [October 19, 2016, 1:18am UTC](https://forums.unrealengine.com/t/self-shadow-in-realtime/373728/1 "2016-10-19T01:18:48Z")

</div>

Hello! 🙂

I’m working on a project. Actually it’s just to render a character. So I was playing with the lights to see what I can do.

I have this result with a spot light :

[http://www.mathieusimonprost.com/images/shared/char\_original.jpg](http://www.mathieusimonprost.com/images/shared/char_original.jpg)

It’s not that bad, but the cast shadow is kinda wierd.  
The shadow should be more something like that (done in photoshop) :

[http://www.mathieusimonprost.com/images/shared/char\_photoshopped.jpg](http://www.mathieusimonprost.com/images/shared/char_photoshopped.jpg)

The question is : Is there something I missed to render a better realtime self/cast shadow or should I have to bake a lightmap on my mesh?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c62419a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c62419a](https://forums.unrealengine.com/u/anonymous_user_0c62419a)\
**Post date:** [October 19, 2016, 5:41pm UTC](https://forums.unrealengine.com/t/self-shadow-in-realtime/373728/2 "2016-10-19T17:41:40Z")

</div>

Hi MathieuSP,

When it comes to very small areas of the mesh like nostrils you can lower the Shadow Bias to create more accurate shadows. The lower the number the closer the shadows will generate relative to the caster surface. Here is a before and after pic of default Shadow Bias vs Shadow Bias = .02

 ![111591-defaultshadowbias.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/4/474d35b7c2466878a6dcdb1e4883b5dbb9f2f1f8.jpeg)

 ![111592-lowshadowbias.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/6/296bb9db993764673793e4314333a16d13a18ec7.jpeg)

You can also increase the value of contact shadow length however, the results don’t look quite as good up close in the characters face.

Let me know if that helps,

---

<div class="post-metadata">

**Author:** ![MathieuSP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MathieuSP](https://forums.unrealengine.com/u/MathieuSP)\
**Post date:** [October 20, 2016, 3:38pm UTC](https://forums.unrealengine.com/t/self-shadow-in-realtime/373728/3 "2016-10-20T15:38:36Z")

</div>

It’s exactly what I was looking for, I will take a deeper look into the doc next time!  
Thank you Ed 🙂
