Closed Durman closed 6 years ago
It's not certainly what I want to do but something like that. https://www.youtube.com/watch?v=OpnjfWLWJdE
it definitely worth a dedicated node at some point, when we get more scene conscious :)
cool video. yeah.. look extremely doable :)
My algorithm will determine how long sun is shining during a day in calculation point. Buildings can cast shadows on the point and in this case insolation time will be less. It depends on height and width of opposite building. It is important to have such calculation when one going to build housing in Russia. In the video is another calculation it is not good example. I suppose that there is not such calculation in another countries.
it's great that this interests you. I will help any way I can (if i have time too )
Well, I have node that can show azimuth and altitude of the sun for current coordinates, date and time. It seems working.))
Moving of the sun during a year in my region. I think the node can become more interesting after appearing viewer node of lamp.
@Durman Is this awesome node available?
The node is not finished yet. I would not like to share while it is in bad condition. Also I noticed that Sverchok have not any nodes for working with time. I am thinking about adding time in/out and date in/out nodes.
Some examples with time nodes: I took 24 hours as 1.0. Thus it becomes possible to make all mathematical operation with the time as with simple number.
Output of date in
node is integer number that show number of days between current date and initial date equal 1st year 1st month 1st day.
i was parsing a csv lately and might want to add a node specially for datetime
and time
modules too.
import datetime
VC = []
for value in V1[0]:
t = datetime.datetime.strptime(value, '%m/%d/%Y')
m = t.toordinal() - 736600
VC.append(m)
append(VC)
Something similar but I have done checking of input data for avoiding error of node. What is it 736600?
for year,month,day in zip(*data):
#Checking data
def fit_data(data,min_d,max_d):
if data < min_d:
return min_d
if data > max_d:
return max_d
else:
return data
year = fit_data(year,1,9999)
month = fit_data(month,1,12)
last_day_month = None
if month in (1,3,5,7,8,10,12):
last_day_month = 31
elif month in (4,6,9,11):
last_day_month = 30
elif year % 4 == 0:
last_day_month = 29
else:
last_day_month = 28
day = fit_data(day,1,last_day_month)
date = datetime.date(year,month,day)
data_obj.append(date.toordinal())
736600 was just a placeholder number, it marks the beginning of the data (ie the first entry), the result is a list of much smaller numbers that show the offset since the beginning.
I have six nodes now. Is it interesting to have something of this in master?
I am actually very okey with Script Node Lite :D Durman Folder.
@Durman https://docs.python.org/3/library/calendar.html#calendar.monthrange
I think it can be written like this:
import calendar
...
...
year = fit_data(year,1,9999)
month = fit_data(month,1,12)
wkday_first, last_day_month = calendar.monthrange(year, month)
I have finished. Result is shared in first message.
result is sun position? Or insolation at all?
I have spent most of my time creating sun position node. Also I created insolation calculation of course, it hadn't been difficult, I used almost only existing nodes. If it is interesting I can share with example of calculation.
ok, please. if it is property send email
There is nothing tricky in the calculation for who knows SV.)) I will put here file tomorrow from my job.
Main trouble is vectorizing. We need vectorized suncalc.
there is task i solving now with conflict finding concept. In Revit you can see wall-celling intersection with engineering. So i do it
теперь надо векторизировать, чтобы каждый объект прокручивался.
И Задача ещё импортировать IFC формат
If there are questions I will answer.) К-16_2018_02_07_04_15.gz
not sure we do same way. now have same work on my job. maybe will snl on my own
there is addon https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Sun_Position that we can use for sun position indeed
writing my new node for this stuff. it will do same as raycast mk2 object but with sun calculations hesitate to use hours or % in output
my node shows hours of insolation and vertex color the initial object
the last thing to do - latitude and aptitude automatic estimation of sun directions It will calc for date from date time text node. So you will have three input nodes, one indices viewer and latitude and aptitude inputs
Your representation of insolation is very visual.)
Here one can find all nodes that I did on this topic for
SNL
node: https://gist.github.com/22388494d23d6e00d06f173831fcb141I want to create insolation calculation. I think it is easy goal with raycaster node that will do main work. As result we have to receive insolation time in calculation points. Main task is to create script that will give directions of the sun. They will be depend on the time and the place. I have found good code that solves the same problem: https://github.com/mourner/suncalc I think it can be easily rewritten on Python. Also I already have something to show on the picture below.))