Uploaded May 2014 | Updated September 2026, 2 weeks ago
If you'd like to skip the intro and explanation go to 4:30
All information is in the description!
This video explains how to connect the direction in which a sun lamp is pointing and the direction in which the sun in a sky texture is pointing in order to match them up using python.
I know this isn't the only way to do this, but it's the method that I found most intuitive and easy to understand. I hope you find it useful!
Update! : I improved the code thanks to TheRealWinsletFan, I posted the improved version here: reddit.com/r/blenderpython/comments/25wi1e/ive_got_another_tutorial_for_you_guys_this_one
Here's the wiki page on rotation matrices: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
Sound effects from freesound.org
If you'd like to skip the intro and explanation go to 4:30
All information is in the description!
This video explains how to connect the direction in which a sun lamp is pointing and the direction in which the sun in a sky texture is pointing in order to match them up using python.
I know this isn't the only way to do this, but it's the method that I found most intuitive and easy to understand. I hope you find it useful!
Update! : I improved the code thanks to TheRealWinsletFan, I posted the improved version here: reddit.com/r/blenderpython/comments/25wi1e/ive_got_another_tutorial_for_you_guys_this_one
Here's the wiki page on rotation matrices: en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions
Sound effects from freesound.org










