It is currently 20 Feb 2017, 18:49

All times are UTC + 1 hour




Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Sun position plugin
PostPosted: 02 Aug 2009, 11:46 
Offline
User avatar

Joined: 09 Jun 2009, 17:38
Posts: 149
Location: London
Sun Position Property v2010/2011 - Written by Jason Wells - Redmotion - based on Radiance renderer


A local copy can be found here:
Attachment:
sunposition2011.zip [59.67 KiB]
Downloaded 577 times

--------
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/09/physical-sun-and-sky-in-softimage_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/09/linear-workflow-in-softimage.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.


Last edited by redmotion on 11 Apr 2010, 18:56, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 24 Sep 2009, 11:45 
Offline
User avatar

Joined: 09 Jun 2009, 17:38
Posts: 149
Location: London
Sun Position plugin updated for v2010.

It has a new City pulldown menu featuring 120 cities from around the world and debug checkbox for checking calculations happening internally.

Also, using it with this sun/sky initialisation plugin: http://kobayashystips.blogspot.com/2009/09/physical-sun-and-sky-in-softimage_21.html and tips from this blog post is advised:
http://kobayashystips.blogspot.com/2009/09/linear-workflow-in-softimage.html


Last edited by redmotion on 24 Sep 2009, 12:19, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 24 Sep 2009, 11:46 
Offline
User avatar

Joined: 09 Jun 2009, 17:38
Posts: 149
Location: London
Archived info for plugins v7-7.5

--------
For info how to use, check out the video here:

http://redmotion.blogspot.com/2008_02_01_archive.html
--------

Written by Jason Wells - Redmotion <c>2007/2008/2009

Based on standard sun position algorhythms.

IF YOU USE THIS SOFTWARE, YOU AGREE TO DO IT AT YOUR OWN RISK.

--------

INSTALLATION

Place the .dll file into the \Application\Plugins folder of your user folder
(you may try the workgroup folder but it may not work)

--------

USAGE

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. Run the sun script. Get > Primitives > Light > Sun. It will create an infinite light attached to a null.
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.

To move the infinite light away or towards the scene centre, select the null that constrains the infinite light, go to transform mode (v) and select local transformation, or type a new figure into the transform z box.

--------

USING WITH THE V6 MENTAL RAY PHYSICAL SUN AND SKY SHADERS

1. Change the toolbar menu to Render (press 3)
2. Pass > Edit > Initialise sun shader
3. Under Sun, select the infinite light by choosing "pick" and picking it.
4. Press APPLY.

You are now ready to go.

Please 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.

--------

LIMITATIONS

- No animation - (due to my only owning XSI Foundation. The source code in C# will be made to anyone wishing to make it an operator.)
- No entry for hours and minutes in standard format.

--------

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

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 positive 0 to +90 - West is negative 0 to -90
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 slide.


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 23 Oct 2009, 14:40 
Offline

Joined: 09 Jun 2009, 20:57
Posts: 22
I found the sun position tool to be very useful. However it seems the .dll needs to be updated for Soft 2010sp1 as well. Could I trouble you for an update?


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 24 Oct 2009, 10:13 
Offline
User avatar

Joined: 09 Jun 2009, 17:38
Posts: 149
Location: London
Attachment:
Sunposition v2010_SP1.8.0.249.0.zip [11.04 KiB]
Downloaded 314 times


New compile for SP1.

Email/PM/Post here if you have any problems. Cheers.


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 24 Oct 2009, 15:51 
Offline

Joined: 09 Jun 2009, 20:57
Posts: 22
thanks for the update, works perfectly


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 24 Oct 2009, 21:11 
Offline
Administrator
User avatar

Joined: 04 Jun 2009, 11:15
Posts: 4884
Haven't had time to check the docs yet, :!!
but has something fundamentally changed in the SP1 XSISDK again
to make such a recompile necessary?
And if so, obviously, could someone please explain what the main change(s) is/are?

_________________
keeping the si-community alive one post at a time...


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 24 Oct 2009, 22:54 
Offline
User avatar

Joined: 09 Jun 2009, 17:38
Posts: 149
Location: London
Its because the plugin is done using C# that you need to create a new compile everytime. I may get around to making it a C++ plugin at some stage. But don't hold your breath!

Nothing in the SDK has changed to make the plugin not work, other than the version number has changed! Believe me its a pain for me too!


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 25 Oct 2009, 09:28 
Offline
Administrator
User avatar

Joined: 04 Jun 2009, 11:15
Posts: 4884
Thanks for the info! :-bd
That could be considered a drawback to using C# then...

_________________
keeping the si-community alive one post at a time...


Top
 Profile  
 
 Post subject: Re: Sun position plugin
PostPosted: 26 Oct 2009, 11:33 
Offline

Joined: 02 Oct 2009, 22:50
Posts: 81
Location: Greece
Is there a chance you could compile a windows x64 version?
Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group