Chris wrote:...
Do I understand correctly that the fading is based on apparent magnitude and not distance?
--Chris
It may be useful if I explain some of my label-fading code here. It is basically simple and very similar for galaxies and stars. The label transparency 'distr' (and thus the label visibility) ranges between 0 and 1.
Code: Select all
float distr = 3.5f * (labelThresholdMag - appMag)/labelThresholdMag;
It only depends on the ratio
appMag/labelThresholdMag
The more tricky variable is
labelThresholdMag. It is basically constructed following my
automag philosophy. For a given sky brightness, it essentially depends on the
field of view(FoV) or equivalently, the
"effective screen distance" of the user. In a way this emulates the magnification of a telescope and keeps the density of visible labels on the screen about constant.
When the FoV decreases ( <=> increasing magnification) the labels of the brighter objects move out of the field while the labels of dimmer ones appear.
This crucial trick avoids overcrowded/overlapping labels!
labelThresholdMag and thus FoV is typically altered via SHIFT + mouse-LEFT movements.
The rest is easy. The scaling factor in my current implementation is indeed
apparent magnitude (appMag) rather than a function of distance alone. The latter would easily be possible as well, by defining and using above --instead of appMag-- a modified apparent magnitude, referring to some suitable
constant absolute magnitude for all stars, say.
Using appMag, however, has the advantage that all
prominent stars in the constellation patterns are mostly labelled initially, since here apparent magnitude and NOT distance is the relevant quantity.
Bye Fridger