real sun movement.

Is there a script, or even a way to animate a real sun movement.

i’d like to see this because of the sun-studies we make with Lightwave.
There’s a Pugin called “Sunspot”

It contains settings like:

  • location (Longitude, Latitude, Timezone)
    -Time in Year, month, day, hour, minutes and even seconds)
    -TimeLaps (can be animated)

If there isnt a script, how can it be created?
Is it possible?

I’m sure there was a script that put a “sun” in a sky texture. (lemme check to see whether I can find it)

Of course a script with the settings you’re looking for can be easily created. It’s basic math after all.

[found it]look here:
https://blenderartists.org/forum/viewtopic.php?t=8714&start=0&postdays=0&postorder=asc&highlight=sun+sky[/found it]

Ok, Im a noob in python, but i’ll give it a try

There are a lot of things that need to be done.

First part of the script:

selecting the location: Land, Town.

this wil give the longitude and the latitude. (there are a lot of dictionaries availible for this)

second part of the script

selecting time: Year, month, day, hour, minute, second

When Location and time are defined there is a script that gives position of the Sun from any location on Earth in azimuth and altitude.
the script needs to be written in Python
http://www.squ1.com/index.php?http://www.squ1.com/solar/solar-position.html

Third part of the script:

Adding a light to the scene with the Sun properties based on the values from above.

Is there someone who can give me some hints or help me write the script?

How about having also moonlight at night?! For step 2, maybe the following python packages can be a help. Of course it’s only a starting point, but you’ll have access to the data you need.

PyEphem (Brandon Rhodes)
PyEphem is a module for performing astronomical computations from the Python scripting language. Its primary purpose is to compute for an arbitrary date and location on earth the position of the sun, moon, a planet, or any asteroid or comet whose orbital elements are available. Additional functions are also included, including facilities to compute the angular separation between two objects in the sky, to determine the constellation in which an object lies, and to find the times at which any object rises, transits, and sets on a particular day. It uses procedures from Elwood Downey’s XEphem planetarium program.
http://www.rhodesmill.org/pyephem/

Astrolabe (Bill McClain)
Astrolabe is a collection of subroutines and applications for calculating the positions of the sun, moon, planets and other celestial objects. The emphasis is on high accuracy over a several thousand year time span. The subroutine library attempts to (someday) implement all the techniques described in Astronomical Algorithms, second edition 1998, by Jean Meeus."
http://astrolabe.sourceforge.net/

StatPy
I also would take a look at it.
http://www.astro.cornell.edu/staff/loredo/statpy/

Stani

SPE - Python Editor for Blender


http://pythonide.stani.be/manual/html/manual.html

Thanks,

This is realy usefull!

I’m posting something when i’ve got a working result.

I have been looking all over the net for a site that if you put in a towns name,state or province(if not in the USA) and country will give you the long and lat of that city or town center. All I have found are list for major cities like london,paris,new york. Do you happen to have the url for one of they “dictionaries” Prerably one that includes smaller cities (population <100,000).

try this one:

http://www.bcca.org/misc/qiblih/latlong_oc.html

This one is even more detailed:

http://www.squ1.com/index.php?http://www.squ1.com/downloads/locations.html

coolness, may come in handy for preparing the shooting of the sunset ‘multivideo’ demo scene, http://studio.kyperjokki.fi/engine/MultiSunset

http://directory.fsf.org/science/astro/ seems to have a lot of stuff for such things.

~Toni