3
$\begingroup$

Intermediate level question. I have been following Andrew Price's excellent tutorial on "How to make Earth". I have managed to "create" earth, and render as a static image. I have returned to this tutorial and am now producing an animation where the earth rotates, and then as the earth faces the sun the night time material falls away sharply revealing day-time earth. I'm not sure if this is still the right approach to rendering animations vs static image renders.

I have been trying to use vector normals in the node editor which allows me to, sort of, produce the effect. The problem is that the fall off is not sharp enough. Here is the nodes setup for the "Earth" sphere. I have added a vector normal to the night time material to create fall off but this is not working as I thought it would. The effect is half way there, but still not right.

Buggy earth

The node setup for earth looks like this. (It's in the blender file to).

earth node

The challenge is to setup nodes, so that as the earth spins, the night time material falls off sharply on the horizon, and the day time material becomes visible as light hits the sphere. The outliner shows the basic structure of concentric spheres named : earth, atmosphere, and clouds.

earth outliner

You will need to download the image textures and install them in your own local location and re-connect in the node editor for "earth". Some pointers from the blender experts out there would help a lot in my understanding of nodes, especially the vector normals and if it's applicable here, so please "have at it!".

Earth Blender file here.

$\endgroup$
2
  • 1
    $\begingroup$ You could try with blender 2.8, there are a lot of tuts on how to create and earth with different setups, probably one suits better for you. $\endgroup$ – Emir Jul 16 '19 at 1:52
  • 3
    $\begingroup$ haven't really tested but all you probably need is to drive the normal output through a Color Ramp node, you can then adjust how sharp or soft the progression is $\endgroup$ – Duarte Farrajota Ramos Jul 16 '19 at 12:29
1
$\begingroup$

The Normal>Dot output will vary from -1 to +1. -1 if the normal in the node is pointing in exactly the opposite direction of the Normal of the surface, and +1 if they are aligned.

So you can use a Map Range node to convert (-1->1)to (0->1) for a Color-Ramp, and then use the stops in the Color Ramp to adjust the hardness of your mask between shaders:

enter image description here

A couple of variations:

enter image description here

There are some disadvantages to this method.

  • You have to line up your Normal node with your light-source, if there is one, and that's not easy.
  • It takes no account of the self-shadowing of the planet. Any features on the dark side can fall into the light-side mask, if their normals happen to be tilted the right way.

Instead, you could parent your planet to an Empty, which always points to the light-source. (The Empty, larger in the picture, could be parented to the light, depending on your set-up) The Planet can be at an angle to its parent-Empty, so can still locally rotate around its own pole-to-pole axis. Here the Empty points its -Z towards the light, and the planet spins around its own Z axis.

enter image description here

Now the mask between your shaders can be a test of whether the shading-point is in the Empty's negative or positive Z, Using the Empty's Object Space. Here, again using a Map Range to bring the range of interest to 0->1, so it can be adjusted in a Color Ramp:

enter image description here

I think that method would give you an easier time, especially if you want the planet to orbit the light, while spinning on its own axis.

$\endgroup$
0
$\begingroup$

In the tutorial, the "earth" has a lighter falloff. I think what might be allowable is to add a couple more lights in the scene, one a low-brightness hemisphere, and one a sort of blueish light. This, if applied right, could produce a similar result in an animation.

$\endgroup$
1
  • $\begingroup$ ok.. thanks for the tip. $\endgroup$ – angryITguy Dec 23 '19 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.