# \[SOLVED\] Is it possible to make skybox transparent, but keep its lights?

**URL:** <https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876>\
**Category:** Help & Support\
**Created:** [April 26, 2017, 1:17pm UTC](https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876 "2017-04-26T13:17:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarlex](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/scarlex/32/4769_2.png) [@scarlex](https://forum.playcanvas.com/u/scarlex)\
**Post date:** [April 26, 2017, 1:17pm UTC](https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876/1 "2017-04-26T13:17:24Z")

</div>

In fact, I found a way to implement it after reading the source code of [scene.js](https://github.com/playcanvas/engine/blob/master/src/scene/scene.js):

```javascript
app.scene._skyboxCubeMap = null;
app.scene._resetSkyboxModel();

```

This is using the internal api to remove the skybox, but keep its lights.  
I want to know if there any official way to implement it?

One more question, can I set the skybox without loading the textures ? What I need is the lights, not the cube map…

---

<div class="post-metadata">

**Author:** ![will](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/will/32/4560_2.png) [@will](https://forum.playcanvas.com/u/will)\
**Post date:** [April 27, 2017, 1:52pm UTC](https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876/2 "2017-04-27T13:52:03Z")

</div>

Yes. Simply don’t set a cubemap as a sky box and, instead, set the cubemap on the ‘Cube Map’ slot of all your materials (in the Environment section):

![](https://forum-files-playcanvas-com.s3-eu-west-1.amazonaws.com/original/2X/d/d0feb61c5699b7f069c16d06d5a1f1d43ad7de37.png)

You can also do this in script with the [`cubeMap`](http://developer.playcanvas.com/en/api/pc.StandardMaterial.html#cubeMap) property:

```javascript
material.cubeMap = myCubeMap;
material.update();

```

---

<div class="post-metadata">

**Author:** ![scarlex](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/scarlex/32/4769_2.png) [@scarlex](https://forum.playcanvas.com/u/scarlex)\
**Post date:** [April 27, 2017, 2:16pm UTC](https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876/3 "2017-04-27T14:16:34Z")

</div>

How can I implement this by the engine ?

```javascript
app.scene.setSkybox(material)

```

Maybe something like this ?

---

<div class="post-metadata">

**Author:** ![will](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/will/32/4560_2.png) [@will](https://forum.playcanvas.com/u/will)\
**Post date:** [April 27, 2017, 2:42pm UTC](https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876/4 "2017-04-27T14:42:23Z")

</div>

Like I said, just don’t set a skybox and iterate over all your materials and do:

```javascript
material.cubeMap = myCubeMap;
material.update();

```

---

<div class="post-metadata">

**Author:** ![scarlex](https://forum.playcanvas.com/user_avatar/forum.playcanvas.com/scarlex/32/4769_2.png) [@scarlex](https://forum.playcanvas.com/u/scarlex)\
**Post date:** [April 27, 2017, 2:44pm UTC](https://forum.playcanvas.com/t/solved-is-it-possible-to-make-skybox-transparent-but-keep-its-lights/3876/5 "2017-04-27T14:44:48Z")

</div>

Oh, I see, thank you!!
