HowTo display an halo like the atmosphere around a sphere ?

Started by
29 comments, last by nini 18 years, 6 months ago
Hi all , i would want to know how to proceed to display an atmosphere around a sphere object , i care only about the result of a blue gradient that fall into transparent. I don't want any physics , perhaps pixel shader / vertex shader ? thanx for your help in advance
Advertisement
Perhaps 3D Texture ?
Maybe billboard a quad with a transparent texture in front of the sphere. The texture could be of a ring, with a gradient from blue (rim) to transparent (center). Take care to always billboard it in front of the sphere, and it will look fine from any angle. Being only one quad, it is also very cheap performance-wise.
Jooleem. Get addicted.
Quote:Original post by Peregrin
Maybe billboard a quad with a transparent texture in front of the sphere. The texture could be of a ring, with a gradient from blue (rim) to transparent (center). Take care to always billboard it in front of the sphere, and it will look fine from any angle. Being only one quad, it is also very cheap performance-wise.


Thank you , i think i will try this , as you say this is cheap and i like when things are cheap for my poor GPU ;-)
Let me know how it works out. I would be interested in seeing a screenshot of this technique.
Jooleem. Get addicted.
Why not build a triangle strip in a ring with the inner vertex colours blue, and solid and the outer vertices blue but alpha'd?

You could then pass a parameter in to the build or render function with the radius, perhaps even the vertex colours too for the inner and outer. Then you can use it on any sized sphere with no trouble at all. You might want to specify the outer radius too perhaps.

This will also be cheap, but give you more control and flexibility. You just need too build a billboard matrix to make it face the camera but that shouldn't be a problem.

Also be aware of these type of effects cutting through the floor/other objects etc...

Hope thats another angle on the idea for you.

GCoder
GCoder
Quote:Original post by GCoder
Why not build a triangle strip in a ring with the inner vertex colours blue, and solid and the outer vertices blue but alpha'd?

You could then pass a parameter in to the build or render function with the radius, perhaps even the vertex colours too for the inner and outer. Then you can use it on any sized sphere with no trouble at all. You might want to specify the outer radius too perhaps.

This will also be cheap, but give you more control and flexibility. You just need too build a billboard matrix to make it face the camera but that shouldn't be a problem.

Also be aware of these type of effects cutting through the floor/other objects etc...

Hope thats another angle on the idea for you.

GCoder


I'm trying to make the billboard quad , but it lacks control (must tweak the quad position to be good on the sphere ) i think your solution is even better for control and exact positionning...

Thanx again , and long live to GameDev.net
i will post a screen with your technique Peregrin
Just re-read your post...and Peregrins response...

If you used the technique I proposed you might actually want 2 strips so you can have a proper halo effect, as in a proper ring with alpha on the inside and outside vertices and solid vertices in the middle...I hadn't thought that bit through at the time ;) it's still damn cheap though...without needing a texture too :)

Good luck

GCoder
GCoder
Quote:Original post by Peregrin
Let me know how it works out. I would be interested in seeing a screenshot of this technique.


Peeeww done with a lot of tweak and it is not good when the camera is going upon the earth because we see the ring vertically only and not horizontally ...

here is the screen that is okay :

Great start, nini!

I found this photo of the Earth, that shows the atmoshpere nicely. I tried to create a texture to replicate that effect. If you are interested, you can find it here.
Hope this helps.
Jooleem. Get addicted.

This topic is closed to new replies.

Advertisement