1<html>
2
3<head>
4  <title>
5    Fracplanet user manual
6  </title>
7  <meta name="keywords" content="Fracplanet, user documentation, user manual"/>
8  <meta name="description" content="Fracplanet user documentation"/>
9  <link rel="stylesheet" title="Default styles" type="text/css" href="fracplanet.css" media="screen,print"/>
10</head>
11
12<body>
13
14<h1>
15  Fracplanet user manual
16</h1>
17
18<h2>Introduction</h2>
19
20<p>
21  Fracplanet is an application to generate simple random planets and terrain
22  with oceans, mountains, icecaps and rivers.
23  Parameters are specified interactively and the results displayed using OpenGL.
24  The generated objects can be exported in formats directly usable by POV-Ray or Blender,
25  or as more generally useful texture images.
26</p>
27
28<h2>Command line arguments</h2>
29
30<p>
31  Some command line arguments (not listed here) are intercepted and interpreted by Qt.
32  These are pretty much what you'd expect most X11 applications to handle
33  e.g <code>-geometry <em>X</em>x<em>Y</em></code>.
34  Fracplanet's own command line arguments are:
35</p>
36
37<dl>
38  <dt>--help, -h</dt>
39  <dd>
40    Display a list of recognised arguments.
41  </dd>
42  <dt>--verbose, -v</dt>
43  <dd>
44    Output information about fracplanet execution (and OpenGL) to stderr.
45  </dd>
46  <dt>--display-list, -d</dt>
47  <dd>
48    Start up the application with rendering in display list mode by default
49    (c.f immediate mode).
50    This is particularly useful when the application is running remotely as the
51    generated meshes are then only sent to the local OpenGL display hardware once.
52  </dd>
53  <dt>--invert-mouse-y, -y</dt>
54  <dd>
55    Start application with mouse in non-joystick mode for flight.
56  </dd>
57  <dt>--wireframe, -w</dt>
58  <dd>
59    Start application with rendering set to wireframe mode.
60  </dd>
61</dl>
62
63<h2>GUI</h2>
64
65<p>
66  The main part of the fracplanet GUI is a tabbed control.
67  The terrain generated is shown in a separate window (which disappears while regenerating).
68  A progress dialog is generally displayed while generating terrain (except during application startup).
69</p>
70
71<h3>Create tab</h3>
72
73<p>
74  Note that none of the parameters adjustable on this tab have any effect on the displayed model until one of
75  the &quot;Regenerate&quot; buttons is pressed.  This tab is further subdivided into sub-tabs
76  (&quot;Terrain&quot;, &quot;Snow&quot;, &quot;Rivers&quot;, &quot;Colours&quot;, &quot;Clouds&quot;).
77</p>
78
79<h4>Terrain</h4>
80
81<p>
82  This tab is actually even further subdivided
83  (&quot;Basics&quot;, &quot;Subdivision&quot; and &quot;Noise&quot; tabs),
84  but the list below doesn't distinguish.
85</p>
86
87<dl>
88  <dt>Starting geometry: Generate...</dt>
89  <dd>
90    A pull-down menu (or &quot;combo-box&quot;) selects the initial geometry which will be &quot;fractalized&quot;.
91    Planet creates planets by subdividing an icosahedron.
92    The other terrain area type create planar terrain areas by subdividing one or more triangles.
93    Note that the square type doesn't produce very good results because the triangles it uses aren't equilateral.
94  </dd>
95  <dt>Base land height</dt>
96  <dd>
97    This expresses the initial height of the terrain (relative to the sea level) as a percentage of the vertical maximum perturbation size.
98    Negative values produce (on average) more ocean than land, positive values produce more land than ocean.
99  </dd>
100  <dt>Terrain random seed</dt>
101  <dd>
102    Specifies the random number generator seed used when creating terrain.
103    Regenerating without changing this value will produce the same terrain, allowing the user to play with subdivision levels, colours etc while still retaining the same basic pattern of oceans and continents.
104    The value is initially set to the system time on application start-up.
105  </dd>
106  <dt>Power law</dt>
107  <dd>
108    A power law applied to all above-sea-level heights after terrain generation.
109    (This consists of normalising the height relative to the maximum height in the terrain model and raising it to the power of this number divided by 100).
110    Values above 100 flatten low terrain, tending to produce smooth plains surrounding spiky mountains.
111    Values below 100 flatten high terrain, tending to produce smooth highlands surrounded by steep cliffs.
112  </dd>
113  <dt>Subdivisions</dt>
114  <dd>
115    The number of subdivisions of the initial structure.
116    Each successive level of subdivision increases the number of triangles by a factor of four, so users should increase this parameter with caution.
117    This has a major impact on the amount of memory consumed, the frame rate and the responsiveness of the application.
118  </dd>
119  <dt>Unperturbed subdivisions</dt>
120  <dd>
121    Specifies the number of the subdivisions which will be performed <em>without</em> random perturbation of the vertices.
122    Lower numbers (0, 1) produce a few large continents.
123    Higher values produce many small islands.
124  </dd>
125  <dt>Vertical perturbation</dt>
126  <dd>
127    Specifies the maximum size of vertical perturbations at the first level of subdivision.
128    The maximum perturbation size is then halved at each subsequent subdivision.
129    Planets and terrain areas both have a nominal radius of 1.0,
130    and the number here is divided by 100 so if you specify a vertical variation of 12 you could get mountains which are on the order of 12 percent of the planet's radius high, or larger if subsequent perturbations accumulate upwards at a point (of course suppressing initial large perturbations using the &quot;Unperturbed&quot; parameter will tend to reduce this).
131    This is of course a ridiculous height for mountains on anything but an asteroid, but using realistic values will just produce very boring looking planets.
132  </dd>
133  <dt>Horizontal perturbation</dt>
134  <dd>
135    Specifies the maximum size of horizontal perturbations at the first level of subdivision.
136    The maximum perturbation size is then halved at each subsequent subdivision.
137    Beware of making this value too large as it can produce overhanging/self-intersecting terrain,
138    on the other hand small values can be useful for breaking up obvious artifacts of the initial geometry.
139  </dd>
140  <dt>Noise terms</dt>
141  <dd>
142    Number of terms in a Perlin noise function added to the terrain heights.
143    Each subsequent term doubles the frequency.
144    The best way to get an appreciation of the qualitative differences between Perlin noise and
145    subdivision-perturbation is to reduce &quot;Vertical perturbation&quot; (on the &quot;Subdivision&quot; tab)
146    to zero and increase the number of noise terms.
147  </dd>
148  <dt>Noise frequency<dt>
149  <dd>
150    Frequency of 1st noise term.
151    100 gives a scale on the order of the terrain radius.
152    Subsequent terms double the frequency (and therefore halve their length scale).
153  </dd>
154  <dt>Noise amplitude<dt>
155  <dd>
156    Amplitude of 1st noise term, as a percentage of the nominal object radius.
157  </dd>
158  <dt>Noise amplitude decay rate<dt>
159  <dd>
160    The amplitude of subsequent noise terms decays to this percentage of the amplitude of the previous term.
161    Fifty percent does the classic fractal thing of scaling perturbation size with length scale.
162    Increasing it slightly (to e.g sixty percent) has the interesting effect of making rivers meander more
163    as small-scale variations now have a bigger effect on local gradients than large scale features.
164  </dd>
165</dl>
166
167<h4>Snow</h4>
168
169<dl>
170  <dt>Snowline at equator</dt>
171  <dd>
172    The nominal height of the snowline at the equator of a planet (and everywhere on a flat-based terrain area),
173    expressed as a percentage of the maximum height of the terrain.
174  </dd>
175  <dt>Snowline at pole</dt>
176  <dd>
177    The nominal height of the snowline at the poles of a planet (unused for a flat-based terrain area),
178    expressed as a percentage of the maximum height of the terrain.
179  </dd>
180  <dt>Snowline power law</dt>
181  <dd>
182    Tweaking this parameter lets you control whether the snowline remains high up and only plunges
183    downward towards the poles, or whether it only quickly rises near the equator.
184    Experiment, it has a fairly subtle effect.
185  </dd>
186  <dt>Snowline slope suppression</dt>
187  <dd>
188    The larger this value is, the harder it is for snow to stick to steep slopes
189    (you can see this effect for real on any mountain range).
190    This breaks up the snowline quite nicely, as it otherwise tends to stop at
191    an artificially uniform height (reduce this parameter to zero to see what I mean).
192  </dd>
193  <dt>Snowline glacier effect</dt>
194  <dd>
195    If this parameter is positive, rivers tend to form glaciers and you
196    will see e.g white lines running out of snowy areas, and frozen lakes.
197    If this parameter is negative rivers find it harder to freeze and
198    you will see them running through snowy areas and forming un-frozen lakes.
199  </dd>
200</dl>
201
202<h4>Rivers</h4>
203
204<dl>
205  <dt>Rivers</dt>
206  <dd>
207    Specifies the number of rivers to be generated.
208    Note that rivers starting in the sea are immediately abandoned, but still count against this number
209    (this is so the relative proportions of land/ocean can be tweaked without affecting the river source density).
210    Rivers run from vertex to vertex along triangle edges, and are then rendered by blending from the
211    river vertex colour to the surrounding terrain colour.
212    This isn't ideal as they aren't very sharply defined.
213    A previous version of the software flowed rivers from triangle to triangle
214    which produced nice solid edged rivers (like the oceans are)
215    but since they weren't flat it wasn't ideal either.
216  </dd>
217  <dt>Rivers seed</dt>
218  <dd>
219    Random number seed for river generation.
220    If you change this, but not the perturbation seed, you can get a different river network on the same terrain.
221  </dd>
222  <dt>Lake becomes sea</dt>
223  <dd>
224    As a river is flowed across a terrain, it will sometimes form a lake as the water
225    level rises sufficiently to overcome a terrain barrier.
226    If the lake becomes sufficiently large (greater than the percentage of available surface area specified here)
227    then it is considered to have become an inland sea and it is no longer necessary for the lake to rise until
228    an outflow to be discovered (in the real world, surface evaporation replaces the outflow).
229    Increasing this number may result in larger lakes, but the process of river generation can
230    take considerably longer.
231  </dd>
232</dl>
233
234<h4>Colours</h4>
235
236<dl>
237  <dt>Change colours</dt>
238  <dd>
239    Click on these buttons to bring up a colour-picking dialog and change the colour for the selected class of terrain.
240    Each button displays the colour currently selected for that class.
241    Obvious things you might want to do are to change the shoreline colour to
242    the same colour as the low level terrain (those beaches are pretty absurdly <em>wide</em> otherwise),
243    change the orange highlands to a more mountainous grey, or perhaps you preferred
244    an apocalyptic &quot;lava world&quot; with red rivers and oceans (use emission to make them glow),
245    black shorelines and ash-grey terrain.
246  </dd>
247  <dt>Oceans and rivers emissive</dt>
248  <dd>
249    Sets the emission (also called &quot;glow&quot;) of lakes and rivers, on a scale of 0-100.
250    This is mainly to facilitate glowing lava planets.
251    Note that for terrain generated with emission non-zero,
252    an alternative OpenGL rendering path must be used which may be a little slower.
253  </dd>
254</dl>
255
256<h4>Clouds</h4>
257
258<p>
259  The cloud layer, when generated, is a triangle mesh with variable
260  translucency at each vertex.
261  Note that it's <em>not</em> a texture in the normal sense.
262</p>
263
264<dl>
265  <dt>Clouds enabled</dt>
266  <dd>
267    Select the check box to trigger creation of a cloud layer.
268  </dd>
269  <dt>Subdivisions</dt>
270  <dd>
271    When left unchecked, the cloud layer will be subdivided
272    to the same degree as the terrain.
273    Check the box for explicit control of cloud layer subdivision.
274  </dd>
275  <dt>Clouds seed.</dt>
276  <dd>
277    Change this to get a different cloud pattern.
278  </dd>
279  <dt>Cloud height</dt>
280  <dd>
281    Change this to get adjust the height of the clouds above the terrain.
282  </dd>
283</dl>
284
285<h4>Other &quot;Create&quot; tab controls</h4>
286
287<dl>
288  <dt>Generate</dt>
289  <dd>
290    Click this button to regenerate the planet/terrain area <em>without changing the random seeds</em>.
291  </dd>
292  <dt>...new rivers seed</dt>
293  <dd>
294    Click this button to increment the river generation seed by one and regenerate.
295    This gets you the same landscape with a different river network.
296  </dd>
297  <dt>...new terrain seed</dt>
298  <dd>
299    Click this button increment the terrain seed by one and regenerate.
300    This will get you a completely different terrain.
301    (The river network will be different too, although it's seed won't have changed, as the rivers flow over the terrain differently).
302  </dd>
303  <dt>...new clouds seed</dt>
304  <dd>
305    Click this button increment the clouds seed by one and regenerate.
306    This will get you a different cloud layer.
307  </dd>
308</dl>
309
310<h3>Render tab</h3>
311
312<p>
313  Options controlling OpenGL rendering appear on this tab.
314  Generally none of these makes any difference to the state of the rendered mesh.
315  However, some of the parameters do affect some export methods; see the individual item descriptions.
316</p>
317
318<dl>
319  <dt>Wireframe checkbox</dt>
320  <dd>
321    Selects OpenGL wireframe rendering mode.
322  </dd>
323  <dt>Joystick mouse checkbox</dt>
324  <dd>
325    This simply affects whether, when in flight mode, pulling the mouse down the screen flies you in that
326    direction, or whether it's more like an aircraft joystick and pitches you up instead.
327  </dd>
328  <dt>Display list</dt>
329  <dd>
330    Selects OpenGL display list rendering.
331    Display list rendering is generally but not always faster
332    (depends on your OpenGL implementation and graphics drivers).
333    The main reason display list rendering is not enabled by default is that
334    the application may pause for a long time while OpenGL processes the
335    list when it is first rendered; the amount of additional memory
336    consumed by the display list is also a problem for very large meshes.
337  </dd>
338  <dt>Background colour</dt>
339  <dd>
340    Colour picking buttons to control the colour used for the viewing area background.
341    The low altitude colour is also used when exporting a cloud mesh to blender.
342  </dd>
343  <dt>Ambient</dt>
344  <dd>
345    The amount of ambient illumination.
346    This is also used when exporting shaded textures.
347  </dd>
348  <dt>Illumination azimuth and elevation</dt>
349  <dd>
350    Control the illumination direction.
351    These are also used when exporting shaded textures.
352  </dd>
353  <dt>Status</dt>
354  <dd>
355    A text field displaying information about the rendered mesh,
356    and rendering performance (recent average frames-per-second).
357  </dd>
358</dl>
359
360<h3>Save tab</h3>
361
362<p>
363  Strictly speaking it's Export which is provided, not save, as fracplanet's state cannot be restored (yet).
364  There are currently three ways of exporting models from fracplanet for other uses: to POV-Ray, to Blender and as textures.
365</p>
366
367<h4>POV-Ray</h4>
368
369<dl>
370  <dt>Add atmosphere</dt>
371  <dd>
372    This tick-box causes additional POV-Ray directives to be emitted to render a thin layer of atmosphere.
373  </dd>
374  <dt>Sea object</dt>
375  <dd>
376    This tick-box causes a single sphere or infinite plane to generated
377    for the oceans <em>instead</em> of numerous individual triangles.
378  </dd>
379  <dt>Base filename</dt>
380  <dd>
381    Enter the filename root to be used here.
382    Two files will be generated, one with &quot;.pov&quot; appended, and one with &quot;.inc&quot; appended.
383    The .inc file actually contains the object (using POV-Rays's <code>mesh2</code> format),
384    plus any other objects generated due to the options above.
385    The .pov just includes the .inc and adds a camera and light source and was primarily intended for testing:
386    the expectation is that users will generally include the .inc into their own scenes, probably wrapping it
387    in a POV-Ray <code>union</code> with embedded translate/scale/rotate directives).
388  </dd>
389  <dt>Save (POV-Ray)</dt>
390  <dd>
391    Click this button to create the POV-Ray files.
392    This can take quite a long time so a progress bar is used to track the completed percentage.
393  </dd>
394</dl>
395
396<p>
397  There are additional comments on usage with POV-Ray <a href="#pov">below</a>.
398</p>
399
400<h4>Blender</h4>
401
402<dl>
403  <dt>Per vertex alpha</dt>
404  <dd>
405    This check box selects Fracplanet's preferred method for outputting clouds:
406    by specifying per-vertex alpha components.
407    However, Blender seems to ignore these so a workround is used and an opaque cloud layer is output
408    (which should be ok if you fly underneath it and light it sensibly).
409    You probably don't want to switch this on.
410  </dd>
411  <dt>Save (Blender)</dt>
412  <dd>
413    Click this button to create a file (a file dialog will appear) which can be imported into Blender.
414    Note that the save file takes the form of a Python script (traditionally a <code>.py</code> file extension)
415    which can be executed by Blender to reconstruct the fracplanet model.
416  </dd>
417</dl>
418
419<p>
420  There are additional comments on usage with Blender <a href="#blender">below</a>.
421</p>
422
423<h4>Texture</h4>
424
425<p>
426  Saving as texture(s) gives you a set of 2D images which can be used by other rendering or modelling applications,
427  if not immediately then perhaps after a little massaging with the ImageMagick or NetPBM tools.
428  On saving you'll be prompted for a base <i>filename.ppm</i>.  A number of files are then saved:
429</p>
430
431<dl>
432  <dt>filename.ppm</dt>
433  <dd>
434    The basic texture.
435    This will be embedded in black pixels if the terrain isn't square e.g for the hexagonal terrain area.
436    Planets produce a cylindrically projected latitude-longitude &quot;spheremap&quot;.
437  </dd>
438  <dt>filename_dem.pgm</dt>
439  <dd>
440    The height field (a &quot;DEM&quot; is a Digital Elevation Model).
441    This is output as a PGM image, with heights from 0.0 to 1.0 scaling to 0 to 65535.
442    If the DEM contains a value greater than or equal to 256
443    (highly likely, except for exceptionally flat terrains),
444    then it will be output as a 16-bit PGM which, while part of the PGM
445    <a href="http://netpbm.sourceforge.net/doc/pgm.html">&quot;standard&quot;</a>
446    isn't well supported by many common graphics tools which appear to otherwise offer good PPM support
447    (e.g The Gimp doesn't like it).
448    The NetPBM tools are your best bet to convert this to something else (e.g pnmdepth).
449    Imagemagick's simple &quot;display&quot; tool also handles them well, scaling the maximum value to white.
450  </dd>
451  <dt>filename_norm.pgm</dt>
452  <dd>
453    The surface normals; XYZ components are mapped to RGB; [-1, 1] is scaled to [0,255].
454    It is thought this should be useful for bump-mapping renderers (e.g
455    <a href="http://www.shatters.net/celestia/">Celestia</a>) where the
456    illusion of surface relief is produced by normal perturbation.
457    If you intend to use this file, you almost certainly want to disable shading (see below),
458    as your renderer will compute it later.
459  </dd>
460</dl>
461
462<p>
463  Other texture save options:
464<p>
465
466<dl>
467  <dt>Shaded texture</dt>
468  <dd>
469    Controls whether the texture map includes the effect of lighting.
470    If you intend to use the information in the _norm.ppm or the _dem.pgm files to subsequently compute lighting,
471    then you almost certainly do <em>not</em> want the output texture to be shaded.
472    The amount of ambient lighting is taken from the slider on the render tab.
473    (Disabling shading is the same effect as setting ambient to 1.0).
474    The lighting direction is controlled by the render tab's illumination azimuth and elevation controls.
475    If you want to use the OpenGL window to preview the lighting, you should set zero spin and tilt
476    by hitting the &quot;reset&quot;button and dragging the tilt to the centre (unfortunately, this
477    gives you an edge-on view of flat terrain areas so it may be necessary to use the &quot;fly&quot; mode).
478  </dd>
479  <dt>Texture height</dt>
480  <dd>
481    The number of pixels high the saved texture images are.
482    The width is implicitly determined by the height.
483    For flat terrain the width is the same as the height.
484    For planets the width is twice the height because the height spans [-90,+90] degrees latitude,
485    and the width spans [-180,180] degrees longitude.
486  </dd>
487</dl>
488
489<p>
490  There are additional comments exported texture usage <a href="#texture">below</a>.
491</p>
492
493
494<h3>About tab</h3>
495
496<p>
497  This tab displays information about the software (in particular the version number) and its license.
498  There is a button to show a dialog containing user documentation,
499  and another button to display information about the Qt toolkit.
500</p>
501
502<h3>Display window</h3>
503
504<p>
505  The display window, when shown, shows the current
506  (most recently generated) terrain model.
507  It is hidden when terrain is being regenerated or saved.
508  The (badly named) &quot;tilt&quot; slider controls the latitude of the camera (when viewing a sphere-based object),
509  and the elevation (as in azimuth-elevation) of the camera when viewing a planar based terrain area.
510  Note that in the latter case the bottom half of the slider places the camera below base ground level/sea level,
511  which results in little being seen due to back-face culling.
512  The &quot;spin rate&quot; controls the rate at which the object is rotated.
513  The display window update rate is clamped to 60Hz, although this will typically
514  only be reached at the lower levels of subdivision.
515</p>
516
517<p>
518  Hitting the &quot;Fly&quot; button puts you into free-flight mode.
519  Pitch and yaw are controlled by the mouse position relative to the window centre
520  (if the pitch control feels backwards, invert mouse-Y behaviour on the render tab).
521  Roll is controlled by left/right mouse buttons, or the keyboard left/right arrow keys.
522  Speed is controlled by the mouse wheel or the keyboard up/down arrow keys.
523  Hit Esc to return to the normal viewing mode.
524</p>
525
526<h2>Fracplanet exports: usage notes</h2>
527
528<a name="pov"><h3>POV-Ray</h3></a>
529
530<p>
531  To ray-trace a saved terrain (saved as terrain.pov and terrain.inc, say) do:<br/>
532  <code>povray -Q9 -geometry 768x576 terrain.pov</code><br/>
533  Expect to get MANY "determinant too small" messages,
534  especially when using high degrees of subdivision.
535  It used to take POV-Ray a LOT longer to read large models than
536  to render them, but it seems to load much faster these days.
537</p>
538
539<p>
540  Note that clouds, if generated, are output using POV-Ray's <code>double_illuminate</code>
541  and <code>no_shadow</code> declarations.
542  <code>double_illuminate</code> means that both sides of clouds are the same colour
543  (rather than the underside being black).
544  <code>no_shadow</code> means that the clouds cast no shadow on the ground
545  (where the clouds are solid, the shadows are completely black, which looks more unnatural than no shadows).
546  If desired, the declarations can be found at the end of the saved .inc file and simply edited out.
547</p>
548
549<p>
550  (The author currently uses POV-Ray 3.6).
551</p>
552
553<a name="blender"><h3>Blender</h3></a>
554
555<p>
556  The easiest way to load mesh saved for blender is with blender's <code>-P &lt;filename.py&gt;</code>
557  command line argument on startup.
558  Note that you'll have to remove blender's default initially created object to see much of the fracplanet object.
559  Also, its shading won't look much like it did in fracplanet until you change blender's viewport shading mode to
560  something better than the &quot;solid&quot; default.
561</p>
562
563<p>
564  Blender consumes an alarming amount of memory.
565  Even loading a planet generated with fracplanet's default five levels of subdivision
566  consumes a quarter of a gigabyte of RAM.
567  It would probably help if fracplanet made some effort to optimise its meshes,
568  and/or made use of textures rather than trying to do everything using geometry, but it doesn't yet.
569</p>
570
571<p>
572  Blender's per-vertex-colours capability seems to ignore the alpha component of per-vertex colours,
573  with the result that the cloud layer is rendered as a solid opaque colour.
574  <em>If anyone has a solution to this it would be gratefully received.</em>
575  Fracplanet's workround is to output an opaque surface with the blending
576  (with the &quot;low altitude&quot; colour from the render tab controls) already done.
577  The &quot;per-vertex alpha&quot; checkbox switches to the preferred behaviour in case it ever gets fixed.
578</p>
579
580<p>
581  Each mesh is output with 2 materials.
582  The clouds just use material 0.
583  For the terrain, material 0 is for land facets, material 1 for the sea.
584  This may be useful for users wanting to give them different shader properties.
585</p>
586
587<p>
588  In Blender, the terrain mesh is named &quot;fracplanet.terrain&quot;.
589  There will also be a &quot;fracplanet.cloud&quot; if clouds were enabled.
590</p>
591
592<p>
593  Emissive terrain isn't supported.
594</p>
595
596<p>
597  If you want to manipulate the terrain, and know a bit of Python,
598  an easy way might be to edit the <code>.py</code> file;
599  at the start there are two functions defined:
600  <code>v</code> called to create each vertex
601  and <code>f</code> called to create each face.
602</p>
603
604<p>
605  (The author currently uses Blender 2.46).
606</p>
607
608<a name="texture"><h3>Texture Maps</h3></a>
609
610<p>
611  It is hoped that the texture export option will be of use to those building planets for
612  <a href="http://www.shatters.net/celestia/">Celestia</a>.
613  (The author hasn't tried it himself yet; at time of writing Celestia
614  is waiting to make it's way from Debian Unstable to Testing).
615  Celestia's texture formats are well documented at the
616  <a href="http://www.celestiamotherlode.net/catalog/documentation.html">Celestia Motherlode</a>,
617  in particular by the <a href="http://www.lns.cornell.edu/~seb/celestia/textures.html">Virtual Surface Textures</a>
618  document.
619  The main issues for anyone doing this would seem to be the need to reduce the height map from 16 to 8 bit
620  (easily changed by pnmdepth) and the possibility that fracplanet's normal map (if used, alternative Celestia
621  can compute normal maps from the height map) needs it's components exchanging or reflecting.
622  Celestia can also take a specular map, generally used to indicating the presence of reflective water (or snow);
623  fracplanet doesn't output this (yet) but it should be possible to fake something by processing the height or texture map.
624</p>
625
626<p>
627  As a simple demonstration of how to use a saved planet texture, here's how to use it as a spheremap in POV-Ray.
628  Save an unshaded <code>spheremap.ppm</code> from fracplanet, and do:<br/>
629  <code>
630    convert spheremap.ppm spheremap.png<br/>
631    convert -depth 8 spheremap_dem.pgm spheremap_dem.png<br/>
632    cat &lt;&lt;EOF &gt; spheremap.pov<br/>
633    camera {perspective location &lt;0,1,-4.5&gt; look_at &lt;0,0,0&gt; angle 45}<br/>
634    light_source {&lt;100,100,-100&gt; color rgb&lt;1,1,1&gt;}<br/>
635    sphere<br/>
636    {<br/>
637    &lt;0,0,0&gt;,1<br/>
638    pigment { image_map {png &quot;spheremap.png&quot; map_type 1} }<br/>
639    normal { bump_map {png &quot;spheremap_dem.png&quot; map_type 1 bump_size 20.0} }<br/>
640    rotate &lt;0,clock*360,0.0&gt;<br/>
641    }<br/>
642    EOF<br/>
643    povray spheremap.pov +KFI1 +KFF100 +W640 +H480 +Of.png<br/>
644    animate f???.png<br/>
645  </code>
646</p>
647
648<p>
649  <code>convert</code> is one of the ImageMagick utilities.
650  You could omit the line beginning &quot;normal&quot; but you will get a rather flat looking planet.
651  The factor of 20.0 at the end of the line is a rather arbitrary parameter.
652  Raise or lower it to adjust the apparent roughness of the planet.
653</p>
654
655<h2>License</h2>
656
657<p>
658  This program is free software; you can redistribute it and/or
659  modify it under the terms of the GNU General Public License
660  as published by the Free Software Foundation; either version 2
661  of the License, or (at your option) any later version.
662
663  This program is distributed in the hope that it will be useful,
664  but WITHOUT ANY WARRANTY; without even the implied warranty of
665  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
666  GNU General Public License for more details.
667
668  You should have received a copy of the GNU General Public License
669  along with this program; if not, write to the Free Software
670  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
671</p>
672
673<p>
674  The full license can be also viewed on fracplanet's &quot;About&quot; tab.
675</p>
676
677</body>
678