Planetary atmosphere shader

Just bumping this for fresh eyes.

I’ve still been playing around with trying to get this to work, more so now because its frustrating hitting a wall.

I believe the issue is in the either the Camera Vector or Object/Absolute World Space nodes as everything appears to work correctly in preview but not in-world.

I’ve been using this for some reference to help troubleshoot but no luck thus far:

@JBaldwin Thank you so much, that’d be fantastic.

It’s such an awesome Shader I’d love to dissect and learn from, just the setup is doing my head in. Whenever you can, some additional info would be greatly appreciated :slight_smile:

Man, awesome shader! Thanks JBaldwin!

This is an awesome shader, but I cant make it work like it should :frowning:
I understand that the shader needs some information from the light and that we should feed him with this information through blueprint, but I have no idea on how to do that.
Here’s what my planet looks like so far:

https://dl.dropboxusercontent.com/u/2739873/atmosphere_Shader.png

I would love if someone could point me in the right direction.

Bit of a thread hi-jack but, I initially felt the same way. I did some digging into the reasoning why.

Custom Lighting isn’t available simply because we have a deferred lighting system, so that path just isn’t possible anymore. That said, I did have some luck going directly into the engine source code and adding shader/BRDF models of my own with the help of Ehamloptiran, but it’s quite clunky and with the recent engine updates everything has changed once again.

You can however use the Emissive channel and effectively plug a ‘custom lighting’ setup into that, but you’ll have to drive a ‘Light Vector’ parameter from Blueprint as those are also no longer available to the material editor due to the deferred lighting path.

As for Refraction, I too preferred distortion, especially for Particle Systems. I did try to get around it by creating a translucent material and offseting ‘Scene Colour’ by a certain amount, the results worked at some angles but they too were somewhat glitchy. They did say that they planned to add Distortion back in, but apparently it’s not a high priority :frowning:

Its like xmass, this is exactly what i need for my spess scene!

I dont want to lower the work you people do in any ways, but Earth has a thick atmosphere, and looks just so:

For reference purposes. The dust around the planet is reallllly incredible thin (in relation), not like this shader.

But most of us do (or try to do) game of some sort, we do not make yet another “space engine” or simulation. So how thick earth dust really is does not matter, our spaceships will never be to scale compared to earth, and Mount Everest will be always 10 times higher than real one. (even if its flat with normalmap only).

For eg. I made night side of Earth (and moon) reflect sky and stars, all because on night side everything was black, i do not care that ocean reflecting stars is totally unrealistic, it looks better than half of earth black. Same goes for distance to moon, altitude of satelites, distance to sun and its size, I made it all look good, not realistic. I also put damping on my spaceship where I should keep orbital movment frictionless, but that was annoying not fun.

Regardless of how realistic it is, OP was asking how to replicate a specific shader from shadertoy, it may not be realistic but he nailed the reference.

@JBaldwin any chance of another look at this? :slight_smile: I’m sure I’m not the only one eagerly awaiting your reply

Hey Jeremy! Is there any update on this yet? This is too good stuff to just forget about it! :slight_smile:

Is anyone going to revisit this shader? I built the shader, but not exactly sure how to implement it in blueprints. Any help on this would be appreciated.

Absolutely great, re-visitation would be cool to take this even further. Could some one help me with a small problem I have with the shader. I am trying to place a texture “inside” the effect sphere yet the outer rim of the texture is always outside the sphere effect. Here is an image to express my problem:

I am trying to achieve what brunogruber has where the planet texture is neatly within the sphere.

BUMP anyone ever come back to this?

You might want to take a look at the images of this japanese Sattelite which is in GEO to get an impression of the size of the atmosphere of earth.

[QUOTE=JBaldwin;330015]
Just updating this thread (which I initially forgot to do).

I have recently released a Gas Planet Kit for UE4. Within this free package, there is a much better implementation of this atmosphere system (and is still cheap in terms of performance).
You may download it here:
[/QUOTE]

Awesome, I will study the shaders to improve my own. I really appreciate your hard work and you sharing it to everyone.

Thank you for such great enlightenment! I will be utilizing this effect right away :slight_smile:

JBaldwin, you’re genius, your shader was a great help, thx from me as well!

Hello, I was wondering if I could get some help…I am very new to shaders and ue4 in general but basically I copied that code and attached the material to a skysphere and the only thing that is showing up is an empty black void. Im attempting to create a planet that has a planetary atmosphere when the player is on the planet. Im not sure if this shader is the one im looking for. Any help would be awesome.

Where i plug my light position on this shader? Also anyone have the planet shader for download? All links are down.

Hey Jeremy… Seems the link is down for the gas planet. Any chance you could bring this back online? I really need this shader…