Bug 94895 - Resolution of object's size is bad
Summary: Resolution of object's size is bad
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-11 05:47 UTC by bghfhfg
Modified: 2007-12-22 07:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bghfhfg 2004-12-11 05:47:39 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Kstars appears to measure resolutions of object's sizes only in units of half-arcminutes. This is fine for low zoom, but at high zoom moving in units that big makes the object appear to jump across the sky.
Comment 1 kstars 2005-01-06 15:25:50 UTC
If I understand correctly, this is not about objects' sizes, it is about the fact that at high zoom levels, the objects are moving in discrete "jumps" with each timestep.  Is that right?

There is a single line of code in KStars that controls how often the screen is refreshed.  It varies with zoom level (because at low zoom, it would be wasting CPU cycles to update very often, since things move very slowly).

It is easy enough to change this line and make KStars update the screen more often.  This would make the movement of objects more smooth at high zoom levels.  However, there are two consequences of doing so:

1) The CPU load at high zoom levels is increased.  Unless you have very modern hardware, KStars at high zoom already gives your CPU quite a workout.  There are ways we can improve the efficiency of this.  Since the vast majority of objects are off-screen at high zoom, it would be nice if we could skip them and concentrate only on the small number of onscreen objects.  In fact, we already do partially skip off-screen objects, but I think it can be improved further.  I've had this issue in the back of my mind for months.  It's a complex issue.

2) If you increase the high-zoom update rate, an ugly artifact is revealed due to the fact that Qt uses integer pixel coordinates.  This imposes a lower limit on how smooth the motion can be, because an object moving across the screen cannot move less than one pixel.  Ordinarily this is not a big deal, because pixels are small.  However, the issue in KStars is that different objects will cross pixel borders at different times.  The net effect is that the sky looks like it is slightly "shimmering" or jittering.  The effect is especially bad for extended objects, because the shape and orientation of the object change slightly as different parts of it cross pixel boundaries at different times.  Galaxies don't glide across the screen, they waddle!

By imposing a slower update rate, I hide this effect, because all objects on screen require an update at the same time, so they all move together.  It looks much better this way, even with the larger position jumps (IMO).

If you have the source code, you are free to try changing the parameter yourself.  Find the following lines in kstarsdata.cpp:

	//Update Alt/Az coordinates.  Timescale varies with zoom level
	//If Clock is in Manual Mode, always update. (?)
	if ( fabs( ut().djd() - LastSkyUpdate.djd() ) > 0.25/Options::zoomFactor() || clock()->isManualMode() ) {

Change the "0.25" to something lower, like 0.1, then recompile and install.

If you just want to see the waddling effect, you can pause the clock, zoom in and use the manual time-step key (">") to advance the clock rapidly.  Pick an area of sky with many objects on screen.

This waddling issue may be addressed by the new OpenGL capabilities built into Qt4.  OpenGL allows floating-point pixel coordinates.

Sorry for the long reply.  The bottom line is, I am aware of the issue and I would like to fix it, but it must be done in a way that is friendly to those with modest hardware.  Also, the current solution (to increase the update rate) actually makes the problem worse in some ways.
Comment 2 kstars 2007-12-22 07:11:44 UTC
SVN commit 751536 by harris:

Fixing Bug 94895:
The KDE4 codebase is much more efficient in the way it determines
whether objects are onscreen, so we can now update the sky more often
without stressing the CPU too much.

BUG: 94895
CCMAIL: kstars-devel@kde.org



 M  +1 -1      kstarsdata.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=751536