Very much like it, but more general (ie. other bodies as reference objects, screenshots (maybe AVIs?), etc.) But for practical reasons, orbital data access methods should be developed first...don wrote:Sounds pretty much like Harald's script, yes?
don wrote:Not sure if this time is available, or if it can be calculated.
You need to compute the cosine of the angle between the (-1)*[planet's center_surface point] and the [sun's center_planet center] vectors. This will give you an estimation of the point's exposure to light.
You can then use this exposure to calculate the correct ambient light for the point.
Just an idea: use this modified version of the dot product angle formula (do the proper vector manipulation first (see above)):
Code: Select all
exposure = [(u . v) / ( length(u) * length(v) ) + 1] / 2
where:
u,v are vectors
. is the dot product
This will return you a value in the range [0(no light)..1(full light)]
But perhaps there is a more general approach for this.
Bye