Maya realtime earth/atmo shader


#1

Hi there,

Just wanted to share with you guys a realtime solution I did for an earth model using shaderfx, ramp shader and maya fluids.

It can go pretty close to the surface, has cloud shadows, atmo, day/night, city lights reflections on the atmosphere, etc.

Thanks!


#2

that’s pretty cool


#3

Very impressive work. I am not knowledgeable in real time rendering yet, but the only thing I’d point out is the banding from the light on the surface, which could be caused by compression of the image for the web, is distracting. Otherwise, the shader is very cool! Great work! :slight_smile:


#4

It needs more clouds but that is VERY cool :slight_smile:

Cobra 6


#5

Yes agreed seriously cool, must’ve been a ton of work?


#6

I just noticed the animated light and curves in the gif. Is this a playblast? It just can’t be. If so what’s your process. I’m trying to get better at optimizing renders and this looks like it might be very helpful in reaching my goal


#7

Hey guys thanks a lot for the replies!

DarkMizu:
Thanks Man!

davidjhixon:
Thanks man!
Its actually both, there is some banding caused by compression, but there is some caused by the depth peeling algorithm and another by the slices of the fluid that composes part of the atmosphere. I am trying to solve this.

cobra6:
Thanks man! I am doing this for a TV channel that I work, it is for a news program and it needs some clear view of the earth, hence the reduced number of clouds, but it is very simple to add more, I will post another screenshot with more clouds later!

sacboi:
Thanks!! Actually this is my third go on realtime earth shader, did this one in two days, maya 2015 made it so much easier.

DarkMizu:
Thanks man! It is a playblast, I am using a combination of shaderfx and some ramp shaders:
Here is my process:

First, the max resolution for textures on the viewport is 8192x8192, as large as it seems, for the entire earth it is not very large, so this is what I did:
Split the earth texture into 8 parts, being 8 color textures of 8192x8192, 8x4096 normal map textures, 8x4096 displacement textures, 8x4096 city lights textures and 8x2048 specular/mask textures.

Put it all into my shaderfx shader (it has realtime displacement so gives nice details and very good performance, viewport must be set to dx11 on preferences) for the surface, here it is:

Then assigned them to 8 square planes that make a 2x1 (4columns and 2lines) proportion and used two bends to turn it into a sphere:

This is it for the surface.

Then comes the clouds it is a very simple shaderfx shader applied to a sphere, the amazing thing about it is that it has a mask cutout option this allows shadows on transparent objects:

Next is the mesh component of the atmosphere, it is some spheres duplicated on top of another with a network of ramp shaders. This part allows for 3 things, some blue coloring, the orange tint on sunset and the white halo:

The beauty of the normal shader network is that I can easily layer different shaders and use blend modes, but as complexity grows, the performance decreases fast, but this is simple and is very fast.

Next comes the second mesh component of the atmosphere, this part makes for the city lights reflections on the atmosphere. It uses another default maya shader network, it is a colored halo with a blurred city light to mask it, so it only occurs on top of cities and not on the ocean:

Last comes a maya fluid to make the atmosphere glow and more blue tint:
The thing is, maya fluids are not lit by viewport lights, but it has an internal directional light that has a vector component to alter the lighting that is shown on the viewport.

What I did is a simple script to change my controler rotation to vector and plug it into the directional vector of the fluid shader, so it matches my viewport lighting:

And thats it, when I finish it I will post the shaders!
Thanks for viewing!


#8

WOW! You’re a pro my friend. Thanks for explaining all of this, gives a little insight on how something like this can be accomplished. You definitely have a strong knowledge of maya. You should do tutorials on the side or something.

I’ll have to bookmark this page


#9

Thanks a lot for the kind words!

I’ve always wanted to do tutorials, but I need to organize myself better.

If you have any questions just shoot!

Here is the promised screenshots with more clouds.

Also improved displacement and normal mapping!

Thanks guys!


#10

I feel like a noob for posting here every few seconds, but your work is amazing. I thought you couldn’t improve on this more but it looks even better than before. If you ever decide to create a tutorial, just let me know. Looks so good, I wish you would do more planets, milky way, etc…Keep up the pro work


#11

Dont worry!

Thanks a lot!

When I’m done I will publish everything and try my best to make a tutorial!


#12

Here is another update!

Came back to less clouds because I am almost finished prototyping it for the news art.