Landscape pixel definition

Feedback
VReijs
2013-01-19
2013-01-22
  • VReijs
    VReijs
    2013-01-19

    Hello all of you,

    I have a query about the pixel definition in Stellarium landscapes. I make landscapes of 2048 by 1024 pixels.
    It looks that the height (in this case 1024 pixels) goes from -90 (precise) to 90 (precise) degrees altitude (the 90 is pixel 0 and -90 degrees is pixel 1023).

    The horizontal definition is a little less clear. The landscapes are defined (using angle_rotatez=0) from East (a 0 degrees) over South (which is by the way different then the azimuth in Stellarium output (which is North at 0 deg over East: like general in astronomy), but that is a different query;-).
    It looks that hor. pixel 0 is put the first pixel after 90 deg azimuth (using the Compass Marks plugin of Matthew gates). Hor. pixel 2047 is put in the pixel before 90 deg azimuth (so '90 deg' compass mark is between pixel 0 and 2047). So the pixel definition is not 0 to 360, but a little less then 360 and a little more then 0.

    As the pixel width is not really determine in Stellarium (due to the size of the window) it would be better, IMHO, to give the first and last pixel of the landscape map the same azimuth of 90 (precise) degrees (or better 0 deg, but that would not be backwards compatible). In that way it is more consistently defined.

    Now there is an inaccuracy determined by the interpolation step in the Stellarium background calculations and an inaccuracy due to half the pixel step in the landscape file (in low resolution files this can be out considerable: for a 512 width it will be 360/1024 deg~ 0.3 deg, close to half the Sun width). Compensating this last inaccuracy with angle_rotatez is possible, but cumbersome and not intuitive and not working properly due to the interpolation inaccuracy.

    Would it be possible to define the landscape width from 0 (precise) to 360 (precise) degrees (pixel 0 to 2047, meaning pixel 0 and 2047 have the same value)?
    Or let me know if I interpretate it wrongly, so I can better my landscapes.

    Thanks for considering. If the above is not clear, let me know.

    All the best,

    Victor

    P.S. If wanted I can provide a landscape zip where it becomes clear.

     
  • VReijs
    VReijs
    2013-01-19

    Here is a sample landscape. I have a line at 0 and 1023 vert. pixel height (being 90 (precise) and -90 (precise). And there are a few pixels near the horizon at hor. pixel 0 and 2047, so one can see where they map on the Compass marks. I would like to see hor. pixel 0 and hot. pixel2047 map on the same screen pixels, to make sure there is a one to one definitin.

     
    Attachments
  • barrykgerdes
    barrykgerdes
    2013-01-20

    Hi Vregis

    I am not sure what you are getting at. The 2048 x 1024 is obviously a spherical landscape of quite low resolution. The display of spherical landscapes is rather limited in Stellarium and I am not sure of the actual display method now.

    Originally there was no way to alter their positions or orientations other than to re-process the image to place the azimuth direction and horizon position although some effort may have been made to improve this. I only make old style multi panel landscapes because of the poor resolution of universally displayable spherical landscapes. Many computer video systems will not handle more than 2048 pixels in the vertical plane and some will only handle 1024 pixels.

    The old style multipanel landscapes have a more flexible display positioning and I have landscape resolutions as good as 38 pixels/degree. Further the panel geometry needs to be 2n for both horizontal and vertical and each panel needs to be identical although the number of panels can be varied for proper effect.

    I have converted some of the larger Hi-res sphericals into multi-panel but this is only practical if the data above the horizon only subtends about an eigth of the total height.

    Barry

    PS I looked at your landscape and realise it is only a skyline so it should be easy enough to edit in TheGimp or photoshop to make it what you want.

     
    Last edit: barrykgerdes 2013-01-20
  • VReijs
    VReijs
    2013-01-20

    Hello Barry, I think it is not about what I want, but I query the definition of the landscape projection in Stellarium. Does it start at 0 (precisely) and end at 360 (precisely) in horizontal direction? At this moment I don't think; both the start and the end are not defined as precise as possible.
    In vertical direction I see it starts (precisely) at 90 and ends at (precisely) -90 (so that is good).
    If I know that I can do anything I indeed want with my horizon line (which is by the way generated by a web service, where you input longitude/latitude and its resolution is also not that large (8 pixels per degrees), but good enough for my archaeoastronomy work).

    All the best,

    Victor

    P.S. I did not check the precisely of the start and end in the old-style (might do that when I know how the new style is defined).

     
  • barrykgerdes
    barrykgerdes
    2013-01-20

    Apparently the landscape starts and finishes at +90 (AZM). As far as I know it is fixed in the code for Spherical landscapes but can be set in the old style anywhere practical. It is not meant to be a precision display, just a look good foreground and horizon.

    If you study the code in the landscapemanager.cpp and the landscape.cpp you may be able to figure it out.

    Barry

     
  • VReijs
    VReijs
    2013-01-20

    Why is pixel 0 of my landscape not on azimuth 90 (E)? It is spread out from 1 pixel further (as described in my first e-mail), see also my sample landscape where you see this effect. So I think it is a matter of definition of pixel values, which seems to be somewhat rotate (1/2 a rotation step), plus the last pixel of the landscape seems not to be properly defined (1 pixel left of 90 (E), and 1 pixel left of 90E depends on the zoom in...).

    Will see if I can study the code. Thanks.

     
  • VReijs
    VReijs
    2013-01-20

    Can someone help me where in this LandspaceMgr.cpp file (http://bazaar.launchpad.net/~stellarium/stellarium/trunk/view/head:/src/core/modules/LandscapeMgr.cpp ) I find the mapping of the landscape file (png) onto the horizon? SI there code in Landscape.cpp or is this done in a rendering package? Thanks for any help to direct me where this is done.
    I am not interested in the accuracy of the landscape (I know it limitations), but it is more that it is done as expected/defined.
    Thanks.

    All the best,

    Victor

     

  • Anonymous
    2013-01-20

    As far as I can make out the Spherical landscapes are mapped to a two dimensional display of a 3D globe by a standard algorithm. The top of the picture is the north pole and the bottom is the south pole the left edge is mapped to +90 (E) and is laid down in a E S W N direction and finishes at +90.

    I would expect that the centre of the first (LHS) vertical row of pixels (pixel 1h) will be aligned to +90. The remaining pixels will be aligned with the mathmatically calculated conversion to a screen location representing the Alt/Azm position.

    I think the information you are looking for will be best found by looking at the methods of making and displaying spherical images on a plane surface

    In regard to those files You will need to get the source code from the stellarium site and have a knowledge of C++ programming. Look in the wiki, Building in Windows, Mac or linux and follow the instructions.

    As I said before, I looked at your "landscape" and while it follows the spherical landscape protocol it is only a horizon contour not a true picturesque landscape in the Stellarium manner so it was difficult for me to relate pixels to azimuth bearings.

    Barry

     
    • VReijs
      VReijs
      2013-01-21

      Hello barry,

      As said: zenith and nadir look to be done well (see the dots in the zenith and nadir in my provided landscape). But the azimuth is not done well: see also the example. It doe snot start at EAST (90), but one pixel more.

      As my landscape is a simple horizon (contour or not, it is a landscape), you can see in the png file that in horizon pixel column 0 and 2047 there are a few white dots in the black landscape (below the skyline). And these dots (in pixel column 0) are not mapped on the 90 East (precise) point, but one pixel (and more) towards the south.

      I have the idea that the pixel mapping is not in the LandscapeMgr.cpp file (at least I see no coordinate transform, which normally are obvious formula). But if someone can direct me where to find this mapping of a landscape file to the azimuth scale, I certainly want to look (I can read most languages; coding is something different;-)

       
  • barrykgerdes
    barrykgerdes
    2013-01-21

    OK Victor

    I have examined the landscape and mapped the LH edge as pixel 0,512. I can see how the landscape is positioned with half the pixel at 90+ and half at 90-.Also the fact that the landscape does not wrap perfectly. This will be due to the algorithm Stellarium uses to generate and display the sphere. This algorithm may be a universal sub called and not part of the Stellarium display. So what is your point. I don't think it is of any consequence as far as Stellarium is concerned in the display of a landscape.

    As far as accuracy goes I use a 10 panel old style landscape that is carefully sized and positioned to give a very good representation of the tree lined horizon. That does in fact show the stars through the trees in their correct aspect when viewed from the source of the landscape.

    Barry

     
    Last edit: barrykgerdes 2013-01-21
    • VReijs
      VReijs
      2013-01-21

      Hello Barry,

      On 21 January 2013 20:53, barrykgerdes barrykgerdes@users.sf.net wrote:

      I have examined the landscape and mapped the LH edge as pixel 0,512. I can
      see how the landscape is positioned with half the pixel at 90+ and half at
      90-.Also the fact that the landscape does not wrap perfectly. This will be
      due to the algorithm Stellarium uses to generate and displwy the sphere.
      This algorithm may be a universal sub called and not part of the Stellarium
      display. So what is your point.

      Precisely what you now also state: Nothing more nothing less. Of course one
      could say: it is not important. I am just observing this and sometimes
      things like this is just a small coding 'error' (like instead of starting
      with 0 one starts with 1..) But also the end is somewhat undefined
      perhaps..
      That is why looking at the code (as you propose) is indeed handy (but I am
      not able to find it (but it might be part of an external package...).

      But I am glad you see the same issue as I;-)

      All the best,

      Victor

       
  • barrykgerdes
    barrykgerdes
    2013-01-21

    Hi Victor

    I had a look at my hi-res landscape. This landscape has been processed in a panorama generating program to make the panel joins as accurate and invisible as possible including the start/finish of the landscape. The display starts at -25 degrees as defined in the *.ini file ( reference zero being to east as + 90 degrees) but I cannot discern whether it is a half pixel or not. Zooming to pixel level does not display a single pixel. The resolution of the landscape is better than 2cm at a distance of 20 metres.

    The method of display of the multi-panel landscapes uses a different procedure than the Sphericals.

    Barry

     
    Last edit: barrykgerdes 2013-01-21
    • VReijs
      VReijs
      2013-01-21

      I will try these panels and see what happens! THANKS.

      On 21 January 2013 22:00, barrykgerdes barrykgerdes@users.sf.net wrote:

      Hi Victor

      I had a look at my hi-res landscape. This landscape has been processed in
      a panorama generating program to make the panel joins as accurate and
      invisible as possible including the start/finish of the landscape. The
      display starts a -25 degrees as defined in the *.ini file ( reference zero
      being to east as + 90 degrees) but I cannot discern whether it is a half
      pixel or not. Zooming to pixel level does not display a single pixel. The
      resolution of the landscape is better than 2cm at a distance of 20 metres.

      The method of display of the multi-panel landscapes uses a different
      procedure than the Sphericals.

      Barry

      Landscape pixel definitionhttps://sourceforge.net/p/stellarium/discussion/278769/thread/7b990613/?limit=25#7f20

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/stellarium/discussion/278769/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/prefs/

       


Anonymous


Cancel   Add attachments