Best way to render Earth's day and night?

Hello:

I am trying to make that common rendering of Earth’s night and day. I have the materials for both day and night and I think it is possible to make this effect, and animate it (to show a running day) using nodes, though maybe there is a better way to do it.

The fist image is a first attempt using a single material and a white and black image as stencil. The second is a screen shot of a non working attempt with nodes.

I will appreciate any hint.

Naturalpainter.

Attachments



Nobody answered. I’d like to know if the question was too silly or was not clear.

The solution is simple. I just used a dot product between the normals and a “normal” node for the factor of the mix of the materials used for day and night.

A more direct approach would be to be able to get a vector in the same direction as the direction light (Sun) I was using. That way I would not have to adjust by hand the “normal” node.

Is this possible? I guess I will have to write a python script.

Attachments



I am sort of trying to do something similar, but have not figured it out yet.

Using a normal node and dot product is not animatable. I am trying to get my head around using an empty and some sort of mapping node to replace the normal node.
If I get it sorted, I will post something up here.

interesting but your goal is what here ?

just do a simple rotation animation of the earth to see the map rotating ?

for this you need to do it with IPO curve and make the earth rotate over a number of frames i guess

so nodes don’t really have anything to do with this
nodes are used to affect the mat or texturex not do animation as i know of!

happy blendering

The best setup I’ve tried is the one in this tutorial:
http://www.chamberlinproductions.org/blenderearth.html

The author also provides .blends although you still have to gather the textures yourself.

Yes, it looks amazing, though I like padfoot’s simplicity, using just a single sphere and a smart combination of shaders.

http://blenderartists.org/forum/showthread.php?t=123498&highlight=padfoot+earth