Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Add-on: Sun Position

24

File:Scripts_3D_interaction_Sun_Position_WorldMap

Accurately set the sun in your scene based on location and time with this add-on.

From the wiki page:

The sun position widget can be used for creating sun animations as well as for just studying the sun position for given locations and times as a singular object or multiple objects on the ecliptic or as an analemma.

Link

About the Author

Avatar image for Bart Veldhuizen
Bart Veldhuizen

I have a LONG history with Blender - I wrote some of the earliest Blender tutorials, worked for Not a Number and helped run the crowdfunding campaign that open sourced Blender (the first one on the internet!). I founded BlenderNation in 2006 and have been editing it every single day since then ;-) I also run the Blender Artists forum and I'm Head of Community at Sketchfab.

24 Comments

  1. I have recently switched to Mac after a lifetime using PCs and have the Mac version of Blender 2.65 on Mountain Lion. For the life of me I cannot get Sun Position to load. I can't even tell if the zip file has unzipped as Mac's do everything differently.
    I've followed the installation instructions but nothing seems to happen. No directory appears in 3Dview, no Sun Position appears in World and no Enable appears.
    Given my Mac ignorance, can anyone advise me as to where I am going wrong, please?

      • I should explain, perhaps, that I am a newbie to Blender and don't really know my way around it yet. I want to use to Blender for ArchViz so Sun Position is ideal. I've followed the instructions but, of course, the button references aren't exactly as per the wiki and although I think I have sufficient brain to work out the differences, it just will not load.
        The alternative method means nothing to me by dropping the unzipped files into scripts may as well be written in Martian.
        I've tried about thirty times now. It doesn't show up in the World preferences box for me to enable.
        Help!

    • Hi. So I'm running Snow Leopard, not Mountain Lion, but here is what I did to get the script installed:
      First step is download the file, which you've obviously done already. Now unless Mac decided to change this, the .zip file will get unzipped automatically as soon as the download is done, and the original .zip file gets tossed into the trash bin.
      For most zips this is just fine, but in the case of blender addons it isn't. So open up the trash, and move the .zip out of there and into a normal folder. It shouldn't really matter where you put it, as long as it's someplace where you can find it again.
      Now open up Blender, and go into the addon panel in the user preferences. At the bottom of the window you will choose to "Install from File...", and this will open up a file browser window in Blender. Go to whichever folder you put the .zip in, and select the sun_position.zip file. Now click the "Install from File..." button in the file browser, and there you have it. Blender will install the zipped script, and bring you back to the addons panel, and you can enable the addon from there.

        • Get a PC! :) Actually, I'm wondering if the Blender Foundation needs to update its Mac development tools, or perhaps Apple has some secrets that it keeps from the open source community in some kind of scheme to make sure that only licensed software works right with Apple, but even that seems far fetched so I don't really know what the situation is. I just stay with a PC because it's a de-facto standard, so I don't know why Macs don't play nice sometimes.

        • Xaire posted a new link on 22 Dec at 18.57 that provides a zip file which Mountain Lion will install into 2.65 in the same way Snow Leopard does.

          Thanks for the comments.

  2. I've been waiting for this! I was thinking about writing my own script and adding it to the cycles environment settings. Input lat, long, and local time and click "add sun" and it will orient the sunlamp and sky texture properly.

  3. Great addon. For the ones who like videotutorials, I did one for it here:
    https://vimeo.com/50784574
    For the animation, at least on ubuntu based distros, you must have a propertie window opened AND displaied on the current desktop you are using, so better make the Blender window appear on every desktop if you use multiple desktops.

  4. this add-on has been out for a couple years now. everyone needs to go to the extentions page where you can find hundreds of useful scripts. everything from house primatives to a new tree generator. check it out . Happy New Year.

  5. Hello,
    this addon is great - I like it very much. I wonder if there is the possibility to show date, location, azimuth and elevation as a stamp in the animation. For architecture applications, this would be very useful.
    al

  6. Hi,
    I used this addon within of the blender modelling mode. The following script is working correctly:
    import bpy
    bpy.context.scene.SunPos_property.Time += 1
    print(bpy.context.scene.SunPos_property.Time)

    Now I would like to use it in the Blender Game Engine.
    I tried to migrate the script to something like:
    import bge
    scene = bge.logic.getCurrentScene()
    t= scene.SunPos_property.Time
    print(t)
    However I get an error: property not found;

    Do anybody got it to run under bge?

  7. Apparently this addon renders lighter images in linux (Fedora 21) than on Windows 10. Did someone experience this also?

    You also can't render through command line since it doesn't save the enabled status. Or does someone knows a workaround?

  8. This great addon should be included to Blender 2.8
    I miss you SunPosition. I even tried to convert python 2 to version 3 but...

  9. Hallo, thanx for this great addon.
    My question is: WHen you tick the "daylight savings" the sun position actually changes.
    I suppose this is wrong, cause its just the time that changes , the sung does not jumps an hour forward...?

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×