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.
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.
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.