• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
Orbiter Technical Notes: Object lighting
Martin SchweigerJanuary 26, 2006
1 Introduction
This note contains some implementation details of lighting objects such as spacecraftor buildings on planet surfaces in Orbiter.
2 Planetary shadows
Planets and moons cast shadows into space away from the central sun. An objectentering that shadow (such as an orbiting spacecraft, or a surface building movingacross the planet’s terminator) need to modify their lighting parameters to simulatethis. In general, the planet shadow reduces the direct (diffuse and specular) lightingcomponent,
   
RGB
. If the planet also contains an atmosphere, this can lead to a spectraldispersion of the direct light distribution in the twilight zone (penumbra), as well asan increase in the ambient component,
¡
RGB
, due to atmospheric scattering. In thefollowing, subscript “RGB” denotes a colour value consisting of red, green and bluecomponents.
2.1 Planets without atmosphere
We start with the simpler case of a planet without atmospheric layer. In this case theambientcomponentis assumedtobe unaffected(backscatteringfromthe planetsurfaceis currently not considered). The change in the direct componentis given by geometricconsiderations, due to the planet disc covering part or all of the sun’s disc.Given a point in space
¢£
at which the lighting parameters are to be evaluated (e.g.the current position of a spacecraft, let
¢¤
be the position of the sun, and
¢¥
the positionof the shadowing planet, both relative to
¢£
.With distances
¤§¦©¨¢¤¨
and
¥¦©¨¢¥¨
, the angular separation
between sun andplanet, as seen from
¢£
, is given by
¦!#" ¢¤%$¢¥¤&¥
(1)Let
')(
and
'10
be the mean radii of sun and planet, respectively. Then their apparentradii, as seen from
¢£
are given by
2  (¦4365 7"'(¤982  0¦@4365 7"'10¥
(2)1
 
It follows that shadowing at
¢£
will only occur if 
¥
¡ 
¤
and
 
2  (
£¢
2  0
(3)Depending on the distance
¥
from the planet, we can divide the shadow zone into twoareas: the near-zone, in which totality can occur (the planet disc completely covers thesun’s disc), and the far zone, in which annularity can occur (the planet disc is entirelywithin the sun’s disc). The relevant zone can simply be determined by comparing therelative disc sizes:case 1:
2  0
¥¤
2  (
§¦
totality zonecase 2:
2  0
 
2  (
§¦
annularity zone(4)
2.1.1 Case 1: totality zone
If the object is within totality distance, we have to detemine if it is actually locatedwithin the cone of totality (umbra), or in the zone of partial shadow (penumbra):case 1a:
©¨
2  0
2  (
¦
totalitycase 1b:
©
2  0
2  (
¦
partiality(5)In case 1a, direct lighting is eliminated. In case 1b, a linear propagation from fulllighting to full shadow is assumed:
   
1a
RGB
¦
8
8
"!
   
1b
RGB
¦
$#
8
#
8
#%!
with
#
9¦
'&)(103
05460
(6)Thelinear assumptionis notcorrect, butprobablynot critical, and maypartlybe justifi-able by physiological arguments(the eye is more sensitive at low light levels, thereforeintensity should drop more gradually). Note that in Eq. 6 the fully lit direct light levelis assumed to be
   
87
RGB
¦
9A@
8
@
8
@B!
, but different unperturbedbase line levels can easilybe multipled on.
2.1.2 Case 2: annularity zone
If the object is too far from the planet to enter the totality zone, we need to determineif the planet disc is contained fully or partially in the sun’s disc:case 2a:
©¨
2  (
2  0
C¦
annularitycase 2b:
©
2  (
2  0
C¦
partiality(7)In case 2a, the light level is reduced according to the ratio of the two disc areas, whilein case 2b a linear transition is assumed:
   
2a
RGB
¦
$#7
8
#7
8
#7!
   
2b
RGB
¦
$#
8
#
8
#%!D
with
#7
¦
9@
2  0
"E
2  (
!6
and
#
¦
F@
"!
HGPI6A@¢03
&04!
(8)Note that for large distances the effect of the planet disc becomes insignificant. Orbiterdisregards shadowing at distances where
2  0
"E
2  (
 QSRT@
.2
 
2.2 Planets with atmospheric layer
In the presence of an atmosphere, additional effects such as spectral filtering of the di-rect componentand ambient in-scatteringmust be taken into account. At high altitudes
 
¦¥
§'10
, we can describe the atmospheric layer as an increase of the planet disc’sradius of influence:
2  
¢¡
0¦2  0
 
7¢
'10'108
 
 
7!
(9)where
 
7
is the effective thickness of the atmospheric layer (in Orbiter given by theAtmAlt parameter). At low altitudes, when the object is alreadywithin the atmosphere,this value is no longeradequate. We simply assume that at groundlevel the atmosphereaffects the lighting parameters up to an elevation
£
of the sun of 
£
7
¦
'@
deg. abovethe horizon, and interpolate to the actual altitude:
2  
¡
0
¥¤
2  
¡
02  
7
2  
¡
0
¢
§¦¦
I
2  
7
2  
¡
0
!
8
¨
 
¨
 
7!
(10)where
2  
7
¦
£
7¢
©¨
E
, and
2  
¡
0
on the right-hand side of Eq. 10 is taken from Eq. 9.Now, lighting parameters will be modified if 
¥
¡ 
¤
and
 
2  (
¢
2  
¢¡
0
(11)Again we can distinguish the two cases of Eq. 4.
2.2.1 Case 1: totality zone
For totality, we set
   
1a
RGB
¦
8
8
"!
as before. However, in the case of partial shadow,we now take into account that we lose more of the blue direct component due to scat-tering. The amount of spectral dispersion is linked to the atmospheric density
7
atground level, with the following ad-hoc formulae:
¦
5
1
7¢@!
8
bounded at
R
¨
¨SR
(12)
RGB
¦
@
R
SR
"!
@
#$
(13)Now we use a piecewise linear transition:
   
1b
RGB
¦
&%
#P@
RGB
!¢
RGB
where
#
9¦
&
0
040
"'
4
04
if 
2  (
£¢
2  0
#
RGB
where
#
9¦
'&
04(060"
otherwise(14)Here, the top equation describes the case that the sun is fully above the horizon, andpropagates from full lighting (1,1,1) to maximum dispersion. The bottom equationdescribes the case of the sun is partially covered by the horizon, and propagates fromthe dispersed state to darkness (0,0,0).
2.2.2 Case 2: annularity zone
At distances beyond the totality zone atmospheric effects are considered negligible.Lighting parameters are calculated as described in Section 2.1.2.3
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...