1%% Part of Stellarium User Guide
2%% History:
3%% 2016-04-24 Adapted from GZ's course given at SEAC2015 in Rome.
4%% 2016-04-25 Added section on making Nadir image for old_style landscape.
5%% State: Current for 0.15.
6
7
8\chapter{Landscapes}
9\label{ch:landscapes}
10\chapterauthor*{Georg Zotti}
11
12\newcommand{\landscape}[1]{\textsf{\textit{\footnotesize #1}}}
13
14
15Landscapes are one of the key features that make Stellarium popular.
16Originally just used for decoration, since version 10.6 they can be
17configured accurately for research and demonstration in ``skyscape
18astronomy'', a term which describes the connection of landscape,
19the sky above, and the observer~\citep{Brown:JSA2015}. Configured properly, they can act as reliable proxies
20of the real landscapes, so that you can take e.g.\ measurements of
21sunrise or stellar alignments~\citep{Zotti-Neubauer:SEAC2011}, or prepare your next moonrise
22photograph, as though you were on-site.
23
24In this chapter you can find relevant information required to
25accurately configure Stellarium landscapes, using panoramas created
26from photographs taken on-site, optionally supported by horizon
27measurements with a theodolite.
28
29
30Creating an accurate panorama requires some experience with
31photography and image processing. However, great open-source tools
32have been developed to help you on the job. If you already know other
33tools, you should be able to easily transfer the presented concepts to
34those other tools.
35
36While you are editing a landscape, you may want to reload it
37frequently. Turn off caching by editing the \file{config.ini}:
38
39\begin{configfile}
40  [landscape]
41  cache_size_mb = 0
42\end{configfile}
43
44\section{Stellarium Landscapes}
45\label{sec:landscapes:StellariumLandscapes}
46
47
48As of version 0.15, the available landscape types are:
49\begin{description}
50\item[polygonal] A point list of measured azimuth/altitude pairs, used
51  to define a sharp horizon polygon. The area below the horizon line
52  is colored in a single color
53  (Section~\ref{sec:landscapes:Polygonal}).
54\item[spherical] The simple form to configure a photo-based panorama:
55  A single image is used as texture map for the horizon
56  (Section~\ref{sec:landscapes:Spherical}).
57\item[old\_style] The original photo panorama. This is the most
58  difficult to configure, but allows highest resolution by using
59  several texture maps (Section~\ref{sec:landscapes:oldStyle}).
60\item[fisheye] Another 1-texture approach, utilizing an image made
61  with a fisheye lens. This landscape suffers from calibration
62  uncertainties and can only be recommended for decoration
63  (Section~\ref{sec:landscapes:Fisheye}).
64\end{description}
65
66A landscape consists of a \file{landscape.ini} plus the data files
67that are referenced from there, like a coordinate list or the
68textures. Those reside in a subdirectory of the \file{landscape}
69folder inside the Stellarium program directory, or, for own work, in a
70subdirectory of the \file{landscape} folder inside your Stellarium
71user data directory (see section~\ref{sec:Directories}).
72
73Let us assume we want to create a landscape for a place called
74Rosenburg.  The location for the files of our new custom landscape
75\landscape{Rosenburg} depends on the operating system (see
76\ref{sec:Directories}). Create a new subdirectory, and for maximum
77compatibility, use small letters and no spaces:
78
79\noindent
80\begin{tabular}{ll}
81Windows&  \file{C:/Users/YOU/AppData/Roaming/Stellarium/landscapes/rosenburg}\\
82Linux&\file{\textasciitilde/.stellarium/landscapes/rosenburg}\\
83Mac&\file{\$HOME/Library/Application\ Support/Stellarium/landscapes/rosenburg}\\
84\end{tabular}
85
86
87% \noindent The user data directory is unfortunately hidden by default
88% on all systems. (On UNIX-like systems, directories starting with a
89% \file{.} are hidden.) To make it accessible in the Windows file
90% explorer, open an Explorer window and select \menu{Organize..., Folder and
91% search options}. Make sure folders marked as hidden are still
92% displayed. Also, deselect the checkbox to hide known file name
93% endings.\footnote{This is a very confusing default setting and in fact
94%   a security risk: Consider you receive some file
95%   \file{funny.png.exe}. Your explorer displays this as
96%   \file{funny.png}. You double-click it, expecting to open some image
97%   browser with a funny image. However, you start some unknown program
98%   instead, and running this \file{.exe} executable program may turn
99%   out to be anything but funny!}
100%
101
102\subsection{Location information}
103\label{sec:landscapes:location}
104
105This optional section in \file{landscape.ini} allows automatic loading
106of site coordinates if this option is activated in the program
107GUI (see~\ref{sec:gui:view:landscape}). For our purposes we should consider especially the coordinates in
108the location section mandatory!
109
110\begin{configfile}
111[location]
112planet = Earth
113country = Austria
114name = KGA Rosenburg
115latitude = +48d38'3.3"
116longitude = +15d38'2.8"
117altitude = 266
118timezone = Europe/Vienna
119light_pollution = 1
120atmospheric_extinction_coefficient = 0.2
121display_fog = 0
122atmospheric_temperature = 10.0
123atmospheric_pressure = 1013.0
124\end{configfile}
125%
126Where:
127\begin{description}
128\item[\var{planet}] Is the English name of the solar system body for
129  the landscape.
130\item[\var{latitude}] Is the latitude of site of the landscape in
131  degrees, minutes and seconds. Positive values represent North of the
132  equator, negative values South of the equator.
133\item[\var{longitude}] Is the longitude of site of the
134  landscape. Positive values represent East of the Greenwich Meridian
135  on Earth (or equivalent on other bodies), Negative values represent
136  Western longitude.
137\item[\var{altitude}] Is the altitude of the site of the landscape in meters.
138\item[\var{country}] (optional) Name of the country the location is in.
139\item[\var{state}] (optional) Name of the state the location is in.
140\item[\var{timezone}] (optional) IANA Timezone code \newFeature{0.18.3}
141\item[\var{name}] (optional) Name of the location. This may contain
142  spaces, but keep it short to have it fully visible in the
143  selection box.
144\end{description}
145%
146Since v0.11.0, there are a few more optional parameters that can be
147loaded if the according switch is active in the landscape selection
148panel. If they are missing, the parameters do not change to defaults.
149
150\begin{description}
151\item[\var{light\_pollution}] (optional) Light pollution of the site,
152  given on the Bortle Scale (1: none \ldots 9: metropolitan; see
153  Appendix \ref{ch:BortleScale}). If negative or absent, no change
154  will be made.
155\item[\var{atmospheric\_extinction\_coefficient}] (optional, no change
156  if absent.) Extinction coefficient (mag/airmass) for this site.
157\item[\var{atmospheric\_temperature}] (optional, no change if absent.)
158  Surface air temperature (Degrees Celsius). Used for refraction. Set
159  to -1000 to explicitly declare ``no change''.
160\item[\var{atmospheric\_pressure}] (optional, no change if absent.)
161  Surface air pressure (mbar; would be 1013 for ``normal'' sea-level
162  conditions). Used for refraction. Set to -2 to declare ``no change'',
163  or -1 to compute from altitude.
164\item[\var{display\_fog}] (optional, -1/0/1, default=-1) You may want
165  to preconfigure setting 0 for a landscape on the Moon. Set -1 to
166  declare ``no change''.
167\end{description}
168
169
170\subsection{Polygonal landscape}
171\label{sec:landscapes:Polygonal}
172
173This landscape type has been added \newFeature{0.13} to allow
174the use of measured horizons. Users of \program{Cartes du
175  Ciel}\footnote{SkyChart / Cartes du Ciel planetarium:
176  \url{https://www.ap-i.net/skychart/en/start}} will be happy to hear
177that the format of the list of measurements is mostly compatible.
178
179This is the technically simplest of the landscapes, but may be used to
180describe accurately measured horizon profiles. The file that encodes
181horizon altitudes can also be used in all other landscape types. If
182present there, it will be used to define object visibility (instead of
183the opacity of the landscape photo textures) and, if
184\var{horizon\_line\_color} is defined, will be plotted.
185
186There are two little caveats:
187\begin{itemize}
188\item Sometimes, there may appear vertical lines
189from some corners towards the zenith or the mathematical horizon,
190e.g.\ if there is a vertex including azimuth 0 or 180. If this
191irritates you, just offset this azimuth minimally (e.g., 180.00001).
192\item As technical requirement, the zenith is always assumed to remain
193  free and uncovered. It is not possible to define a ``dome cutout''
194  or similar restricted views out of a window. Such effect can be
195  achieved with a Spherical Landscape (see
196  section~\ref{sec:landscapes:Spherical}).
197\end{itemize}
198
199\noindent The \file{landscape.ini} file for a polygonal type landscape looks
200like this (this example is based on the \landscape{Geneve} landscape
201which was borrowed from \program{Cartes du Ciel} and comes with Stellarium):
202
203\begin{configfile}
204[landscape]
205name = Geneve
206type = polygonal
207author = Georg Zotti; Horizon definition by Patrick Chevalley
208description = Horizon line of Geneve.
209              Demonstrates compatibility with
210              horizon descriptions from Cartes du Ciel.
211polygonal_horizon_list = horizon_Geneve.txt
212polygonal_angle_rotatez = 0
213ground_color = .15,.45,.45
214horizon_line_color = .75,.45,.45
215\end{configfile}
216%
217Where:
218\begin{description}
219\item[\var{name}] appears in the landscape tab of the configuration window.
220\item[\var{type}] identifies the method used for this landscape. \var{polygonal} in this case.
221\item[\var{author}] lists the author(s) responsible for images and composition.
222\item[\var{description}] gives a short description visible in the
223  selection panel. The text can be superseded by optional
224  \file{description.<lang>.utf8} files.
225\item[\var{polygonal\_horizon\_list}] is the name of the horizon data file for this landscape.
226\item[\var{polygonal\_horizon\_list\_mode}] (optional) the two first
227  columns in the list are numbers: azimuth and altitude or zenith
228  distance, in either degrees or radians or gradians(gon). The value
229  must be one of \var{azDeg\_altDeg}, \var{azDeg\_zdDeg}, \var{azRad\_altRad},
230    \var{azRad\_zdRad}, \var{azGrad\_altGrad}, \var{azGrad\_zdGrad}. Default:
231  \var{azDeg\_altDeg}
232\item[\var{polygonal\_angle\_rotatez}] (optional, default=0) Angle
233  (degrees) to adjust azimuth. This may be used to apply a (usually)
234  small offset rotation, e.g. when you have measured the horizon in a
235  grid-based coordinate system like UTM and have to compensate for the
236  meridian convergence.
237\item[\var{ground\_color}] (optional, default=\var{0,0,0}, i.e.,
238  black) Color for the area below the horizon line. Each R,G,B
239  component is a float within 0..1.
240\item[\var{horizon\_line\_color}] (optional, default: invisible) used
241  to draw a polygonal horizon line. Each R,G,B component is a float
242  within 0..1.
243\item[\var{minimal\_brightness}] (optional) Some minimum brightness to
244  keep landscape visible. Default=-1, i.e., use
245  \var{minimal\_brightness} from the \var{[landscape]} section in the
246  global \file{config.ini}.
247\item[\var{minimal\_altitude}] (optional, default=-2) Some sky
248  elements, e.g.\ stars, are not drawn below this altitude to increase
249  performance. Under certain circumstances you may want to specify
250  something else here. (since v0.14.0)
251\item[\var{polygonal\_horizon\_inverted}] (optional, default=false;
252  only required in v0.15.0--0.20.2) In rare cases like horizon lines
253  for high mountain peaks with many negative horizon values this
254  should be set to true.
255\end{description}
256
257\subsubsection{Artificial Polygonal Panoramas}
258The online service
259\program{HeyWhatsThat}\footnote{\url{https://www.heywhatsthat.com/}}
260allows an SRTM-based analysis of the viewshed (the visible topographic
261area) for an observing location which also gives names for the
262mountain peaks visible at a given location. In summer of 2020 a
263dedicated landscape download option for \program{Stellarium} was added
264(see upper-right corner), so that you can install a custom
265landscape. Its package/directory name is
266\texttt{stellarium-landscape}. If you create more than one, you must
267rename the directory. You may also want to extend the scene
268description in \file{landscape.ini}.
269
270A data download option provides users inclined to do some programming
271with the necessary data to create a polygonal landscape for
272Stellarium. From this, \name[Brian]{Doyle} has created another online service,
273\program{horiZONE}\footnote{\url{https://briandoylegit.github.io/horiZONE/}},
274which does just this work for you.
275\begin{enumerate}
276\item When your viewshed analysis has been created in
277  \program{HeyWhatsThat}, enter the ``all panoramas'' tab, and on the
278  map click the marker associated with the panorama. Select ``make
279  public''.
280\item Then, take the landscape key given to you by
281  \program{HeyWhatsThat}\footnote{ in the line
282    \texttt{https://www.heywhatsthat.com/?view=N15ABXY}}, add a few
283  lines of description and other details that will become visible and
284  used in Stellarium, and you receive a ZIP file ready for
285  installation in Stellarium (see section
286  \ref{sec:gui:view:landscape}).
287\end{enumerate}
288
289
290\subsection{Spherical landscape}
291\label{sec:landscapes:Spherical}
292
293This method uses a more usual type of panorama -- the kind which is
294produced directly from software such as \program{autostitch} or
295\program{Hugin}\footnote{\url{http://hugin.sourceforge.net/}}.  The
296\landscape{Moon} landscape which comes with Stellarium provides a
297minimal example of a \file{landscape.ini} file for a spherical type
298landscape:
299
300\begin{configfile}
301[landscape]
302name = Moon
303type = spherical
304maptex = apollo17.png
305\end{configfile}
306A more elaborate example is found with the \landscape{Grossmugl} landscape:
307
308\begin{configfile}
309[landscape]
310name = Grossmugl
311type = spherical
312author = Guenther Wuchterl, Kuffner-Sternwarte.at;
313         Lightscape: Georg Zotti
314description = Field near Leeberg, Grossmugl (Riesentumulus),
315              Austria - Primary Observing Spot of the Grossmugl
316              Starlight Oasis - http://starlightoasis.org
317maptex = grossmugl_leeberg_crop11.25.png
318maptex_top=11.25
319maptex_fog = grossmugl_leeberg_fog_crop22.5.png
320maptex_fog_top = 22.5
321maptex_fog_bottom = -22.5
322maptex_illum = grossmugl_leeberg_illum_crop0.png
323maptex_illum_bottom = 0
324angle_rotatez=-89.1
325minimal_brightness = 0.0075
326polygonal_horizon_list = horizon_grossmugl.txt
327polygonal_angle_rotatez=0
328horizon_line_color =  .75,.45,.45
329minimal_altitude = -1
330\end{configfile}
331Where:
332\begin{description}
333\item[\var{name}] appears in the landscape tab of the configuration window. This name may be translated.
334\item[\var{type}] identifies the method used for this
335  landscape. \var{spherical} in this case.
336\item[\var{author}] lists the author(s) responsible for images and
337  composition.
338\item[\var{description}] gives a short description visible in the
339  selection panel. The text will be superseded by optional
340  \file{description.<lang>.utf8} files.
341\item[\var{maptex}] is the name of the image file for this landscape.
342\item[\var{maptex\_top}] (optional; default=90) is the altitude angle
343  of the top edge.
344\item[\var{maptex\_bottom}] (optional; default=-90) is the altitude
345  angle of the bottom edge. Usually you will not require this, or else
346  there will be a hole at your feet, unless you also specify
347\item[\var{bottom\_cap\_color}] (optional;
348  default=\texttt{-1.0,0.0,0.0} to signal ``no color''). If set, this
349  is used to close any hole in the nadir area (if \var{maptex\_bottom}
350  higher than -90). \newFeature{0.19.0}
351\item[\var{maptex\_fog}] (optional; default: no fog) is the name of
352  the fog image file for this landscape.
353\item[\var{maptex\_fog\_top}] (optional; default=90) is the altitude
354  angle of the top edge of the fog texture. Useful to crop away parts
355  of the image to conserve texture memory.
356\item[\var{maptex\_fog\_bottom}] (optional; default=-90) is the
357  altitude angle of the bottom edge.
358\item[\var{maptex\_illum}] (optional; default: no illumination layer)
359  is the name of the nocturnal illumination/light pollution image file
360  for this landscape.
361\item[\var{maptex\_illum\_top}] (optional; default=90) is the altitude
362  angle of the top edge, if you have light pollution only close to the
363  horizon.
364\item[\var{maptex\_illum\_bottom}] (optional; default=-90) is the
365  altitude angle of the bottom edge.
366\item[\var{angle\_rotatez}] (optional, default=0) Angle (degrees) to
367  adjust azimuth. If 0, the left/right edge is due east.
368\item[\var{tesselate\_rows}] (optional, default=20) This is the number
369  of rows for the maptex. If straight vertical edges in your landscape
370  appear broken, try increasing this value, but higher values require
371  more computing power. Fog and illumination textures will have a
372  similar vertical resolution.
373\item[\var{tesselate\_cols}] (optional, default=40) If straight
374  horizontal edges in your landscape appear broken, try increasing.
375\item[\var{polygonal\_horizon\_list}] (optional) is the name of the
376  (measured) horizon data file for this landscape. Can be used to
377  define the exact position of the horizon. If missing, the texture
378  can be queried for horizon transparency (for accurate object
379  rising/setting times)
380\item[\var{polygonal\_horizon\_list\_mode}] (optional) see \ref{sec:landscapes:Polygonal}
381\item[\var{polygonal\_angle\_rotatez}] (optional, default=0) see \ref{sec:landscapes:Polygonal}
382\item[\var{horizon\_line\_color}] see \ref{sec:landscapes:Polygonal}
383\item[\var{minimal\_brightness}]  see \ref{sec:landscapes:Polygonal}
384\item[\var{minimal\_altitude}] (optional, default=-2) \newFeature{0.14.0} Some sky
385  elements, e.g.\ stars, are not drawn below this altitude for
386  efficiency. Under certain circumstances (e.g.\ for space station
387  panoramas where you may have sky below your feet, or for deep
388  valleys/high mountains, you may want to specify something else
389  here.
390\end{description}
391%
392To save texture memory, %since v0.13.0
393you can trim away the transparent
394sky and define the angle \var{maptex\_top}. Likewise,
395\var{fogtex\_top}, \var{fogtex\_bottom}, \var{maptex\_illum\_top} and
396\var{maptex\_illum\_bottom}. You should then stretch the texture to a
397full power of 2 for maximum compatibility, like $4096\times1024$ (but note that some hardware is
398even limited to 2048 pixels). The easiest method to create perfectly
399aligned fog and illumination layers is with an image editor that
400supports layers like the \program{GIMP} or \program{Photoshop}. Fog
401and Light images should have black background.
402
403
404\subsection{High resolution (``Old Style'')  landscape}
405\label{sec:landscapes:oldStyle}
406
407The \var{old\_style} or multiple image method works by having the
408360\degree panorama of the horizon (without wasting too much texture
409memory with the sky) split into a number of reasonably small
410\emph{side textures}, and a separate \emph{ground texture}. This has
411the advantage over the single-image method that the detail level of
412the horizon can be increased without ending up with a single very
413large image file, so this is usable for either very high-resolution
414panoramas or for older hardware with limited capabilities. The ground
415texture can be a different resolution than the side textures. Memory
416usage may be more efficient because there are no unused texture parts
417like the corners of the texture file in the fish-eye method. It is
418even possible to repeat the horizon several times (for purely
419decorative purpose). The side textures are mapped onto curved
420(spherical ring or cylinder) walls
421(Fig.~\ref{fig:landscapes:oldStyle}).
422
423\begin{figure}[tb]
424  \centering
425   \includegraphics[width=10cm]{Rosenburg-Demo.png}
426   \caption{Old\_style landscape: eight parts delivering a
427     high-resolution panorama. The bottom (ground) texture, drawn on a flat
428     plane, is not shown here.}
429  \label{fig:landscapes:oldStyle}
430\end{figure}
431
432On the negative side, it is more difficult to create this type of
433landscape -- merging the ground texture with the side textures can
434prove tricky. (\program{Hugin} can be used to create also this file,
435though. And on the other hand, you can replace this by something else
436like a site map.) The contents of the \file{landscape.ini} file for
437this landscape type is also somewhat more complicated than for other
438landscape types. Here is the \file{landscape.ini} file which describes
439our \landscape{Rosenburg} landscape\footnote{the \var{groundtex}
440  \file{grassground.png} mentioned here has been taken from the
441  \landscape{Guereins} landscape.}:
442
443\begin{configfile}
444[landscape]
445name = KGA Rosenburg
446author = Georg Zotti, VIAS/ASTROSIM
447description = KGA Rosenburg
448type = old_style
449nbsidetex = 8
450tex0 = Horiz-0.png
451tex1 = Horiz-1.png
452tex2 = Horiz-2.png
453tex3 = Horiz-3.png
454tex4 = Horiz-4.png
455tex5 = Horiz-5.png
456tex6 = Horiz-6.png
457tex7 = Horiz-7.png
458nbside = 8
459side0 = tex0:0:0:1:1
460side1 = tex1:0:0:1:1
461side2 = tex2:0:0:1:1
462side3 = tex3:0:0:1:1
463side4 = tex4:0:0:1:1
464side5 = tex5:0:0:1:1
465side6 = tex6:0:0:1:1
466side7 = tex7:0:0:1:1
467groundtex = grassground.png
468ground = groundtex:0:0:1:1
469nb_decor_repeat = 1
470decor_alt_angle =  82
471decor_angle_shift = -62
472; Rotatez deviates from -90 by the Meridian Convergence.
473; The original landscape pano is grid-aligned,
474; not north-aligned!
475decor_angle_rotatez =  -90.525837223
476ground_angle_shift = -62
477ground_angle_rotatez =  44.474162777
478draw_ground_first = 1
479fogtex = fog.png
480fog_alt_angle = 20
481fog_angle_shift = -3
482fog = fogtex:0:0:1:1
483calibrated = true
484[location]
485planet = Earth
486latitude = +48d38'3.3"
487longitude = +15d38'2.8"
488altitude = 266
489light_pollution = 1
490atmospheric_extinction_coefficient = 0.2
491display_fog = 0
492atmospheric_temperature = 10.0
493atmospheric_pressure = 1013.0
494\end{configfile}
495%
496Where:
497\begin{description}
498\item[\var{name}] is the name that will appear in the landscape tab of the configuration window for this landscape
499\item[\var{type}] should be \var{old\_style} for the multiple image method.
500\item[\var{author}] lists the author(s) responsible for images and composition.
501\item[\var{description}] gives a short description visible in the
502  selection panel. The text will be superseded by optional
503  \file{description.<lang>.utf8} files.
504\item[\var{nbsidetex}] is the number of side textures for the landscape.
505\item[\var{tex0 ... tex<nbsidetex-1>}] are the side texture file
506  names. These should exist in the \file{textures / landscapes /
507    landscape} directory in PNG format.
508\item[\var{light0 ... light<nbsidetex-1>}] are optional textures\newFeature{0.13.1}. If
509  they exist, they are used as overlays on top of the respective
510  \var{tex<...>} files and represent nocturnal illumination,
511  e.g. street lamps, lit windows, red dots on towers, sky glow by city
512  light pollution, \ldots Empty (black) panels can be omitted. They
513  are rendered exactly over the \var{tex<...>} files even when the PNG
514  files have different size. If you need your light pollution higher in
515  the sky, you must use a spherical or fisheye
516  landscape.
517\item[\var{nbside}] is the number of side textures
518\item[\var{side0 \ldots side<nbside-1>}] are the descriptions of how
519  the side textures should be arranged in the program. Each
520  description contains five fields separated by colon characters
521  (\var{:}). The first field is the ID of the texture
522  (e.g. \var{tex0}), the remaining fields are the texture coordinates
523  (\var{x0:y0:x1:y1}) used to place the texture in the scene. If you
524  want to use all of the image, this will just be \var{0:0:1:1}.
525\item[\var{groundtex}] is the name of the ground texture file. (This
526  could also be a diagram e.g. indicating the mountain peaks!)
527%\item[\var{ground}] [NO LONGER USED] used to be the description of the projection of the ground texture in the scene.
528\item[\var{fogtex}] is the name of the texture file for fog in this
529  landscape. Fog is mapped onto a simple cylinder.\footnote{In very wide-angle
530  views, the fog cylinder may become visible in the corners.} Note that for this
531  landscape, accurate overlay of fog and landscape is only guaranteed if
532  \var{calibrated=true} and \var{tan\_mode=true}.
533%\item[\var{fog}] [NO LONGER USED] used to be the description of the projection of the fog texture in the scene.
534\item[\var{nb\_decor\_repeat}] is the number of times to repeat the
535  side textures in the 360 panorama. (Useful photo panoramas should
536  have \var{1} here)
537\item[\var{decor\_alt\_angle}] (degrees) is the vertical angular
538  extent of the textures (i.e. how many degrees of the full altitude
539  range they span).
540\item[\var{decor\_angle\_shift}] (degrees) vertical angular offset of
541  the scenery textures, at which height the bottom line of the side
542  textures is placed.
543\item[\var{decor\_angle\_rotatez}] (degrees) angular rotation of the
544  panorama around the vertical axis. This is handy for rotating the
545  landscape so North is in the correct direction. Note that for
546  historical reasons, a landscape with this value set to zero degrees
547  has its leftmost edge pointing towards east.
548\item[\var{ground\_angle\_shift}] (degrees) vertical angular offset of
549  the ground texture, at which height the ground texture is placed.
550  Values above -10 are not recommended for non-photographic content
551  (e.g., a map) due to high distortion.
552\item[\var{ground\_angle\_rotatez}] (degrees) angular rotation of the
553  ground texture around the vertical axis. When the sides are rotated,
554  the ground texture may need to be rotated as well to match up with
555  the sides. If 0, east is up. if North is up in your image, set this to
556  90. Note that adjustments of \var{decor\_angle\_rotatez} require
557  adjustments of this angle in the opposite direction!
558\item[\var{fog\_alt\_angle}] (degrees) vertical angular size of the
559  fog cylinder - how fog looks. Accurate vertical size requires
560  \var{calibrated=true}.
561\item[\var{fog\_angle\_shift}] (degrees) vertical angular offset of
562  the fog texture - at what height is it drawn. Accurate vertical
563  placement requires \var{calibrated=true}.
564\item[\var{draw\_ground\_first}] if \var{true} or
565  \var{1}\footnote{Boolean values \var{true|false} preferred since
566    V0.19.3, but \var{0|1} are still accepted.} the ground is drawn in
567  front of the scenery, i.e. the side textures will overlap over the
568  ground texture if \var{ground\_angle\_shift} >
569  \var{decor\_angle\_shift}.
570\item[\var{calibrated}] (optional).\newFeature{0.10.6} Only if true,
571  \var{decor\_alt\_angle} etc. really work as documented above. The
572  (buggy) old code was left to work with the landscapes already
573  existing. Note that with ``uncalibrated'' landscapes, sunrise
574  computations and similar functionality which requires an accurate
575  horizon line will not work.
576\item[\var{tan\_mode}] (optional, not used in this file). If true, the
577  panorama image must be in in cylindrical, not equirectangular
578  projection. Finding \var{decor\_alt\_angle} and
579  \var{decor\_angle\_shift} may be a bit more difficult with this, but
580  now (v0.13.0) works also with calibrated. A fog image created as
581  overlay on the pano will be perfectly placed.
582\item[\var{polygonal\_horizon\_list}] (optional) see \ref{sec:landscapes:Spherical}
583\item[\var{polygonal\_horizon\_list\_mode}] (optional) see \ref{sec:landscapes:Polygonal}
584\item[\var{polygonal\_angle\_rotatez}] (optional, default=0) see \ref{sec:landscapes:Polygonal}
585\item[\var{horizon\_line\_color}] (optional) see \ref{sec:landscapes:Polygonal}
586\item[\var{minimal\_brightness}]  (optional) see \ref{sec:landscapes:Polygonal}
587\item[\var{minimal\_altitude}] (optional) see \ref{sec:landscapes:Polygonal}
588\end{description}
589
590
591\subsection{Fisheye landscape}
592\label{sec:landscapes:Fisheye}
593
594The \landscape{Trees} landscape that is provided with Stellarium is an
595example of the single fish-eye method, and provides a good
596illustration. The centre of the image is the spot directly above the
597observer (the zenith). The point below the observer (the nadir)
598becomes a circle that just touches the edges of the image. The
599remaining areas of the image (the corners outside the circle) are not
600used.
601
602\begin{figure}[t]
603\centering\includegraphics[width=\textwidth]{trees_512.png}
604\caption{Texture for the \landscape{Trees} Fisheye landscape.}
605\label{fig:landscapes:Fisheye}
606\end{figure}
607
608
609The image file (Fig.~\ref{fig:landscapes:Fisheye}) should be saved in
610PNG format with alpha transparency. Whereever the image is transparent
611Stellarium will render the sky.
612
613The \file{landscape.ini} file for a fish-eye type landscape looks like
614this (this example is based on the \landscape{Trees} landscape which
615comes with Stellarium):
616
617\begin{configfile}
618[landscape]
619name = Trees
620type = fisheye
621author = Robert Spearman. Light pollution image: Georg Zotti
622description = Trees in Greenlake Park, Seattle
623maptex = trees_512.png
624maptex_illum = trees_illum_512.png
625maptex_fog = trees_fog_512.png
626texturefov = 210
627angle_rotatez = 17
628tesselate_rows = 28
629tesselate_cols = 60
630\end{configfile}
631Where:
632\begin{description}
633\item[\var{name}] appears in the landscape tab of the configuration window.
634\item[\var{type}] identifies the method used for this landscape. \var{fisheye} in this case.
635\item[\var{author}] lists the author(s) responsible for images and composition.
636\item[\var{description}] gives a short description visible in the
637  selection panel. The text will be superseded by optional
638  \file{description.<lang>.utf8} files.
639\item[\var{maptex}] is the name of the image file for this landscape.
640\item[\var{maptex\_fog}] (optional) is the name of the fog image file for this landscape.
641\item[\var{maptex\_illum}] (optional) is the name of the nocturnal
642  illumination/light pollution image file for this landscape.
643\item[\var{texturefov}] is the field of view that the image covers in degrees.
644\item[\var{angle\_rotatez}] (optional) Angle (degrees) to adjust azimuth.
645\item[\var{tesselate\_rows}] (optional, default=20) If straight edges
646  in your landscape appear broken, try increasing.
647\item[\var{tesselate\_cols}] (optional, default=40) If straight edges
648  in your landscape appear broken, try increasing.
649\item[\var{polygonal\_horizon\_list}] (optional) see \ref{sec:landscapes:Spherical}
650\item[\var{polygonal\_horizon\_list\_mode}] (optional) see \ref{sec:landscapes:Polygonal}
651\item[\var{polygonal\_angle\_rotatez}] (optional, default=0) see \ref{sec:landscapes:Polygonal}
652\item[\var{horizon\_line\_color}] (optional) see \ref{sec:landscapes:Polygonal}
653\item[\var{minimal\_brightness}] (optional)  see \ref{sec:landscapes:Polygonal}
654\item[\var{minimal\_altitude}] (optional) see \ref{sec:landscapes:Polygonal}
655\end{description}
656
657
658\subsection{Description}
659\label{sec:landscapes:Description}
660
661The short \var{description} entry in \file{landscape.ini} will be
662replaced by the contents of an optional file
663\file{description.<LANG>.utf8}. \file{<LANG>} is the ISO~639-1
664language code, or its extension which contains language and country
665code, like \file{pt\_BR} for Brazilian Portuguese. The long
666description requires the file \file{description.en.utf8}, this is
667\texttt{en=english} text with optional HTML tags for sections, tables,
668etc. You can also have embedded images in the HTML (Views of sacred
669landscapes, other informative images, \ldots?), just make them PNG
670format please. The length of the description texts is not limited, you
671have room for a good description, links to external resources,
672whatever seems suitable.
673
674If you can provide other languages supported by Stellarium, you can
675provide translations yourself, else Stellarium translators \emph{may}
676translate the English version for you. (It may take years though.) The file
677ending \file{.utf8} indicates that for special characters like ÄÖÜßáé
678you should use UTF8 encoding. If you write only English/ASCII, this may not
679be relevant.
680
681
682
683\subsection{Gazetteer}
684\label{sec:landscapes:Gazetteer}
685
686\newFeature{0.14}
687An optional feature for landscapes is a gazetteer function, i.e., labels for
688landscape features. The \landscape{Grossmugl} landscape demonstrates
689an example and should be self-explanatory. This is again multilingual,
690so the files are called \file{gazetteer.<LANG>.utf8}.
691
692\begin{configfileScr}
693# demo gazetteer for Grossmugl landscape.
694# Can be used to better describe the landscape,
695# i.e. show labels on landscape features.
696# Fields must be separated by vertical line,
697# label must not have such a vertical line.
698# Comments have this hash mark in first column.
699# coordinates in degrees from true North.
700# line towards zenith draws a single line strictly upward.
701# label is centered on line endpoint.
702# Azimuth | Altitude | degrees        | azimuth | label
703#         |          | towards zenith |  shift  |
704113.66    | 5.5      |     4          |   -6    | Leeberg
70535        | 1.5      |     2.5        |    0    | Grossmugl
706335       | 2        |     2          |    0    | Steinabrunn
707305       | 2        |     1          |    0    | Ringendorf
708180       | 2        |     2          |    0    | Vienna (30km)
709135       | 2        |     0.5        |    0    | Wind power plant Strasshof
710\end{configfileScr}
711
712\subsection{Packing and Publishing}
713\label{sec:landscapes:Packing}
714
715You likely have developed your landscape already in your own Stellarium user data directory, but when you are happy with your work,
716you may consider sharing it with other users.
717For easy distribution and installation via Stellarium's GUI (see section~\ref{sec:gui:view:landscape}), you should create a ZIP file.
718This must contain \file{landscape.ini} and any textures and auxiliary files described above (\file{description.en.utf8}, \file{gazetteer.en.utf8}
719and their translations, horizon files, images for the description  \ldots) used by your landscape.
720If you want to release the landscape for download, consider adding a \file{README.txt} clarifying license and usage conditions.
721It does not matter whether the ZIP file contains a directory name inside the ZIP. If not, the directory name (ID) of the
722landscape will be taken from the ZIP file name.
723
724%\newpage
725
726\section{Creating Panorama Photographs for Stellarium}
727\label{sec:landscapes:PanoramaPhotography}
728
729\subsection{Panorama Photography}
730\label{sec:landscapes:PanoramaPhotography:Photography}
731
732Traditional film-based panorama photography required dedicated cameras with curved
733film holders and specialized lenses
734(Figure~\ref{fig:landscapes:panoCam}).
735
736
737\begin{figure}[bp]
738  \centering
739 \includegraphics[width=9cm]{Horizon202.jpg}
740 \caption{Zenit ``Horizon 202'' panorama camera with rotating lens for
741   35mm film. \footnotesize{(Source: Wikipedia, ``Horizon202'' by
742     BillC - Own Work. Licensed under CC BY-SA 3.0 via Wikimedia Commons -
743     \protect\url{https://commons.wikimedia.org/wiki/File:Horizon202.jpg})}}
744  \label{fig:landscapes:panoCam}
745\end{figure}
746
747
748
749\begin{figure}[tbp]
750  \centering
751  \includegraphics[width=7cm]{Rodeon_vr_head_01.jpg}
752  \caption{Automated panorama head. \footnotesize{(Source: Wikipedia \protect\url{https://commons.wikimedia.org/wiki/File:Rodeon_vr_head_01.jpg})}}
753  \label{fig:landscapes:panoHead}
754\end{figure}
755
756
757Digital photography has brought a revolution also in this field, and it has
758become quite easy to create panoramas simply by taking a series of
759photographs with a regular camera on the same spot and combining them
760with dedicated software.
761
762A complete panorama photo visually encloses the observer like the
763mental image that astronomers have been using for millennia: the
764celestial sphere. If we want to document the view, say, in a big hall
765like a church, optimal results will be gained with a camera on a
766tripod with a specialized panorama head (Figure~\ref{fig:landscapes:panoHead}) which assures the camera
767rotates around the \emph{entrance pupil}\footnote{In many references
768  you will find ``Nodal Point'' mentioned here. But see these:
769  \url{https://en.wikipedia.org/wiki/Cardinal_point_\%28optics\%29\#Nodal_points},
770  \url{http://web.archive.org/web/20060513074042/http://doug.kerr.home.att.net/pumpkin/Pivot_Point.pdf},
771  \url{http://www.janrik.net/PanoPostings/NoParallaxPoint/TheoryOfTheNoParallaxPoint.pdf}
772} of the lens in order to avoid errors by the parallax shift observed
773on photographs taken on adjacent but separate positions.
774
775
776Often however, both the upper half of the observer's environment (the
777sky) and the ground the photographer is standing on, are regarded of
778lesser importance, and only a series of laterally adjacent photographs
779is taken and combined into a cylindrical or spherical ring that shows
780the landscape horizon, i.e.,  where ground and sky meet. If the
781closest object of interest is farther away that a few metres,
782requirements on parallax avoidance are far less critical, and the author
783has taken lots of landscape panoramas with a camera on the usual
784tripod screw, and even more entirely without a tripod. However, any visible errors
785that are caused by a shifted camera will require more effort in
786postprocessing.
787
788When you have no tripod, note that \emph{you must not rotate the
789  camera on your outstretched arm!} Rather, the camera's entrance
790pupil must be rotated, so you should appear to dance around the
791camera!
792
793The images should match in brightness and white balance. If you can
794shoot in RAW, do so to be able to change white balance later. If the
795camera can only create JPG, ensure you have set the camera to a suitable white balance
796before taking the photos and not to ``auto'', because this may find different settings and
797thus give colour mismatches. Exposure brightness differences can be
798largely removed during stitching, but good, well-exposed original
799shots always give better results.
800
801As a general recommendation, the images of a panorama should be taken
802from left to right, else please accordingly invert some of the
803instructions given below.
804
805There are several panorama making programs. Often they are included in
806the software that comes with a digital camera and allow the creation
807of simple panoramas. Other software titles are available for
808purchase. However, there is one cost-free open-source program
809that does everything we need for our task, and much more:
810
811
812\subsection{Hugin Panorama Software}
813\label{sec:landscapes:Hugin}
814
815\program{Hugin}\footnote{\url{http://hugin.sourceforge.net/}}, named
816after one of the ravens that sits on Odin's shoulder and tells him
817about the world, is a user-friendly catch-all package with graphical
818user interface that allows creating panoramas with a single
819application. Actually, \program{Hugin} is a GUI application which
820calls several specialized sub-programs with fitting parameters.  The
821instructions are based on \program{Hugin V2014.0} and
822\program{2015.0}.
823
824Typically digital images come in JPG format with information about
825camera, lens, and settings stored in invisible metadata in the EXIF
826format. When \program{Hugin} reads such images, it can automatically derive
827focal length, field of view, and exposure differences (exposure time,
828aperture, color balance) to create panoramas as easily as
829possible.
830
831After starting \program{Hugin} for the first time, select \menu{Interface > Expert} to release several
832options not visible to ``beginners''.  In the Preferences dialog
833(\menu{Files > Preferences}), edit number of CPU to match the number of
834cores in your computer and allow parallel processing. E.g., if you
835have an Intel Core-i7, you usually can set up to 8 cores (4 cores with
836hyperthreading; but maybe leave one core for your other tasks while
837you wait for a processing job?).  If your PC is equipped with a
838modern programmable graphics card, you can enable its use in the \menu{Programs} tab
839with activating ``Use GPU for remapping''.
840
841After that, we are ready for creating our panoramas.
842
843
844\subsection{Regular creation of panoramas}
845\label{sec:landscapes:Hugin:regular}
846
847The graphical user interface (GUI) consists of a main menu, symbols, and 4 tabs. We start on the tab Photos.
848\begin{itemize}
849\item \button{Add images\ldots} Opens a file browser. Select the images which you
850  want to stitch. Usually, lens data (focal length, horizontal field of view\footnote{%
851    contrary to Stellarium, field of view (FoV) in \program{Hugin} means the \emph{horizontal} extent in degrees.},
852  \ldots) are read from the EXIF data. If those are not available
853  (e.g. cheap cameras, images scanned from film), you can enter those
854  data on loading or later.  The images are now listed in the file
855  list, and you can edit image parameters by marking one or more, and
856  then choosing from the context menu which you get from pressing the
857  right mouse button. In case you have used different lenses (or
858  inadvertently used different focal lengths of a zoom lens), you can
859  assign separate lenses to the images.
860
861  Caveat: If you have resized the images, or produced copied on your
862  RAW converter with non-native resolution, the horizontal Field of View (FoV) in
863  \program{Hugin} may be misidentified. You must edit lens parameters and fill
864  in the field of view from a full-size image. Else the first round of
865  optimisation will run into unsolvable trouble.
866
867\item Select one image as \emph{position anchor} (usually the center
868  image), and one as \emph{exposure anchor} (this can be the same
869  image). For our purpose, \emph{the anchor image should face
870    south}.
871  %In the concrete example of the Rosenburg data set, the
872  %Rosenburg Castle is our landmark to the south, so any image that has
873  %the castle close to center is a good choice for position anchor.
874\item Next, we must find common feature points. The next field below
875  provides the required settings. It is recommended to use the \program{CPFind}
876  command. To avoid finding control points in (moving) clouds, select
877  setting \button{Hugin's CPFind + Celeste}\footnote{If you forget this,
878    you can remove cloud points by calling \program{Celeste} in the control
879    point editor later}. Then press \button{Create control points}. This
880  opens a dialog box in which you can see output of the selected
881  feature point extractor. It should finish with a box telling you the
882  number of identified points. In rare cases some images cannot be
883  linked to others, you will have to manually add or edit feature
884  points in those cases.
885\item Now it's time to start optimisations. On the \menu{Geometric
886  Optimimisation} combo, start with the button \button{Positions, incremental from
887  anchor}, and press \button{Calculate}. Moments later, a first rough
888  match is available for inspection.
889\item First open the Preview window (press \keys{Ctrl+P} or click the blue icon). Assumed
890  your images cover the full horizon, the window shows an
891  equirectangular area (360 degrees along the horizon and 180 degrees
892  from zenith to nadir). The anchor image should be close to the image
893  center, and the other images should be already well-aligned to both
894  sides. You can set the exact center point by clicking it in the
895  image. If the horizon appears badly warped, use the right mouse key and
896  click on the horizon roughly near $-90$ or $+90$ degrees (halfway to
897  the left or right).
898\item Open the OpenGL preview window (press \keys{Ctrl+Shift+P} or click the blue icon
899  with GL inside). This panel provides several important views:
900  \begin{itemize}
901  \item The \menu{Preview} tab is similar to the non-OpenGL preview. You can
902    display an overlay of the control points, which are colored
903    according to match quality. Also, with button \button{Identify}
904    activated, you see the overlapping image frames when you move the
905    mouse over the image.
906  \item The \menu{Layout} tab helps finding links between images.
907  \item The \menu{Move/Drag} dialog may help to interactively adjust a
908    panorama.
909  \end{itemize}
910  Sometimes the preview image may however be distorted and unusable.
911\item Open the \emph{Control Points Table} dialog (press \key{F3} or click the ``table''
912  button). Here you see the points listed which link two
913  images. Clicking a column label sorts by this column. It is
914  recommended that only neighboring overlapping images should be
915  included here. If you have very large overlap, it is possible that
916  points are found between two images which are not directly
917  adjacent. In the OpenGL preview window, you can use the \menu{Preview} or
918  the \menu{Layout} tabs to identify those image pairs. Such points should be
919  deleted. In the point table, click on columns ``Right Img.'', then
920  ``Left Img.'', and then find pairs like 0/2, 1/3, 2/4 etc. Mark
921  those lines, and delete the points.
922\item To re-run the optimisation, press the double-arrow icon or the
923  \button{calculate} button in the Optimise/Geometric area.
924\end{itemize}
925
926
927\subsubsection{Preliminary Geometric Optimisation}
928\label{sec:landscapes:Optimisation}
929
930
931Now the (usually) longest part begins: Iterative optimisation of the
932photo matchpoints. If your images were taken on a panorama tripod
933head, there should only be very few bad matchpoints, e.g.\ those found
934on persons or clouds\footnote{You should have created control points
935  with the \program{Celeste} option!} which have moved between
936photos. For handheld photos, the following considerations should be
937observed.
938
939The most important line which we want to create in all perfection is the visible
940horizon, where sky and earth meet. The foreground, usually grassy or
941rocky, is of lesser interest, and stitching errors in those areas may
942not even be relevant.
943
944Therefore, matchpoints with large errors in the foreground can be
945safely removed, while, if necessary, points on the horizon should be
946added manually. Use the \menu{Control Points} tab, select adjacent
947images (start with 0 on the left and 1 on the right side), and delete
948the worst-fitting matchpoints closest to the camera (near the bottom
949of the images). We now start a long phase of re-optimizing and
950deletion of ill-matching points as long as those are far from the
951horizon. When all near matchpoints are deleted, the result should
952already look not too bad.
953
954For continued optimisation, the number of parameters to optimize can
955be extended. To begin, I recommend \button{Positions and View (y, p,
956  r, v)}, which may find a new focal length slightly different from
957the data in the EXIF tags. Again, delete further foreground points. If
958after a few rounds you still have bad point distances, try
959\button{Positions and Barrel Distortion (y, p, r, b)} to balance
960distortion by bad optics, or even go up to \button{Everything without
961  translation}.  Optimisation can only reach perfect results if you
962did not move between exposures. Else, find a solution which shows the
963least error.
964
965In case you took your photos not on a tripod and moved too much, you
966may even want to play with the translation options, but errors will be
967increasingly hard to avoid.
968
969\paragraph{Using Straight Edges as Guides}
970If the panorama contains straight lines like vertical edges of
971buildings, these can be used to automatically get a correctly leveled
972horizon: Vertical lines are mapped to vertical lines in
973equirectangular panos! In the \menu{Control Points} tab, select the image
974with the vertical edge in both subframes, and mark points on the
975vertical edge. (switch off auto-estimate!).
976Likewise, horizontal lines may help, but make sure lines like rooves
977are perpendicular to your line of view, else the perspective effect
978causes an inclination.
979
980\paragraph{Multi-ring Panoramas}
981If you are trying to create a panorama with several rings (horizon,
982one or two rings below, and nadir area), you must try to create/keep control
983points that best give a result without visible seams. In this case,
984and esp.\ if you have only used a regular tripod or even dared to go
985for a free-handed panorama, you may observe that it is best to remove
986control points in neighboring photos in the lower rings, but keep only
987the ``vertical'' links between images with similar azimuth.
988
989In total, and if the foreground is not important but only grassy or
990sandy, the rule of thumb is that the horizon images must be strongly
991linked with good quality (small errors), while images in the lower
992rings should be linked mostly to their respective upper photos, but
993not necessarily to the  images to its sides. The resulting panorama will then
994show a good horizon line, while stitching artifacts in a grassy or
995otherwise only decorative ground will usually be acceptable and can,
996if needed, be camouflaged in post-processing.
997
998This optimization and editing of control points is likely a longish
999iterative process, and these are the late night hours where you will
1000finally wish you had used a panorama head\ldots
1001
1002
1003
1004\subsubsection{Masking}
1005\label{sec:landscapes:Masking}
1006
1007If you have images with overlapping areas, you can usually not force
1008\program{Hugin} to take pixels from the image which you find best. you can
1009however mask off an area from an image which you don't want to see in
1010the output under any circumstances, e.g.\ a person's arm or foot in
1011one image. Just open the image in the \menu{Mask} tab and either press
1012\button{Add new mask} and draw the mask polygon covering the unwanted
1013area, or use the crop settings to define rectangular areas to use.
1014
1015\subsubsection{Exposure disbalance}
1016\label{sec:landscapes:Exposure}
1017In the \menu{Photos} tab, select \button{Photometric parameters} on the right
1018side. The EV column lists the \emph{Exposure Value}. If you see disbalance
1019here and in the preview window, you can run a photometric optimization
1020with the lowest button on the \menu{Photos} tab. Simply select Low dynamic
1021range and press \button{Calculate}. The preview should now show a seamless
1022image. If all else fails, you can edit the EV values directly.
1023
1024Advanced photographers may want to correct exposures in their RAW
1025images before creating JPG or TIF images to combine with
1026\program{Hugin}. This unfortunately may create exposure disbalance
1027because the EXIF tags may not be adjusted accordingly, so based on
1028different exposure/f-stop combinations \program{Hugin} may think it
1029has to re-balance the values. In these cases, don't run the
1030photometric optimizer. Some image exposure values have to be changed
1031manually, and the effect supervised in the preview window. Usually the
1032smooth blending in the subprogam \program{enblend} called by
1033\program{Hugin} will hide remaining differences.
1034
1035
1036
1037\subsubsection{Stitching}
1038\label{sec:landscapes:stitching}
1039
1040When you are happy with the panorama in the preview window and the
1041match-points promise a good fit, it is time to finally create the
1042panorama image. \program{Hugin} can create a large number of different
1043projections which all have their application. For Stellarium, we can
1044only use the equirectangular projection. You still have 2 options:
1045
1046\begin{description}
1047\item[spherical] landscapes (see~\ref{sec:landscapes:Spherical}) require single equirectangular images, the
1048  maximum size depends on your graphics hardware and \program{Qt} limitations
1049  and is likely not larger than $8192\times4096$ pixels.
1050\item[old\_style] landscapes (see~\ref{sec:landscapes:oldStyle}) can use several textures for the ring
1051  along the horizon, and one image for the nadir zone. If you need
1052  high resolution, you should aim for creating this one.
1053\end{description}
1054
1055Sometimes, creating the nadir zone is difficult: this is where usually
1056the view is blocked by the tripod, and we are not interested in views
1057of tripod or our own feet. For our purpose it is usually enough to
1058fill in the feet area using the clone stamp, or a monochrome color,
1059or, for \var{old\_style} landscapes, you can instead insert an oriented site
1060map or wind rose.
1061
1062There is a button \button{create optimal size} in \program{Hugin}. It may
1063recommend a panorama width around 13.000 pixels for an average camera
1064and photos taken with a wide-angle lens. Increasing this size will
1065most likely not lead to higher optical resolution!  The panorama width
1066which you can most usefully create depends on the resolution of the
1067source images (which leads to the result given by \program{Hugin}) and on your
1068needs. If you need arc-minute resolution, you would aim for
1069$360\times60=21600$ pixels, which cannot be loaded into graphics
1070memory in a single piece, i.e., is too large for Stellarium, and must
1071be configured as \var{old\_style} landscape. In this case, 10 or 11 tiles of
1072$2048\times2048$ pixels (totalling 20480 or 22528 pixels) is the closest
1073meaningful setting, i.e., you could create an image of 20480 pixels
1074width and cut this into usable pieces. Usually, a size of
1075$4096\times2048$ or $8192\times4096$ pixels (for better computers) is
1076enough, and can be used in a \var{spherical} landscape.
1077
1078We have to edit the file after stitching, therefore select creation of
1079an image in the TIFF format. LZW compression is non-lossy, so use this
1080to keep file size reasonably small.
1081
1082For regular images, it is enough to create ``Exposure corrected, low
1083dynamic range''. If you have a problem with persons that have moved
1084between your images, you may want to post-process the final result
1085with import of the distorted sub-images and manually defining the best
1086blending line. For this, find the ``Remapped Images'' group and again
1087activate ``Exposure corrected, low dynamic range''.
1088
1089Now, press the \button{Stitch!} button in the lower right corner. This
1090opens a helper program which supervises the stitching
1091process. Depending on your computer and size of the image, it will
1092require a few minutes of processing.
1093
1094In case stitching fails with a cryptic error message, try to add the
1095option \option{-\/-fine-mask} to the \program{enblend} options.
1096
1097Store a copy of the \program{Hugin} project file to always be able to
1098go back to the settings you used to create the last panorama. We will
1099get back to it when we want to make a truly calibrated panorama
1100(see~\ref{sec:landscapes:FinalCalibration}).
1101
1102\section{Panorama Postprocessing}
1103\label{sec:landscapes:Postprocessing}
1104
1105The image created has to be further processed to be used in
1106Stellarium. The most obvious change is the need for a transparent sky,
1107which we can easily create in programs like \program{Adobe Photoshop} or the
1108free and open-source \program{GIMP}. I will describe only the free and
1109open-source solution.
1110
1111After that, we have to bring the image into shape for Stellarium,
1112which may include some trimming. While we could also slice an image
1113with interactive tools, higher accuracy and repeatable results can be
1114achieved with command-line programs, which makes the
1115\program{ImageMagick} suite the tool of our choice.
1116
1117
1118
1119\subsection{The GIMP}
1120\label{sec:Gimp}
1121
1122The \program{GIMP} (GNU Image Manipulation Program) has been developed as free
1123alternative to the leading commercial product, \program{Adobe Photoshop}. While
1124it may look a bit different, basic concepts are similar. Not everybody
1125can (or wants to) afford \program{Photoshop}, therefore let's use the \program{GIMP}.
1126
1127
1128Like \program{Photoshop}, the \program{GIMP} is a layer-aware image
1129editor. To understand the concept, it is easiest to imagine you
1130operate on a growing stack of overhead slides. You can put a new
1131transparent slide (``layer'') on top of the stack and paint on this
1132without modifying the lower layers.
1133
1134
1135
1136A few important commands:
1137
1138\begin{description}
1139\item[Zooming] \keys{\ctrl + Mouse Wheel}
1140\item[Layer visibility and transparency] Make sure to have layer
1141  dialog shown (\menu{Windows>Dockable Dialogs}). A gray bar indicates
1142  opacity for the currently active layer. Note the mouse cursor in
1143  this opacity bar (often also called transparency bar): near the top
1144  of the bar the upward pointer immediately sets percentage. A bit
1145  lower the pointer looks different and can be used for fine-tuning.
1146\end{description}
1147
1148
1149The most obvious post-processing need for our panorama is making the sky
1150transparent. The optimal tool usually is the ``Fuzzy Select'', which
1151is equivalent to the ``Magic Wand'' tool in \program{Photoshop}. Simply mark the
1152sky, and then delete it. The checkerboard background indicates
1153transparent pixels.
1154
1155
1156It sometimes helps to put an intensive bright red or blue background layer under the
1157panorama photo to see the last remaining clouds and other specks. In the layer dialog,
1158create a new layer, bucket-fill with blue or red, and drag it in the
1159layer dialog below the pano layer. Write-protect this layer, work on
1160the image layer, and before exporting the image layer with transparent
1161sky to PNG, don't forget to switch off the background.
1162
1163We need this layer functionality especially to align the panorama on a
1164calibration grid, see section~\ref{sec:landscapes:FinalCalibration}.
1165
1166
1167
1168
1169
1170\subsection{ImageMagick}
1171\label{sec:landscapes:ImageMagick}
1172
1173\program{ImageMagick}
1174(\program{IM})\footnote{\url{https://www.imagemagick.org/}} can be
1175described as ``Swiss Army Knife of image manipulation''. It can do
1176most operations usually applied to images in a GUI program, but is
1177called from the command line. This allows also to include \program{IM}
1178in your own command scripts\footnote{These may typically be
1179  \file{.BAT} files on Windows, or various shell scripts on Linux or
1180  Mac.}. We will use it to do our final cut and resize operations. I
1181cannot give an exhaustive tutorial about more than a few of
1182\program{IM}'s functions, but the commands given here should be enough
1183for our purpose.
1184
1185To open a command window (console, a.k.a.\ DOS window), press the
1186Windows key and enter \texttt{cmd}, then press \key{\return}. (On Linux and Mac, you
1187surely know how to open a console window.)
1188
1189There are some  things you might need to know:
1190\begin{itemize}
1191\item The command line is not your enemy, but a way to call expert tools.
1192\item The Windows command line processor \program{cmd.exe} is far from user friendly.
1193\item There are remedies and alternatives. See notes on \program{clink} (\ref{sec:landscapes:clink})
1194  for a considerable improvement, and \program{WSL} (\ref{sec:landscapes:WSL}) for experts.
1195\end{itemize}
1196
1197
1198
1199\subsubsection{Command-line magick for spherical landscapes}
1200\label{sec:landscapes:ImageMagic:spherical}
1201
1202Let's start with the commands for final dressing of an equirectangular
1203panorama to be used as spherical landscape which has been created in
1204size $4096\times2048$, but where you have seen that nothing interesting
1205is in the image above 11.25\degree. This means we can cut away the sky area
1206and compress the image to $4096\times1024$ to save graphics memory.\footnote{Most
1207modern graphics cards no longer require the ``powers of two''
1208image sizes, but we keep this practice to increase compatibility.}
1209% Note that cutting away the top part of the panorama was introduced
1210% for version 0.13, so if you are bound (by old/weak hardware) to
1211% continue using the 0.12 series, you must use the full-size panorama
1212% with transparent sky, and are likely limited to textures of max.\
1213% $2048\times2048$ pixels.
1214
1215To understand the numbers in the example, consider that in a panorama
1216image of $4096\times2048$ pixels, 1024 pixels represent 90°,
1217$512\px=45°$, $256\px=22.5°$, $128\px=11.25°$. To keep a top
1218line of $11.25°$, we keep an image height of $1024+128=1152\px$, but the crop starts at pixel $Y=1024-128=896$.
1219
1220\begin{commands}
1221convert landscape.png -crop 4096x1152+0+896
1222        -resize 4096x1024! landscape_cropped.png
1223\end{commands}
1224%
1225Note the exclamation mark in the \option{-resize} argument, which is required to
1226stretch the image in a non-proportional way.
1227
1228Alternatively, you can operate with \program{IM}'s ``gravity'', which indicates
1229the corner or edge geometric offsets are referred to. Given that we
1230want the lower part of the image to exist completely, you only need to
1231compute the size of the cropped image:
1232
1233\begin{commands}
1234convert landscape.png -gravity SouthWest -crop 4096x1152+0+0
1235        -resize 4096x1024! landscape_cropped.png
1236\end{commands}
1237
1238\noindent You still need the addition \var{+0+0} in the \option{-crop} option,
1239else the image will be cut into several pieces.  In the file
1240\file{landscape.ini}, you then have to set \var{maptex\_top=11.25}.
1241
1242
1243\subsubsection{Command-line magick for old\_style landscapes}
1244\label{sec:landscapes:ImageMagic:oldstyle}
1245
1246
1247Let us assume we want to create a high-resolution landscape from a
1248pano image of width 16384 which we have carefully aligned and
1249calibrated on an oversized grid template that also shows a measured
1250horizon line (see \ref{sec:landscapes:FinalCalibration}). Usually it
1251is not necessary to create the full-size image, but only the horizon
1252range, in this high resolution. Assume this image has been aligned and
1253justified on our grid image and is \var{HEIGHT} pixels high, the left
1254border is at pixel \var{X\_LEFT}, and top border (i.e., the point
1255where relevant content like the highest tree is visible) is on pixel
1256\var{Y\_TOP}. Assume our graphics card is a bit oldish or you aim for
1257maximum compatibility, so we can load only textures of at most 2048
1258pixels in size. Given that the horizon area usually only covers a few
1259degrees, a vertical extent of $2048\px$ seem a pretty good range for
1260that most interesting zone. The ground can then be filled with some
1261low-resolution image of grass, soil, or a properly oriented site map,
1262or you can use \program{Hugin} to create a ground image (and using the
1263maximum of $2048\times2048$ also here usually is far more than
1264enough).
1265
1266In \program{GIMP} (or \program{Photoshop}, \ldots), we must find the values for
1267\var{X\_LEFT}, \var{Y\_TOP} and \var{HEIGHT}. \var{HEIGHT} is being
1268resized to 2048, strictly, by the exclamation mark in the resize
1269command.  We can create our image tiles now with this singular beast
1270of a command line (write all in 1 line!), which puts our files directly into
1271\file{STELLARIUM\_LANDSCAPEPATH/LANDSCAPE\_NAME}:
1272
1273\begin{commands}
1274 convert PANO.png  -crop 16384xHEIGHT+X_LEFT+Y_TOP +repage
1275      -resize 16384x2048!
1276      -type TrueColorMatte -depth 8
1277      -crop 2048x2048 +repage
1278       png:STELLARIUM_LANDSCAPEPATH/LANDSCAPE_NAME/Horiz-%d.png
1279\end{commands}
1280%
1281This creates 8 images. See section~\ref{sec:landscapes:oldStyle} for
1282the \file{landscape.ini} where these images can be referenced. Don't
1283forget to read off top and bottom lines (altitudes in degrees) from
1284your grid, the vertical extent will form the \var{decor\_alt\_angle}, and
1285the bottom line the \var{decor\_angle\_shift} entries in this file.
1286
1287\paragraph{Creating a ground image for old\_style landscapes}
1288When you want a good ground image for an \var{old\_style} landscape
1289from your panorama and not just fill the \var{groundtex} with
1290a monochrome texture or a map, you have to create a ground view in
1291\program{Hugin}. But you may have already created a huge pano! This
1292can also be used as source image, and a ground shot can be extracted
1293with a reversed operation. In principle, all you need to know is the
1294field of view around the
1295nadir. Figure~\ref{fig:landscape:oldStyle:ground_pto} shows a simple
1296configuration file.
1297
1298\begin{figure}[ht]
1299  \centering
1300\begin{configfile}
1301# hugin project file
1302#hugin_ptoversion 2
1303p f0 w2048 h2048 v92 E0 R0 n"TIFF_m c:LZW r:CROP"
1304m g1 i0 f0 m2 p0.00784314
1305
1306# image lines
1307#-hugin  cropFactor=1
1308i w16384 h8192 f4 v360 Ra0 Rb0 Rc0 Rd0 Re0 Eev0 Er1 Eb1 r0
1309  p90 y0 TrX0 TrY0 TrZ0 Tpy0 Tpp0 j0 a0 b0 c0 d0 e0 g0 t0
1310  Va1 Vb0 Vc0 Vd0 Vx0 Vy0  Vm5 n"Eqirect_Pano360.png"
1311\end{configfile}
1312\caption{Project file \file{ground.pto} usable to create the ground image with
1313  \program{Hugin} or, on the command line, its \program{nona}
1314  stitcher. The last line, starting with \texttt{i}, has been wrapped,
1315  but must be 1 line.}
1316  \label{fig:landscape:oldStyle:ground_pto}
1317\end{figure}
1318
1319
1320Say, the side panels extend down to \var{decor\_angle\_shift=-44}
1321degrees, which means you must close the ground with a Nadir
1322$FoV=2\times(90-44)=92$. For maximum compatibility, we will again make
1323an image of width and height both 2048\px. These values can be found
1324in the \texttt{p} line in
1325Figure~\ref{fig:landscape:oldStyle:ground_pto}.  The \texttt{i} line
1326describes the input image, which is our full equirectangular pano of
1327width \texttt{w}$=16384$ and height \texttt{h}$=8192$. The last
1328argument of that line is the image file name.
1329
1330For processing, we do not use the \program{Hugin} GUI, but simply the
1331command line. The actual program to call is \program{nona}.  If your
1332stitched panorama is a 16-bit TIFF, \program{nona} will also make a
133316-bit image, but our textures are limited to 8-bit PNGs. We apply our
1334most useful tool, \program{convert} from the \program{ImageMagick}
1335suite.
1336
1337\begin{commands}
1338nona -v -m PNG  ground.pto -o ground.png
1339convert ground.png -depth 8 ground_8bit.png
1340\end{commands}
1341
1342The file \file{ground\_8bit.png} is then used in the \var{groundtex}
1343field on \file{landscape.ini}.
1344
1345
1346\subsection{Final Calibration}
1347\label{sec:landscapes:FinalCalibration}
1348
1349The creation of a \emph{calibrated panorama} (which can be regarded as
1350dependable proxy for further measurements taken inside Stellarium)
1351requires reference measurements to match the photos against. We must
1352take azimuth/altitude measurements with a theodolite or total station,
1353in the optimal case along the full horizon, and in addition I
1354recommend to take azimuth and altitudes of some distinct features along
1355the horizon which must also be visible in the photographs: mountain
1356summits, electrical towers, church towers, \ldots
1357
1358I recommend you create grid templates of the sizes you are going to
1359create, e.g. 4096, 8192, 16386 and 20480 pixels wide with some diagram
1360tool. On these, you can then also draw the measured horizon line.
1361
1362Now, load a panorama on top of this in the \program{GIMP}, i.e., copy it
1363into a separate layer over the grid image, and set it
1364semi-transparent.
1365
1366Try to align the center of the image (where the
1367geometric anchor has been defined; remember: this should be the
1368image pointing south!) with the measured horizon line or the distinct features.
1369
1370The optimal solution consists of a photo panorama which aligns
1371perfectly with the measured line and features. We now have to
1372iteratively bring deviations to a minimum. The process depends on
1373processor speed, image size, your training  and -- most
1374of all -- your requirements in accuracy!
1375
1376
1377In the \program{GIMP}, load your grid image with horizon line.  Now
1378select \menu{File> Open as Layers\ldots}, load your photo panorama,
1379and then set layer transparency in the \menu{Layers} dialog to about
138050\%.
1381
1382Select the double-arrow tool to move the panorama via mouse drag and
1383cursor keys over the grid, and align the outline of the photo
1384horizon's southern point with the measured line. Now it's time to
1385estimate the quality of the panorama.
1386
1387In \program{Hugin}'s \menu{Photos} tab, select the \menu{Positions} view on
1388the right side. Now you see ``Yaw'', ``Pitch'' and ``Roll'' values of
1389camera-to-world orientation listed in the photos list. It should now
1390be possible, by changing the values \emph{only for the anchor image}
1391and re-optimizing, to come to a panorama with only minimal error. In
1392the process, start with Optimizing \menu{Positions> incremental from
1393  anchor}, then go for view and barrel optimization, and so on. Always
1394try to remove foreground match points which have large error and are irrelevant
1395for the task to match the horizon. Those are especially cross-matches
1396of horizon and sub-horizon rows of images. Only vertically and
1397horizontally adjacent images should be required to match. For handheld
1398panoramas, also links between adjacent images in the non-horizontal rows are usually
1399too erroneous to be useful, just remove these match points. Use the
1400\menu{Layout} tab in the Fast Panorama Preview to see the relations
1401between images (Fig.~\ref{fig:FastPanoPreview}): Red lines have big
1402errors, green lines are good, thin gray lines indicate possible
1403overlap without specified match points. After each optimization step,
1404export a new pano image, load as layer in \program{GIMP}, and check
1405again.
1406
1407\begin{figure}[tb]
1408  \centering
1409    \includegraphics[width=\textwidth]{FastPreview.png}
1410    \caption{\program{Hugin}'s Fast Panorama Preview can be used to check which
1411      images are connected to its neighbors. Most important are good
1412      matches along the horizon, the images in the lower rows are
1413      clearly less important. If captured on a tripod, they should
1414      still match. }
1415  \label{fig:FastPanoPreview}
1416\end{figure}
1417
1418
1419\noindent
1420\colorbox{light-gray}{\fbox{\parbox[t]{0.975\linewidth}{
1421Basic rules to observe (use obvious inverses).
1422%%%%%%%%%%%%%%%%%%%%%%%%%% DOUBLE-CHECK AGAIN!!!
1423\begin{itemize}
1424\item If image aligns well in azimuth but overshoots the grid to the
1425  right: Increase yaw accordingly (0.022°/pixel if image is 16384 pixels wide).
1426\item If the north end (left and right borders) is higher than the
1427  southern contact point: Increase pitch angle.
1428\item If north and south points are OK, but the western (right) half is
1429  higher than the eastern (left) half: Increase Roll angle.
1430\end{itemize}
1431The corrections required for pitch and roll may be surprisingly small!
1432}}}
1433
1434
1435
1436
1437Within a few rounds of adjustments, panorama creation, adding as layer
1438in the image editor, and comparing to the reference data, you should
1439achieve a match to fit your needs.
1440
1441In case you have taken photographs in several rings but without a panorama tripod, you may have to
1442first align only the horizontal images (deselect the lower images to
1443exclude from optimization), and when the horizon ring is aligned
1444perfectly, deactivate further optimization in \program{Hugin} for those photos
1445while ``attaching'' (optimizing) the lower photos. In \program{Hugin}'s \menu{Photos} tab,
1446select \menu{Optimize> Geometric> Custom Parameters}. This opens an
1447extra tab \menu{Optimizer}, where you can fine-tune your needs: Switch
1448off all variables for the photos in the horizon ring, and make sure
1449the lower photos fit in the preview after optimization.
1450
1451It may even help to define that the lower rows have been taken with a
1452different Lens, so the field of view and distortion settings of the
1453horizon row will be used as it had been found during the horizon-only
1454match.
1455
1456By now you should have
1457enough experience what level of error may be acceptable for you.
1458
1459
1460\subsection{Artificial Panoramas}
1461\label{sec:landscapes:Artificial}
1462
1463I have created a
1464website\footnote{\url{https://homepage.univie.ac.at/Georg.Zotti/php/panoCam.php}} where
1465you can enter geographical coordinates and download a file
1466\file{pano.kml}  which helps with image creation from \program{Google Earth}
1467imagery. Store this file for a site, let us call it
1468\landscape{MYPLACE}, into a new directory \file{GE\_MYPLACE} inside
1469your \file{landscapes} directory.
1470
1471Store all scenes visible from the respective viewpoint
1472\landscape{MYPLACE} as picture into one common folder in your
1473\file{landscapes/GE\_MYPLACE} under the viewpoint name, e.g.,
1474\file{75-30.jpg}, which means 75 degrees from Nadir, azimuth 30
1475degrees.  Also, double-click the pano entry or the marker in \program{Google Earth} to open a window with the
1476basic content of your \file{landscape.ini}. Copy and paste from there
1477into a new file \file{landscape.ini} and adjust the obvious
1478entries. Complete as required with the entries described in
1479section~\ref{sec:landscapes:Spherical}.
1480
1481On loading of the images, Hugin will not be able to detect any EXIF
1482lens data and ask you for the horizontal field of view. Enter 60
1483degrees, which is the standard value for \program{Google Earth}
1484screenshots\footnote{Note that if you work with \program{Google Earth Pro}, you
1485  can create different FoV!}.
1486
1487The viewpoint names translate almost directly to the yaw and pitch
1488angles which you can enter in the image list in \program{Hugin}'s
1489\menu{Photos} tab. For example, switch to the \menu{Positions} display
1490on the right window edge in the \menu{Photo} tab, mark all images that
1491start with \file{25-} and assign a pitch angle of
1492$-90+\mathbf{25}=-65$. The second part of the names is directly the
1493azimuth.  In this case, don't run the optimizer, but you can
1494immediately set an output resolution and stitch
1495(see~\ref{sec:landscapes:stitching}). To get rid of the image
1496decorations (compass etc), apply masks\footnote{There is a wide
1497  overlap in the images to allow generous trimming.}. Post-processing
1498steps are the same as for photo-panoramas: make sky invisible, crop,
1499etc.
1500
1501It is also interesting to switch on the 3D buildings layer before
1502creating the images. If temples or other buildings are accurate, this
1503will give an even closer approximation to what would be visible
1504on-site. Note however that not every building will be modelled in
1505usable quality, and that usually vegetation is not included in the 3D
1506buildings layer. Also, if you are too close to buildings, they may be
1507cut away by the \emph{near clipping plane} of the rendering.
1508
1509These images, based on \program{Google Earth} imagery and the SRTM
1510topographic model, seem usable as \emph{first rough approximation} to
1511a photo-based or surveyed panorama. Note that it is definitely not
1512accurate enough for representing nearby horizon features or critically
1513important mountain peaks, and please note that Google has image
1514copyright which at least requires you to acknowledge when displaying
1515these pictures.
1516
1517\subsection{Nightscape Layer}
1518\label{sec:landscapes:landscapes:Nightscape}
1519
1520Since version 0.13, Stellarium can simulate artificial illumination,
1521like streetlamps, bright windows, or the skyglow over cities
1522\citep{Zotti-Wuchterl:SEAC2014}. One way to
1523create this layer is to make 2 panorama series during the day and night
1524and process these in the same \program{Hugin} project to align those photos,
1525and then stitch two separate images by selecting either the daylight or the
1526nighttime shots. The night panorama has to be processed to remove
1527stars, airplanes, etc.
1528
1529The other way is a simple layer overpainted in the image processing
1530program. As rough recommendation, use several layers to prepare this
1531feature:
1532\begin{itemize}
1533\item Put a semitransparent black layer over your daylight image, this
1534  helps you to place your painted pixels.
1535\item Paint windows, street lamps, signs, \ldots. You may apply a
1536  layer style to produce some glow.
1537\item To draw an impression of more light in the atmosphere (city
1538  skyglow), use a gradient with some brownish color. Generally the
1539  color depends on the appropriate mix of city lights (sodium, mercury
1540  vapour, etc.). Note that on the city outskirts a simple vertical
1541  gradient will not work, towards the city the horizon is much
1542  brighter. Use a huge but weak brush to make a more spotty sky.
1543\item Use the existing landscape as template for the layer mask for
1544  this gradient sky layer. (You want to hide skyglow by leaves in the
1545  foreground!)
1546\item If you want to add only a few lights to an \file{old\_style}
1547  landscape, you need to provide only the panels showing those
1548  lights. Just load a side panel for reference, place a new layer on
1549  top, and paint the lights on windows, lamps etc. There is no light
1550  option for the ground texture. This makes \file{old\_style}
1551  landscapes best suited for localized light pollution, not city
1552  skyglow.
1553\end{itemize}
1554
1555The resulting image is then declared in the \var{maptex\_illum} line
1556of \file{landscape.ini}. Try also to balance the global strength of
1557light pollution with the \var{light\_pollution} key, and a probable
1558minimal brightness with the \var{minimal\_brightness} key.
1559
1560Try to match the visual appearance, not necessarily what photographs
1561may have recorded. E.g., the \landscape{Grossmugl} sky shows horizon
1562glow mostly towards the city of Vienna, where long-time exposures may
1563already be saturated.
1564
1565The possibilities seem limited only by your time and skills!
1566
1567\section{Troubleshooting}
1568\label{sec:landscapes:Troubleshooting}
1569
1570If something does not work as described and Stellarium does not show
1571your landscape as expected but maybe just a bright magenta-colored
1572box, don't panic.  Double and triple-check the entries in
1573\file{landscape.ini}. \newFeature{0.20.2} Make sure the texture is in
1574PNG format and the file name is correct. Check the logfile for error
1575messages. If the image is too large, it will be re-scaled on loading,
1576but it is more efficient to keep images as small as required. Only few
1577systems can use textures larger than $16384\times16384$~Pixels. If you
1578need high resolution, use the \texttt{old\_style} type (see section
1579\ref{sec:landscapes:oldStyle}).
1580
1581\section{Other recommended software}
1582\label{sec:landscapes:otherSoftware}
1583
1584Here is a short collection of other useful programs for (panorama)
1585image manipulation and other tasks on Windows.
1586
1587
1588\subsection{IrfanView}
1589\label{sec:landscapes:IrfanView}
1590
1591\program{IrfanView} is a free image viewer for Windows with many
1592options. It can show almost any image format, including several camera
1593RAW formats, in windowed and full-screen mode. It is definitely
1594preferable over any image viewer built into Windows. Unfortunately
1595however, it has no panorama viewer function!
1596
1597\subsection{FSPViewer}
1598\label{sec:landscapes:FSPViewer}
1599
1600\program{FSPViewer}\footnote{Further details are available on its home
1601  page \url{http://www.fsoft.it/FSPViewer/}.} by Fulvio
1602Senore is an excellent panorama viewer for equirectanglar
1603images. Images centered along the horizon can be viewed directly,
1604while settings for images with different minimum and maximum angles,
1605as well as ``hotspots'' (similar to hyperlinks) which move to
1606neighboring panoramas, can be configured in an \file{.FSV} text file
1607like figure~\ref{fig:FSPexample}.
1608
1609
1610\begin{figure}[h]\centering
1611\begin{configfile}
1612ImageName=Horizon_Rosenburg.jpg
1613WindowTitle=Horizon_Rosenburg
1614hFov=70
1615#Formula: HP=100*(h/2-upper)/(lower-upper) in Hugin crop, or
1616#         HP=100*zeroRow/imgHeight
1617HorizonPosition=33.8
1618\end{configfile}
1619\caption{FSP configuration file (example)}
1620\label{fig:FSPexample}
1621\end{figure}
1622
1623\subsection{Clink and GNUWin32}
1624\label{sec:landscapes:clink}
1625
1626\program{Clink}\footnote{\url{http://mridgers.github.io/clink/}} is a command
1627line enhancement for Windows developed by Martin Ridgers. If you have
1628ever worked under a Linux \program{bash}-like command line, you will
1629easily feel that Windows' \program{cmd.exe} is extremely limited. \program{Clink}
1630provides several useful features, most notably a really usable
1631command-line completion. It is not essential for our tasks, but a
1632general improvement of usability of the Windows command line which
1633else has not caused me any trouble.
1634
1635Compared to Linux, the command line of Windows can still be a humbling
1636experience. None of the wonderful helpers taken for granted on Linux
1637are available.  Many of the nice tools known and taken for granted by
1638Linux users (\program{make}, \program{sed}, \program{awk} etc.) have
1639also been made available as standalone commands for Windows. If you
1640don't need the inline scripting capabilities in \file{Makefile}s which
1641you would get from a more complete Linux installation but just want to
1642call \program{awk} or \program{sed} inside your \program{.BAT}
1643scripts, maybe this is enough.
1644
1645\subsection{WSL -- Windows Subsystem for Linux}
1646\label{sec:landscapes:WSL}
1647
1648Finally, the 64-bit editions of Windows~10 come with an optional
1649feature that allows you to install a complete Linux distribution like
1650Ubuntu inside your Windows system. Combined with an X11 server like
1651XMing\footnote{\url{https://sourceforge.net/projects/xming/}}, you can
1652even run graphic applications like Stellarium, and all the
1653command-line tools are available.
1654
1655
1656%%% Local Variables:
1657%%% mode: latex
1658%%% TeX-master: "guide"
1659%%% End:
1660
1661