Based on this past forum discussion about location labels and importance weights,
here is a modified version of Celestia that sensibly limits the number of visible labels
while taking into account importance weights:
Download link (Mac OS X only)
Picture of Moon location labels before the fix.
Basically too many labels are showing, with disregard to importance weights:
Picture of Moon after fix.
Label density = medium (only locations with large importance weight - feature size in this case - get shown)
Label density = high (large and some small weighted locations are shown)
Note: number of displayed labels is computed to be proportional to the square root of the label density.
New Locations slider
New Locations slider
Last edited by dirkpitt on 18.08.2007, 10:38, edited 1 time in total.
- LordFerret
- Posts: 737
- Joined: 24.08.2006
- Age: 68
- With us: 18 years 2 months
- Location: NJ USA
I changed render.cpp.
Change this (around line 4756):
to this:
Change this (around line 4756):
Code: Select all
float effSize = (*iter)->getImportance();
if (effSize < 0.0f)
effSize = (*iter)->getSize();
float pixSize = effSize / (float) (cpos.distanceFromOrigin() * pixelSize);
if (pixSize > minFeatureSize &&
(cpos - origin) * viewNormald > 0.0)
to this:
Code: Select all
float effSize = (*iter)->getImportance();
if (effSize < 0.0f)
effSize = (*iter)->getSize();
float d_vis = (14.8f + 86.9f * effSize) * (float) sqrt(minFeatureSize/50.0f);
if (cpos.distanceFromOrigin() < d_vis &&
(cpos - origin) * viewNormald > 0.0)
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
With this line
being from my least-square fit (MAPLE) of a linear dependence, d_vis = a + b * I, to a vector of importance weights (I) along with the corresponding minimal distances (d_vis(I)), where the locations with these importance weights just become visible.
DW specialized to importance weights being effective location sizes.
Here is the result of my previous analysis, comparing the fit d_vis = 14.8 + 86.9 * (importance weight) to the actual "data" points for the case of my 1600x1200 monitor.
The threshold distances at which locations with a given importance weight just became visible were determined empirically and cross-checks for lower monitor resolutions were also done.
The shown results and above parameters are several years old. My commented analysis can be studied in detail e.g. in these published Maple worksheets.
Moon:
http://www.celestiaproject.net/~t00fri/images/moon_weights.pdf
Earth:
http://www.celestiaproject.net/~t00fri/earth.html
to be found in various posts of mine in the forum.
At the end of the day, my analysis depends only on ONE parameter to be adjusted according to gusto: it determines the number of labels visible at a certain reference distance. That parameter you can adjust with the above slider, as nicely illustrated in DW's images.
Bye Fridger
Code: Select all
float d_vis = (14.8f + 86.9f * effSize) * (float)
being from my least-square fit (MAPLE) of a linear dependence, d_vis = a + b * I, to a vector of importance weights (I) along with the corresponding minimal distances (d_vis(I)), where the locations with these importance weights just become visible.
DW specialized to importance weights being effective location sizes.
Here is the result of my previous analysis, comparing the fit d_vis = 14.8 + 86.9 * (importance weight) to the actual "data" points for the case of my 1600x1200 monitor.
The threshold distances at which locations with a given importance weight just became visible were determined empirically and cross-checks for lower monitor resolutions were also done.
The shown results and above parameters are several years old. My commented analysis can be studied in detail e.g. in these published Maple worksheets.
Moon:
http://www.celestiaproject.net/~t00fri/images/moon_weights.pdf
Earth:
http://www.celestiaproject.net/~t00fri/earth.html
to be found in various posts of mine in the forum.
At the end of the day, my analysis depends only on ONE parameter to be adjusted according to gusto: it determines the number of labels visible at a certain reference distance. That parameter you can adjust with the above slider, as nicely illustrated in DW's images.
Bye Fridger
t00fri wrote:DW specialized to importance weights being effective location sizes.
Thanks for elaborating Fridger - actually the importance weights are indeed substituted for effSize,
unless there are no importance weights defined in the ssc (e.g., Europa, Ganymede, etc) in which case the size is used instead.
Also, in the code it still says "minFeatureSize", but that should be taken to mean "label density".
Re: New Locations slider
Dirkpitt provided a link
Download link (Mac OS X only)
This link doesn’t work, can anyone provide a valid link.
Jack, you can find my website here
Re: New Locations slider
Excuse me for bringing this up once again, but couldn’t slider control of visibility be extended to all kinds of labels, not just only locations?
Re: New Locations slider
And it could be a good idea to let the locations slider go to the two extremes. Max: having all the labels (even if there are actually to many) and min: only see one label or none.
And an arrow on that scale where the locations are nicely balanced.
Someone could then click on it and have a nice balanced label density.
And an arrow on that scale where the locations are nicely balanced.
Someone could then click on it and have a nice balanced label density.