Draw hints behaviour for Comets and Asteroids

Bug #1402188 reported by Alexander Wolf
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Medium
gzotti

Bug Description

People on the Russian Astronomical Forum reported about regress for drawing hints for comets and asteroids in version 0.13.1 (Example: http://www.astronomy.ru/forum/index.php/topic,21983.msg3078268.html#msg3078268).

I investigated this reports and he related to increasing performance for comets and asteroids drawing, e.g. to the follows code:
if ((getVMagnitude(core)+2.0f) > core->getSkyDrawer()->getLimitMagnitude())
{
  return;
}

Tags: solar-system

Related branches

Changed in stellarium:
importance: Undecided → Medium
status: New → Opinion
Revision history for this message
gzotti (georg-zotti) wrote :

Bah, stupid sign reversal... I did mean to increase visibility for faint objects.
Fixed in trunk r7217.

Changed in stellarium:
assignee: nobody → gzotti (georg-zotti)
status: Opinion → In Progress
gzotti (georg-zotti)
Changed in stellarium:
status: In Progress → Fix Committed
Revision history for this message
Alexander Wolf (alexwolf) wrote :

Georg, your latest commit make visibility of the hints and names worse. Seems we should use +4.f (maybe +5.f) for comets/asteroids and +2.f for planets.

Changed in stellarium:
milestone: none → 0.13.2
Revision history for this message
gzotti (georg-zotti) wrote :

HuH?

I first tried with plus5, this was even worse than the plus2, though. minus2 made comets visible for a longer time (still visible beyond the smallest stars).

Ah, hints and names? No, I fixed draw(). The hints/name balancing is elsewhere, but I am blind currently?

Revision history for this message
Alexander Wolf (alexwolf) wrote :

drawHints() called within draw() ;) Current implementation will be not reaches this call.

Revision history for this message
gzotti (georg-zotti) wrote :

if ((getVMagnitude(core)-2.0f) > core->getSkyDrawer()->getLimitMagnitude()) return.

assume sky limit magnitude=8, comet magnitude=9.5, and I still want it displayed. 7.5>8=false, so we do not return but draw it.
Previously, I had 9.5+2 > 8 = true, therefore comet was not visible, and this was indeed a silly late-night error.

The sign must be negative, and the comets are visible for 4 more magnitude steps now than before, or for 2 mag steps beyond general sky brightness. We can increase this further of course, if required, but I think it is now well-balanced.
I cannot reproduce how hints visibility can be now worse than before?

Revision history for this message
Alexander Wolf (alexwolf) wrote :

getLabelsAmount() broken now as fact, because drawHints() call after checks for comet visibility. From your example all hints and labels will not be displayed for objects dimmer than magnitude 8. If we set amount for labels near magnitude 13 then we don't get any changes. For example in attachment screenshot you can see visible of hints and labels for planets in version 0.12.5 when slider for planets labels and markers set in extreme right position (all comets from MPC's list of observable comets was added). In the current trunk you get visibility of hint and label only for Jupiter.

tags: added: solar-system
Revision history for this message
gzotti (georg-zotti) wrote :

Actually for my example, mag9.9 comets will be shown in a sky showing mag 8 stars. Indeed, hints for mag11 comets are not drawn here. Do you want to have hints for mag15 objects in a 60°FOV mag6 sky? Then we can just increase the limit, but then we may again have a problem with too many dim comets slowing down fps. We can have hundreds of comets computed in the background when we only display what's visible "and slightly more".

I just tested loading all MPC comets and displaying without this early-out test, and with a mag difference of 8. The latter is acceptable, without the test frame rate dropped too much IMHO. Or maybe introduce two more config variables, astro/comets_hints_magdiff(default 5?), and astro/planets_hints_magdiff (default 3?), that can be adjusted to the computer's CPU power?

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Georg, showing comets and hint/label of those comets is different features :)

Revision history for this message
gzotti (georg-zotti) wrote :

But they were always linked like this, or not? If you want to show all possible comets as hints, we can move the early-out test (Comet.cpp line 455) to after drawing the hints (l. 499), but then we will likely have again conplaints about slow fps because all the tests must be made also for mag20 comets. What do we do?

Revision history for this message
gzotti (georg-zotti) wrote :

Alexander, can you test if you like this behaviour of comets now, and if it causes too much loss in frame rate.
A similar change can be made in Planet.cpp, but if somebody again has 11000 NEAs, fps loss is massive, i.e. the same issue we had before 0.13.1.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Current behaviour is very good for me. I'll prepare package 0.13.1.91 and ask the original reporters for testing.

Revision history for this message
gzotti (georg-zotti) wrote :

Wait, I did not change behaviour for the planet(oid)s yet. Do you want to do that yourself? Just remove the test in Planet.cpp line 970. But then we have the "11000 NEAs slowdown" problem again if people install all those elements. OTOH, then occultation by dim objects works again. Not easy to fulfill all desires...

Revision history for this message
gzotti (georg-zotti) wrote :

Or maybe leave the line in, but increase mag difference test to 4-5? But test that with all NEAS! Or add a config option, because this test may prevent occultation simulation.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

I'm building 0.13.1.91 now - IMHO version with increase mag difference test to 4-5 should be better than without any versions - it's a good compromise between visibility and performance.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Georg, can you increase mag difference test to 4-5 for comets and asteroids (and disable current behaviour)? Maybe we should introduce limit magnitudes for SSO also, like for DSO and stars?

Revision history for this message
gzotti (georg-zotti) wrote :

I have now magnitude difference of 5 for both planets and comets. Dimmer objects will not get a hint circle unless you zoom in further to increase sky limit magnitude. Still, as I pointed out for 0.13.1, having the test in Planet.cpp will exclude dim asteroids from stellar occultation, not sure if this can be accepted. I hope it's a good compromise now.

Revision history for this message
gzotti (georg-zotti) wrote :

(This was commited as r7230).

Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.