Trying to learn cycles as fast as possible, since what I’m trying to do is time sensitive (an in-space refueling technique proposal for SpaceX, if you must know), so please help me save time; I don’t have months to read the full manual and watch dozens of tutorials.
I got a matrial node for planet Earth, mostly working.
I’m using texture UV offsets to a) simulate Earth’s rotation, b) to fake clouds layer dynamics by making it drift in longitude relative to the diffuse mapping, and c) to fake the cloud’s shadows on the ground, though they don’t yet track the sun vector.
(Before you ask why don’t I rotate the planet, good question!, because I needed to use UV shifts to simulate the clouds drifting AND their shadows shifted away from the Sun, anyways, so might as well use the UV shift trick for everything. And if your next question is why not use a second sphere for the cloud layer, that’s because I tried that, in years past, and it looks terrible; PLUS it adds an awful lot of geometry to the scene.)
The whole node graph is a bit too big to show or dicuss…
…but the area of interest relating to my problem is the bunch of nodes at top left.
Have a look at them first:
Before I even describe it, two questions:
Why do Normalize nodes have 2 vector inputs? In my book, " normalize" means making a vector unit length. What’s the second vector for?
How do I get the view and sunlight vectors? The Object input node has a location output, but it doesn’t have an object selector, so I can’t get the Sun’s location. Then there’s a mysterious Light Path node that has a bunch of outputs prefixed with “ls”, but they are not vector outputs…
Presently my lights are not working in renders, so all my testing is preview window based. Which brings me to another question I’ve already asked several times:
QUESTION 3: How do I get lights to work in Cycles?
So I figured, first step in faking shadows is to compute cross product of view and normal, then dot the result with Earth’s North vector. Multiply that by an arbitrary small number of degrees angle, and use this as longitude UV shift for cloud shadows. Not scientific, but it should work.
But it doesn’t.
So I introduced a few nodes temporarily to see if my manually entered Sun vector was right. Those are the nodes highlighted bottom right. They basically show a pink spot in the direction sunlight’s coming from. Surprise surprise! It’s coming from the South, melting Antarctica!!!
But this makes no sense, as my North vector is (-1,0,0) and my Sun’s vector has X at zero.
So I suspected that second vector input of the Normalize nodes, but I tried initializing them to different values and it made no difference!
Is there a way to give animation variable values to material node inputs? If so, how?
I forgot what it was…