Sun position plugin
Posted: 02 Aug 2009, 12:46
Sun Position Property v2010/2011 - Written by Jason Wells - Redmotion - based on Radiance renderer
A local copy can be found here: --------
Based on standard sun position algorhythms (NOT actual sunposition data sets) It seems pretty reliable, however:
IF YOU USE THIS SOFTWARE, YOU AGREE TO DO IT AT YOUR OWN RISK, YOU AGREE THAT THE ACCURACY OF THIS PLUGIN CANNOT BE GUARANTEED IN ANY WAY AND THAT THE CREATOR ACCEPTS NO RESPONSIBILITY FOR ANY LOSSES OR DAMAGES INCURRED BY THE USE OF THIS PLUGIN.
This article is for v2010/2011 only, please see below to archived v7 post for v7 and below.
--------
I'd like to thank mslaf and mabxsi of Xsibase for their advice regarding some nasty little details in regards to combo boxes.
--------
CHANGES AND FIXES
- New CITY parameter which updates Latitude, Longitude and Timezone properties, featuring 120 cities from around the world. Some city locations may give inaccurate results. Most likely candidates have a * at the end of their name.
- Debug checkbox - tick to show calcualtion results
- Note that Longitude East is actually a negative value and West is a positive value, some users would have found problems with previous versions of the plugin if longitude settings were extreme.
- Updated documentation
--------
LIMITATIONS
- No animation - (Originally built as a property in XSI Foundation (restriction against creation of scripted ops) - needs to be transfered to operator setup.
- No entry for hours and minutes/Longitude/Latitude in standard formats.
--------
INSTALLATION
Place the sunposition2010.dll and sunPlugin.vbs script file into the \Application\Plugins folder of your v2010 user folder.
(you may try the workgroup folder but it may not work)
--------
USAGE/VIDEOS
For info how to use v7, check out the video here:
http://redmotion.blogspot.com/2008_02_01_archive.html
For info on how to use v2010, check out this video:
http://www.vimeo.com/6738792
--------
Written Instructions to get the sun working:
This is a property that rotates the selected object to point towards the suns position in the sky at a specific point in time.
1. Install the plugins (put both the sun_primitive and sunposition plugins into the plugins folder - user or workgroup
2. Get > Primitives > Light > Sun. It will create an infinite light attached to a null.
NOTE: To move the infinite light away or towards the scene centre, select the sun, press F3 and double-click on the "Sun" property. Use the slider to set a new distance from the centre.
3. Select the null (called "centre").
4. Get > Property > Sun Position
5. A dialogue box will open.
6. Set the time and date using the sliders to position the sun.
--------
USING WITH THE V6, V7 and V2010 MENTAL RAY PHYSICAL SUN AND SKY SHADERS
NB: If you use the Kobayashi Xsiaddon, it will also setup a physically correct colourspace and correct settings for the physical sun/sky.
Install xsiaddon from Kobayashi's Tips:http://kobayashystips.blogspot.com/2009 ... ge_21.html )
It adds a Pass > Edit > Initialise Physical sun/sky shader menu option.
1. Change the toolbar menu to Render (press 3)
2. Pass > Edit > Initialise sun shader
OR
Use Pass > Edit > Initialise Physical sun/sky shader
3. Under Sun, select the infinite light by choosing "pick" and picking it and make sure you uncheck constrain direction to world centre.
4. Press APPLY.
5. Then check through this article in regards to ensuring you have a linear colourspace working in XSI.
http://kobayashystips.blogspot.com/2009 ... image.html
You are now ready to go.
NOTE: You may notice that the sun will appear in a different place in the sky to the infinite light. This is not an error. Simply move the infinite light away from it's centre and you will find that they begin to converge after about 300 units.
--------
INTERFACE
Time:
Hours and Minutes - these convert the decimal "Localtime" into the hours minutes format we are all used to.
Localtime - This is the local time in decimal. If you need an animation of the sun going from sunrise to sunset, you will need to animate this slider (please note the ability to animate has not yet been added.)
Summertime - If you are using british summertime you will need to check this box.
Date
Day - 1-31 - Select the day of the year (please be aware that selecting the 31st of a month with less than 31 days will cause an inaccurate measurement.
Month - Select the month 1-12
Location
City - This will set the Latitude, Longitude and Timezone to that of the selected city. Approximate only. (Use Google Maps or Live maps and a to-decimal conversion to obtain an accurate position if required.)
Latitude - This is the north-south position - North is positive 0 to +90 - South is negative 0 to -90
Longitude - This is the east-west position - East is negative 0 to -180 - West is positive 0 to -180
Timezone - Select the timezone - correctly in relation to the Longitude. If you don't know it, look it up! Google will find it for you!
Timezonename - There are 30 official timezones - this is for easy reference when tweaking the timezone slider.
Debug - Turn on to get more detailed information regarding internal workings of the plugin.
A local copy can be found here: --------
Based on standard sun position algorhythms (NOT actual sunposition data sets) It seems pretty reliable, however:
IF YOU USE THIS SOFTWARE, YOU AGREE TO DO IT AT YOUR OWN RISK, YOU AGREE THAT THE ACCURACY OF THIS PLUGIN CANNOT BE GUARANTEED IN ANY WAY AND THAT THE CREATOR ACCEPTS NO RESPONSIBILITY FOR ANY LOSSES OR DAMAGES INCURRED BY THE USE OF THIS PLUGIN.
This article is for v2010/2011 only, please see below to archived v7 post for v7 and below.
--------
I'd like to thank mslaf and mabxsi of Xsibase for their advice regarding some nasty little details in regards to combo boxes.
--------
CHANGES AND FIXES
- New CITY parameter which updates Latitude, Longitude and Timezone properties, featuring 120 cities from around the world. Some city locations may give inaccurate results. Most likely candidates have a * at the end of their name.
- Debug checkbox - tick to show calcualtion results
- Note that Longitude East is actually a negative value and West is a positive value, some users would have found problems with previous versions of the plugin if longitude settings were extreme.
- Updated documentation
--------
LIMITATIONS
- No animation - (Originally built as a property in XSI Foundation (restriction against creation of scripted ops) - needs to be transfered to operator setup.
- No entry for hours and minutes/Longitude/Latitude in standard formats.
--------
INSTALLATION
Place the sunposition2010.dll and sunPlugin.vbs script file into the \Application\Plugins folder of your v2010 user folder.
(you may try the workgroup folder but it may not work)
--------
USAGE/VIDEOS
For info how to use v7, check out the video here:
http://redmotion.blogspot.com/2008_02_01_archive.html
For info on how to use v2010, check out this video:
http://www.vimeo.com/6738792
--------
Written Instructions to get the sun working:
This is a property that rotates the selected object to point towards the suns position in the sky at a specific point in time.
1. Install the plugins (put both the sun_primitive and sunposition plugins into the plugins folder - user or workgroup
2. Get > Primitives > Light > Sun. It will create an infinite light attached to a null.
NOTE: To move the infinite light away or towards the scene centre, select the sun, press F3 and double-click on the "Sun" property. Use the slider to set a new distance from the centre.
3. Select the null (called "centre").
4. Get > Property > Sun Position
5. A dialogue box will open.
6. Set the time and date using the sliders to position the sun.
--------
USING WITH THE V6, V7 and V2010 MENTAL RAY PHYSICAL SUN AND SKY SHADERS
NB: If you use the Kobayashi Xsiaddon, it will also setup a physically correct colourspace and correct settings for the physical sun/sky.
Install xsiaddon from Kobayashi's Tips:http://kobayashystips.blogspot.com/2009 ... ge_21.html )
It adds a Pass > Edit > Initialise Physical sun/sky shader menu option.
1. Change the toolbar menu to Render (press 3)
2. Pass > Edit > Initialise sun shader
OR
Use Pass > Edit > Initialise Physical sun/sky shader
3. Under Sun, select the infinite light by choosing "pick" and picking it and make sure you uncheck constrain direction to world centre.
4. Press APPLY.
5. Then check through this article in regards to ensuring you have a linear colourspace working in XSI.
http://kobayashystips.blogspot.com/2009 ... image.html
You are now ready to go.
NOTE: You may notice that the sun will appear in a different place in the sky to the infinite light. This is not an error. Simply move the infinite light away from it's centre and you will find that they begin to converge after about 300 units.
--------
INTERFACE
Time:
Hours and Minutes - these convert the decimal "Localtime" into the hours minutes format we are all used to.
Localtime - This is the local time in decimal. If you need an animation of the sun going from sunrise to sunset, you will need to animate this slider (please note the ability to animate has not yet been added.)
Summertime - If you are using british summertime you will need to check this box.
Date
Day - 1-31 - Select the day of the year (please be aware that selecting the 31st of a month with less than 31 days will cause an inaccurate measurement.
Month - Select the month 1-12
Location
City - This will set the Latitude, Longitude and Timezone to that of the selected city. Approximate only. (Use Google Maps or Live maps and a to-decimal conversion to obtain an accurate position if required.)
Latitude - This is the north-south position - North is positive 0 to +90 - South is negative 0 to -90
Longitude - This is the east-west position - East is negative 0 to -180 - West is positive 0 to -180
Timezone - Select the timezone - correctly in relation to the Longitude. If you don't know it, look it up! Google will find it for you!
Timezonename - There are 30 official timezones - this is for easy reference when tweaking the timezone slider.
Debug - Turn on to get more detailed information regarding internal workings of the plugin.