1 sphere, 2 shaders

I am trying to make earth. With 2 Shaders. One shader is at night with lights. The other is in daylight. See attached for node tree. Can I have 2 shaders on 1 sphere and fade the top shader out to reveal the Botton shader.

earth

Here are two ways to do it -

Connecting the mix shader to the color input is what’s causing the issue there. Either you mix 2 color inputs with a mix rgb node, or 2 shaders with a mix shader node.

3 Likes

@dan2’s setup is great! I’ve created an additional feature that lets you fade between the two textures in a way that looks like the lighted side of Earth is fading to dark as the Earth rotates on its axis. I haven’t done this in an astrophysically correct manner, but maybe you can take it and make your own.

My additions:


The two main values you would change (using keyframes for an animation or manually for stills) is the Vector Rotate Angle and the Multiply value (currently set at 10). The Vector Rotate Angle will rotate the Z Axis vector to make it look like the Earth is rotating. The Multiply value changes the width of the terminator between the lighted and shadowed portions.

Demo:

Let us know if you have any further questions!

2 Likes

don’t want to offend anyone. My love for Blender grows as I get better and better at it. This could be done in Lightwave in 2 clicks, no nodes. But I had to leave Lightwave. Old habits are hard to break.

No offense here. I’d love to know more about the Lightwave solution. Is there a night-to-day planet texture transition feature built-in? Are there different features than what we’ve already shown in the Blender solution? During the Blender 2.49 to Blender 2.5X transition a decade ago, I remember Ton (or some lead developer) stating that one of the goals of the refactor was that the interface would be updated so that users would more easily be able to create their own tools.

Understandably, if there were a built-in function to do this task, it would be easier to perform. There would also need to be a developer who develops and maintains that feature. With the more “building blocks” approach, users can build it, share it, make it into an Add-on, assign a keyboard shortcut, etc. without involving a developer. New features can be added easily or adapted to different situations on the fly. It also encourages a better understanding of how CG works in general and how Blender implements the tech specifically.

I guess I’m saying that I appreciate different applications and different workflows, but some of the design goals and workflow paradigms are different at a philosophical level. That means that there will be benefits and drawbacks to each that mean they can’t be the same without the philosophies behind them changing.

Anyway, please share about the Lightwave solution! :smile:

Blender guru intimated that there is a way to do it mathematically with some fancy math in cycles, the terminator around the planet would move relative to a parented object, sun. And the dark part would like up.

There was a solution in blender render in that the whole thing was controlled by the position of the sun in the scene.

Here’s a link to the YouTube tutorial where the node setup is shown and explained. THe math is a bit technical, and the person who put up the tutorial could have made the nodes a bit easier to see, and gone a bit slower, but it’s workable, and WELL worth it.

https://www.youtube.com/watch?v=Q5tQLECd8qg&feature=emb_logo

I hope this helps!
Happy planet rendering!