In part 1 we created the planetary object and eliminated small errors.
Part 2 is about further improvements, the final results, a bit of gimmickry, where you can get the necessary high-resolution maps, and an alternative to all the work.
You can continue experimenting with the variables or parameters Radius, HeightDiff, max_gradient and accuracy.
If accuracy is selected higher (instead of 0.0001 only 0.1), the noise at the terminator decreases, but distortions reappear. Again, the radius would have to be increased, which leads to longer render times.
If max_gradient is set from 1.3 to 1.8, the errors in the crater walls disappear at the bottom of the image, which also has disadvantages in tow. If you use other and higher-resolution maps, you can start all over again.
This brings us to fine-tuning, which can take a lot of time.
My settings are also far from perfect, see below, created with 16k maps. I have to treat myself to a day at some point, pull all the screws and check the Povray functions. There are vertical lines that I haven't been able to get rid of so far.
At some point, you should just be satisfied. For my purposes, it is enough for the time being, at least up to a certain magnification. Of course, if someone has a solution to the problem, I would be very happy about an email.
Copernicus crater, with unhealthily high magnification.
Despite maps of 16,000 x 8,000 pixels, there are vertical lines that are a bit annoying.
In the Povray file Step-5 I have deposited the final versions, with which the Moon and Mars are displayed correctly. Only with the small maps and the selected settings, an improvement is possible.
That's a very different topic. With which I have only partially dealt with so far and have been able to achieve mediocre results at most. A reasonable atmosphere that looks good from near and far is really tricky.
Maybe I'll add a third part to the tutorial in winter - after an extensive training session.
A bit off-topic, but while we're at it ...
If you rotate the camera for the left image by one degree to the left (Y+) and the right one degree to the right (Y-), you get two slightly different images. If ImageMagick is installed, these two images can be combined into one stereo image with a simple one-liner.
For stronger effects, all you have to do is pan the camera by more than one degree. However, I would advise against exaggerated values.
The result can be viewed with red and blue anaglyph glasses.
Bump-map and spherical heightfield both have their strength. I prefer bump-maps during animation development because of the faster render time, and their high contrast across the entire image is better suited for explanatory maps. However, if you want it to look realistic, it has to be a heightfield.
Bump-map
+ renders very fast
+ apart from the Terminator good contrast
- no real shadows
Spherical heightfield
+ realistic shadows
+ shows elevations even behind the Terminator
- low contrast apart from the Terminator
- 10 to 100 times render time
Both should be as far away from the object as possible. Otherwise, the edges will remain unexposed, or they will not be captured by the camera. Happened to me with Mars, the white polar caps were never in the picture.
Therefore, do not skimp on zeros for the distances, otherwise at best the polar regions are missing, or the result is really distorted. For global views, I would recommend at least ten times the object radius for both values.
For each planet you need a DEM that exists in sufficient quality from only a few celestial bodies. Naturally, it is easier for space probes to record high-resolution surface maps than elevation profiles. Good DEMs are correspondingly rare, especially with resolutions > 2000 pixels in width.
Point two is the visual map of the surface, which should contain NO SHADOWS. If some are already drawn into the map, this is a great service from NASA, but only suitable to a limited extent for our purposes. Reasonable maps are immediately recognizable, they contain almost no black areas, especially not distributed across the entire map.
Unless, of course, there is no DEM, then included shadows in the surface map are quite nice.
Surface-map of Saturn moon Mimas
Beautiful, detailed, but contaminated.
So far, I have only been able to find the combination of high-resolution DEM and clean surface map for Earth, Moon and Mars. All other maps, e.g. for the minor planet Ceres, Saturn's moon Enceladus, planet Mercury, are... all... shadow-contaminated.
In addition, 16-bit color depth is urgently required for the DEM. These are gray values, and with 8 bits you only get 256 color gradations, which is clearly not enough.
If you download, edit and reduce the size of the maps yourself, you should be careful with the sharpener. Less is more, because in the end you change the pure information of the map or deteriorate it. I would rather sharpen the images rendered by Povray.
When reducing the size of the images, you should use round factors, i.e. divide the original size by 2, 4, 8, 16, no matter how crooked the resulting image width becomes. Otherwise, the image editing program has to charge an odd number of pixels to one, which causes the quality to suffer. Povray doesn't care if an image is 8000 pixels wide, 8192 or 8473.
The main thing is that both maps are twice as wide as they are high, otherwise there will be new distortions again.
And don't forget: Always save the DEM with 16-bit colors. GIMP successfully fooled me in my first attempts. I had a 16-bit file, which apparently also successfully saved as a JPEG, but only 8 bits always ended up in the file. JPEGs and 16-bit, somehow doesn't work.
That's why DEMs are always PNGs for me. For surface maps, JPEGs with 8-bit per color are sufficient, which leads to significantly smaller file sizes. JPEG quality somewhere between 92 and 95, fits.
The maps freely provided by NASA are of high quality and very detailed. I don't even want to know what algorithms are used to convert tens of thousands of individual images into one.
But every map contains errors, some of which are quite noticeable, fortunately usually only at very high magnifications. You have to live with that, or correct all errors by hand in an image editing program.
I'm just glad that these things exist and that everyone can play with them.
The Cliffos Algorithmi del NASA are hundred-kilometer-long, unfinished defensive walls in the Mare Nectaris. Built by hand on February 29, 1975 by female astronauts of the Apollo 19 mission, they served to protect the landing site from annoying Aliens, Hollow-Earth-Reptilians and Moon-Darkside-Nazis.
If you want to save yourself a lot of the work, you can use the Lunex package from Jay Tanner.
It weighs several 100 MB and contains all the necessary maps to show the moon. When you have tested the different options, you will certainly get the desired result.
My pictures + videos of Moon and Mars (see Astronomy section) were not created with Lunex. When I found out about it, my own script was already 95 percent ready to use.
I wanted to publish the corresponding macro collection for a long time, but I have rebuilt it several times and it is usually only very wobbly almost finished, so that I can just use it with many commented out parts.
Maybe that will change at some point.
Until then or beyond: Lunex.
Or do it yourself.