Game Development Community

Planet Glowing

by Mikey Busch · in Artist Corner · 06/15/2011 (7:23 pm) · 13 replies

Anybody have an idea on how to make a planet render like this in torque? ive tried multiple things and im out of idea's. (T3d)

http://img405.imageshack.us/img405/8449/aldrin.png

#1
07/03/2011 (6:39 am)
Don't suppose you've tried the glow feature on the texture?
#2
07/10/2011 (12:20 pm)
of course, first i actually tried a slightly transparant outer layer, glow below that and then the planet without any additives, no luck.
#3
07/11/2011 (6:30 am)
Have you tried two different meshes. One mesh with the Planet Texture and then another mesh slightly bigger with the atmosphere texture set to glow?

I usually create the atmosphere layer with an opacity map. This is so the clouds are only showing. I then set that texture to glow. Similar to your screen shot but a little bit different results.

This way I can create a normal map for the planet texture and give it some nice relief and the atmosphere not get affected.

I have a write about it some where, I will try and find and post it up.

Glen
#4
07/11/2011 (12:19 pm)
would be awesome man, thank you, yea i tried the glow and it looks way too bright, idk maybe im just not tuning it right though
#5
07/12/2011 (5:17 pm)
great idea gdebello.
just make a clouds texture with a solid background and put it on your atmosphere mesh, then fiddle around with the alpha thresholds, glow, and whatnot.
#6
07/13/2011 (4:14 am)
Hi there !

I don't know how much of the rendering pipeline is exposed in T3D, but I believe I've seen examples of people adding their custom HLSL shaders ; you definitely want multiple layers/shells as already mentioned (surface, clouds, etc.), but if you're looking for that nice glow-y effect around the edge, you may want to consider atmospheric scattering (someone more familiar with T3D would need to confirm this is actually doable without major rework of the rendering module though)
#7
08/05/2011 (12:47 am)
There was an older demo made by a community member for TGEA called The Blue Marble or something along those lines. That would be a good place to start. This is a bit more artistic, of course your own art and colors would make a huge difference. Maybe a billboarded radial gradient to simulate the glowing atmosphere (in this image it extends out a lot farther than a typical planets)

Edit:
Several people have already written atmospheric shaders. Bill Vee in his work in TGEA (don't know if he's ported to T3D yet), that Blue Marble demo I talked about. It's possible.
#8
08/17/2011 (2:54 pm)
Check out what we've done. www.garagegames.com/community/blogs/view/21163. It's basically an underlaying opacity radial gradient. I'm sure if you did the same thing but rendered after the planet you could get the inner glow as well.
#9
09/16/2011 (4:25 pm)
Guys, I just wanted to mention that the ScatterSky in the engine currently is based on the GPU Gems 2 article (freely available online at the NVIDIA site), which has support for atmospheric rendering from "outside" the planet's atmosphere. You'd need to 1) convert ScatterSky from using a fixed perspective mesh stretched down at the edges into a proper sphere as well as probably moving what order it gets rendered in (might require some reworking of the shader as well but I don't think it'd be that much) and 2) setting up the "outside the atmosphere" shader and converting it to T3D (it's not much different from the in-atmosphere shader, so it shouldn't be too hard to convert if you use the basis of the current shader) and finally 3) change the code so that when an observer passes a certain distance from the surface, it switches to rendering using the outside-atmosphere shader (this is how it works in Sean O'Neil's demo as well, which can be found at sponeil.net).

Hope this helps!
#10
09/17/2011 (6:15 am)
Watch all of that - if you put all of that glow on the planet and then swing around to the dark side you might find your planet glows in the dark, too....

Unfortunately I don't have any insight on how to get the "sunlight" to reflect properly in this case. I think the above post referencing atmospheric scattering is a step in the right direction.
#11
09/27/2011 (1:52 am)
Now that the GPU Gems are available online, this article would be a good starting point (again, I haven't worked much with the Torque rendering pipeline yet and am more used to proprietary solutions, but hopefully plugging a few new shaders shouldn't be an issue)

http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html

the implementation is a bit old and could probably use an update... Also, the requirements might be a bit different if it is possible to fly "through" the atmosphere layers (i.e. space/flight simuation), in which case a very slightly more complex approach would be necessary.
#12
09/27/2011 (1:22 pm)
@Raphael, that's the implementation that the T3D ScatterSky is based on. The changes I mentioned in my previous post are what would be required to have a stationary spherical atmosphere (not relative to the camera like the current ScatterSky) as well as set up the other shader (camera outside atmosphere rather than inside).

With those changes it *should* work fine for flying from ground level out of the atmosphere (I suggest taking a look at how that works in Sean O'Neil's demo on his site sponeil.net).
#13
09/28/2011 (1:19 am)
It is indeed ! I wonder how I managed to publish that post, with yours clearly on that very same threat :-? I must have been distracted...

My apologies for the confusion :)