How porting from 3D Max / or other 3D application realistic earth model to iOS device ( Open GL ES) How porting atmosphere effects ( not clouds - it is texture) - the glow of sky?
2 Answers
I do it like this:
first render pass
- surface model is ellipsoid
- plus color texture
- plus bump mapping
- plus alpha blending with cloud texture
second render pass
- just draw single Quad over whole screen
- and blend in sky color via simplified atmospheric scattering GLSL shader
[Notes]
- you can add also atmospheric refraction to be more precise
If speed is not the main point, you can use ray-tracing. You can model the earth and it's atmosphere as an opaque sphere, and a few non-opaque large spheres for the atmosphere. It gives you a model that handle clouds, shadows, scattering, light filtering for a reasonable amount of work and not too much tweaks. Ray-tracing a dozen spheres with same center is very cheap. Each 'atmosphere' layer will deviate light rays, with decreasing refraction index for each layer, and they will absorb some light, more for the lower layers. Spending some time on paper, you can simplify the math a bit and make really cheap :)
Also, just for the atmospheric effect, I guess doing it in half-resolution should be enough, as atmospheric effect are rather low-frequency.

- 1,838
- 1
- 17
- 24