Hi people. I’ve been trying all day to do something that I know is possible, but I just cant get it right.
I have an environment in which i have a Cycles Sky texture. This texture as you know has vector direction (the ball thing) which tells it what is the sun position in the texture itsself.
I am trying to make the Sky texture direction copy the rotation of a sun lamp in the scene - so that they are in sync and the bright spot in the sky texture falls right with the direction of the sun lamp. I need this to animate a sunrise to sunset timelapse scene.
What I figured was I add drivers to the sky texture, taking the values of XYZ Rotation of the Sun lamp. It didn’t work - I figured out, because the Sky texture direction is vector and expects values from -1 to +1
After that I tried using sin (var) and cos (var) in various combinations an I managed to find out how to map x and y
X Rotation [Sky texture] = sin ( Y Rotation [Sun lamp])
Y Rotation [Sky texture] = - sin ( X Rotation [Sun lamp])
I never got the Z axis right.
Could someone give me an answer to this problem, or at least give me an alternative. I just need the Sky texture sun direction and the Sun lamp direction to be in sync.