# How to get the same SpotLight effect as Unity3d does?

**URL:** <https://forum.babylonjs.com/t/how-to-get-the-same-spotlight-effect-as-unity3d-does/31718>\
**Category:** Questions\
**Tags:** light\
**Created:** [June 27, 2022, 1:12pm UTC](https://forum.babylonjs.com/t/how-to-get-the-same-spotlight-effect-as-unity3d-does/31718 "2022-06-27T13:12:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric.J](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/eric.j/32/34502_2.png) [@Eric.J](https://forum.babylonjs.com/u/Eric.J)\
**Post date:** [June 27, 2022, 1:12pm UTC](https://forum.babylonjs.com/t/how-to-get-the-same-spotlight-effect-as-unity3d-does/31718/1 "2022-06-27T13:12:42Z")

</div>

Hello Everyone,

[https://playground.babylonjs.com/#JFYQU3](https://playground.babylonjs.com/#JFYQU3)

The boundary effect of SpotLight in Babylon.js is too soft or too hard.

 ![2](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/e/ce3b344ebb85024a675eebed409ae10d500fe1de.png)

And When I set the intensity vlaue above like 4, there is something like the specular effect(the specular color is set to black) in the middle.

 ![3](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/4/240dbf354b5bad67a3e70bab8caf9fd2976128ba.png)

How to get the soft boundary effect of SpotLight like Unity3D?

 ![1](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/a/4ac4419e81f6ab57a7686b43687f317455d1923e.jpeg)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [June 27, 2022, 2:01pm UTC](https://forum.babylonjs.com/t/how-to-get-the-same-spotlight-effect-as-unity3d-does/31718/2 "2022-06-27T14:01:46Z")

</div>

Hello 🙂

Unity does some [global illumination](https://en.wikipedia.org/wiki/Global_illumination) to calculate the light effects, which leads to these “softer” elements, but is slower to calculate. Babylon is fully real-time, so the lights are computed in a cheaper way.

---

<div class="post-metadata">

**Author:** ![Eric.J](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/eric.j/32/34502_2.png) [@Eric.J](https://forum.babylonjs.com/u/Eric.J)\
**Post date:** [June 28, 2022, 1:37am UTC](https://forum.babylonjs.com/t/how-to-get-the-same-spotlight-effect-as-unity3d-does/31718/3 "2022-06-28T01:37:12Z")

</div>

Thank you for your replay. So I have to make texture to get this kind of effect right?

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [June 28, 2022, 10:04am UTC](https://forum.babylonjs.com/t/how-to-get-the-same-spotlight-effect-as-unity3d-does/31718/4 "2022-06-28T10:04:11Z")

</div>

Yeah some kind of texture and/or custom shader would be your best bet.
