# My shadows look 👎

**URL:** <https://discourse.threejs.org/t/my-shadows-look/19368>\
**Category:** Questions\
**Tags:** shadows\
**Created:** [October 2, 2020, 10:34am UTC](https://discourse.threejs.org/t/my-shadows-look/19368 "2020-10-02T10:34:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timdiacon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/timdiacon/32/13681_2.png) [@timdiacon](https://discourse.threejs.org/u/timdiacon)\
**Post date:** [October 2, 2020, 10:34am UTC](https://discourse.threejs.org/t/my-shadows-look/19368/1 "2020-10-02T10:34:48Z")

</div>

I’m trying to set up a scene with lighting similar to product photograpy. I have a box, an ambient light and then a couple of directional lights. I have every surface setup to receive and cast shadows which is resulting a in striped effect across the object.

I’m using 1 unit = 1mm and so the box dimensions are 1000 x 300 x 300 which means I have had to dramatically increase the size of the the lights shadow camera size. I’ve tried increasing the light’s shadow map size up to the max but I still get lots of lines just much smaller ones. It’s strange because these aren’t actually where there is a shadows?

I’m wondering if I need to rebuild the scene using 1 unit = 1m and so the box has dimensions of 1 x .3 x.3 or whether there is an alternative solution? I’ve experimented with all the different shadow map types but they all produce similar results.

 ![Screenshot 2020-10-02 at 11.19.59](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/4/4b5d638d662e61128305332954cea4872061920c.png)

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 2, 2020, 10:57am UTC](https://discourse.threejs.org/t/my-shadows-look/19368/2 "2020-10-02T10:57:07Z")

</div>

Looks like self-shadowing artifacts. You will find many existing discussions about this topic in this forum. E.g.:

> [@Distorted shadows](https://discourse.threejs.org/t/distorted-shadows/6011/2):
>
> Looks like self-shadowing artifacts. Try to modulate light.shadow.bias in order to mitigate the problem. A value like around positive/negative 0.01 should be appropriate.

---

<div class="post-metadata">

**Author:** ![timdiacon](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/timdiacon/32/13681_2.png) [@timdiacon](https://discourse.threejs.org/u/timdiacon)\
**Post date:** [October 2, 2020, 11:07am UTC](https://discourse.threejs.org/t/my-shadows-look/19368/3 "2020-10-02T11:07:46Z")

</div>

Ah… I had read a number of posts about this and tried tweaking the bias number but hadn’t realised it could also be a negative value which has now fixed the problem… thank you so much!

---

<div class="post-metadata">

**Author:** ![Fluqz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fluqz/32/6279_2.png) [@Fluqz](https://discourse.threejs.org/u/Fluqz)\
**Post date:** [October 2, 2020, 12:02pm UTC](https://discourse.threejs.org/t/my-shadows-look/19368/4 "2020-10-02T12:02:41Z")

</div>

Does camera.near and .far also affect the self shadowing artifacts?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [October 2, 2020, 12:14pm UTC](https://discourse.threejs.org/t/my-shadows-look/19368/5 "2020-10-02T12:14:53Z")

</div>

There are several types of shadow map artifacts and what we have seen here is shadow acne. Insufficient depth precision can cause shadow acne and thus `near` and `far` settings are important. More information about this topic here:

> **[Common Techniques to Improve Shadow Depth Maps - Win32 apps](https://docs.microsoft.com/en-us/windows/win32/dxtecharts/common-techniques-to-improve-shadow-depth-maps)**
>
> This technical article provides an overview of some common shadow depth map algorithms and common artifacts, and explains several techniques—ranging in difficulty from basic to intermediate—that can be used to increase the quality of standard shadow...
