2

I use three.js's SphereGeometry build an earth , and I want add a blue atmosphere to make it look better. How can I do that?

Now the earth is looking like this

enter image description here

I want to render the atmosphere like below (just don't know how to render the light, maybe it called glow):

enter image description here

Keith Hughitt
  • 4,860
  • 5
  • 49
  • 54
Mofei Zhu
  • 199
  • 3
  • 9
  • 1
    look at mine [Atmospheric scattering in GLSL](http://stackoverflow.com/a/19659648/2521214) and also [n-body simulation](http://stackoverflow.com/a/28020934/2521214) also this [Bump-map a sphere with a texture map](http://stackoverflow.com/a/32558700/2521214) – Spektre Sep 22 '15 at 08:50

1 Answers1

3

Using a custom shader like this:

http://stemkoski.github.io/Three.js/Shader-Glow.html

Or just use this ready made threex atmosphere-glow extension:

https://github.com/jeromeetienne/threex.geometricglow#threex.atmospherematerial.js

Result: http://jeromeetienne.github.io/threex.planets/examples/earth.html

Falk Thiele
  • 4,424
  • 2
  • 17
  • 44