# Atmospheric Scattering for planet

**URL:** <https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112>\
**Category:** Rendering\
**Tags:** Atmospheric-Fog, planet, skysphere, unreal-engine, question\
**Created:** [December 25, 2018, 8:21pm UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112 "2018-12-25T20:21:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [December 25, 2018, 8:21pm UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/1 "2018-12-25T20:21:29Z")

</div>

I am looking for a simple material of atmosphere for a spherical static mesh, because I am creating a planet game, a material that is illuminated showing the atmosphere when it receives light on one side, and on the other side that receives no light, is off does not show the atmosphere, and on the side that receives light besides showing its atmosphere inside the planet you can look up and see everything blue, as if it were a sky.

I tried several alternatives but I didn’t reach a goal because I’m bad with materials.

I wanted to create something like this:

> **[Shadertoy](https://www.shadertoy.com/view/lslXDr)**
>
> Build shaders, share them, and learn from the best community.

[Plastic Procedural Planet first attempt - YouTube](https://www.youtube.com/watch?v=cyN29IMS8Q0)

Help!

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [December 26, 2018, 4:16pm UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/2 "2018-12-26T16:16:08Z")

</div>

* * *

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [December 27, 2018, 12:20am UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/3 "2018-12-27T00:20:31Z")

</div>

If someone finds some tutorial or knows how to do it, could you comment here?

---

<div class="post-metadata">

**Author:** ![KingMango1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KingMango1](https://forums.unrealengine.com/u/KingMango1)\
**Post date:** [December 27, 2018, 1:32am UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/4 "2018-12-27T01:32:37Z")

</div>

I just saw someone post a shader network that mimics the example at shadertoy.  
I looked but I can’t find it.  
I know it’s around here somewhere. I’ll keep an eye out for it but in the meantime keep looking. I just saw it a couple of weeks ago

---

<div class="post-metadata">

**Author:** ![KingMango1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KingMango1](https://forums.unrealengine.com/u/KingMango1)\
**Post date:** [December 27, 2018, 1:40am UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/5 "2018-12-27T01:40:41Z")

</div>

OK found it. It was in the forums!

[https://forums.unrealengine.com/development-discussion/rendering/8166-planetary-atmosphere-shader](https://forums.unrealengine.com/development-discussion/rendering/8166-planetary-atmosphere-shader)

The man JBaldwin never fails.

EDIT: I was searching for a related issue and saw that thread on the 15th. It was still in my browser history. :cheers:

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [December 27, 2018, 2:49pm UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/6 "2018-12-27T14:49:40Z")

</div>

Yes I already entered this site and copied the graph of that print but it didn’t work for me, the only thing I couldn’t copy was the first graph that is the output, I tried to alternate between translucent, deleted, opaque, but it didn’t work, besides not being able to leave the graph the same as his, I’ll show a print:

 ![263429-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/6/58643b4b622b89c44298688b5ecd5cc519898184.jpeg)

 ![263431-image-4291-copia.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/4/b3464cba670b697908784b016109e7b3a48e5779.jpeg)

 ![263432-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/e/45e7f78efaec6fb86c27e32ed8405d86230bd697.jpeg)

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [December 27, 2018, 3:09pm UTC](https://forums.unrealengine.com/t/atmospheric-scattering-for-planet/440112/7 "2018-12-27T15:09:27Z")

</div>

Done, I managed to make it work but it got ugly even though I created dynamic material instance and controlled parameters.
