View Issue Details

IDProjectCategoryView StatusLast Update
0001159SkyChart3-Documentationpublic14-03-29 17:55
ReporterAndrew Hood Assigned ToPatrick Chevalley  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSWindowsOS Version7
Product Version3.9 SVN 
Target Version3.10Fixed in Version3.9 SVN 
Summary0001159: Using image for horizon
DescriptionPatrick, have you any recommendations on the colour depth and size of the image (in pixels)? There has to be some "best" size in the tradeoff for CPU/GPU time to render.

I have resized my panorama to be 4096 pixels wide. This is the same one I use in similar programs to CdC. The original is about 13000 pixels wide. The screen is 1920x1080.

If the FOV is above 60° the display is OK, but below that becomes more and more pixelated as the image is zoomed.

I tried close to full size (12888 pixels, 24 bit RGB - 67MB) and response time is terrible. I converted that to 8 bit indexed (only 16MB) and response is better but the image is a bit grainy. With the 12888 pixel background it still becomes a mass of pixels with FOV below 20°.

Alternatively, you could have it fall back to using the local horizon line (if it exists) when the image pixels would render above some number of screen pixels - say 4x4.
TagsNo tags attached.

Activities

Patrick Chevalley

13-04-19 08:56

administrator   ~0002509

Andrew,
Thank you for testing this new feature. It is important for me to have early feedback with different screen size and processor.
I am interested if you can give me your processor model, GHz speed, and number of core.

I try to make the horizon file compatible with Stellarium (type=spherical) as many people already do the work.
But the way CDC display the bitmap is very different and this led to some difference because contrary to Stellarium CDC do not use OpenGL for the display, so all the mapping computation is done by the CPU, not the GPU.

The principle of the computation is to compute azimuth,altitude for each pixel on the map window, then get the corresponding x,y pixel in the panorama.
To speedup the process it is split to up to eight parallel thread depending on the number of available processor.
So globally the performance depend on the size of the map window and the number of available CPU cores.

To see how much time it take you can start skychart with the --verbose option.
Then look at the trace file for this lines:
2013-04-19T08:27:14.480 SkyChart Carte_1: draw horizon
2013-04-19T08:27:14.690 SkyChart Carte_1: draw chart border

In this case it take 0.21 second (4 cores, 3GHz, 1600x1200 screen)

I am interested if you can post some result at different map size.

Now about the file format.
It must be a PNG file to handle the transparency for the sky.
The horizon must be exactly at the middle of the image height. But it is not require for the image to get to the zenith. In fact you can cut the image above the highest horizon point, this save a bit of processing time.
The size of the image as no limitation. I generally use 7200 pixel width as this give 3'/pixel and I have no hope to align my images with a better precision.
A bigger image as no performance impact on the map drawing but it take a longer time to load at the program startup or when you change an option.

I make a change in revision 2498 to interpolate the pixel and make the image more smooth when you zoom in.
http://sourceforge.net/p/skychart/code/2498/


Andrew Hood

13-04-20 13:43

reporter   ~0002510

Patrick, my image is only high enough to include the trees that destroy my western horizon. With the 12888 pixel, 8 bit image:

SVN2494, Quad core i7 (Hyperthreaded) 2GHz, 8GB ram, Win7 64 bit, NVIdia GTX 560M
2013-04-20T21:29:30.797 Chart Chart_1: Init 1436x868
...
2013-04-20T21:29:31.864 SkyChart Chart_1: draw horizon
2013-04-20T21:29:32.193 SkyChart Chart_1: draw compass

SVN2494, Quad core Q6600 (not Hyperthreaded) 2.4GHz, 4GB, Linux 32 bit, remote X-window across 100Mb ethernet (video card isn't working so I can't test on the ATI Radeon 2900 and 1920x1200 monitor on the box)
2013-04-20T21:31:40.185 Chart Chart_1: Init 1438x781
...
2013-04-20T21:31:42.918 SkyChart Chart_1: draw horizon
2013-04-20T21:31:43.610 SkyChart Chart_1: draw chart border

As for aligning images, AutoPano rules. Not cheap though.

Andrew Hood

13-04-26 14:32

reporter   ~0002512

Patrick, as an addition to horizon processing, could you save it (line or image or both) with the location? It would be useful to be able to change between favourites and have the horizon change to match.

Patrick Chevalley

13-04-27 17:09

administrator   ~0002513

Yes, it is very useful to save the horizon options in the favorite list.
This is done by revision 2505:
https://sourceforge.net/p/skychart/code/2505/

I also add a "low quality" option that is activated by default to improve the performance. It can be switched off with the "High quality" checkbox in the setup display.
It process 2x2 pixels on the screen with the same image pixel.
This speedup the display by four.
The loss of quality is not too bad, specifically on high density screen as on laptop.

This two change will be available in next Monday version.
I am interested to know how this work on your two computer.

Patrick Chevalley

13-10-07 20:45

administrator   ~0002602

The problem when loading the file is because of the slow performance of the FreePascal PNG reader for big files.
I made a change to allow the use of BMP format, and on my computer it is six time faster to load.

As standard BMP do not include an alpha channel you must use the fuchsia color to mark the transparent area of the sky. (red=255,green=0,blue=255)

It is easy to convert the PNG file in GIMP for example, remove the alpha channel, then use the "bucket fill tool" to fill the sky and export as bmp.

The only inconvenience of this method is to not allow for partial transparency in the tree.
I also try with JPG to get a smaller file but it is not possible to ensure that the fuchsia color is not altered even with 100% quality.

This is done by revision 2635 and will be available in beta version in one week.
http://sourceforge.net/p/skychart/code/2635/

Issue History

Date Modified Username Field Change
13-04-12 05:53 Andrew Hood New Issue
13-04-19 08:56 Patrick Chevalley Note Added: 0002509
13-04-19 08:56 Patrick Chevalley Assigned To => Patrick Chevalley
13-04-19 08:56 Patrick Chevalley Status new => feedback
13-04-19 08:56 Patrick Chevalley Target Version 0.3.0 => 3.10
13-04-20 13:43 Andrew Hood Note Added: 0002510
13-04-20 13:43 Andrew Hood Status feedback => assigned
13-04-26 14:32 Andrew Hood Note Added: 0002512
13-04-27 17:09 Patrick Chevalley Note Added: 0002513
13-10-07 20:45 Patrick Chevalley Note Added: 0002602
13-10-07 20:45 Patrick Chevalley Status assigned => resolved
13-10-07 20:45 Patrick Chevalley Resolution open => fixed
13-10-07 20:45 Patrick Chevalley Fixed in Version 0.3.0 => 3.9 SVN
14-03-29 17:55 Patrick Chevalley Status resolved => closed