4 ms·
Can you talk more about the moon data munging? I just started some Blender tutorials and the first thing I want to try once I get some tutorials under my belt
by Teever 5y ago
Can you talk more about the moon data munging?
I just started some Blender tutorials and the first thing I want to try once I get some tutorials under my belt import dats from the Moon/Mars.
- JKCalhoun 5y agoSure. For the Moon the (images) data seems to be bucketed with regard to pixels-per-degree (PPD), the more coarse data set being 64ppd data (finer resolution for the Moon goes at least as high as 512ppd that I have found). Sadly, my workflow (image editors, and Blender as you mentioned) are already straining with the 64ppd data-set so I did not try to go higher resolution. It means though that my Moon is wildly small — the lunar bases that seem to be a paltry 7x7 or 9x9 voxels are in fact the size of a small town. I began with NASA's "CGI Moon Kit" [1] which, as I say, is 64ppd. There is both a "color data" image and an "elevation data" image (where the greyscale value of the image represents elevation). Polar data was garbage (and would look wildly distorted in my tile-based voxel algorithm so I confess that I tossed it — cropped everything outside 60-degrees latitude basically - I just limit fuel in the game to keep pesky kids from trying to get too deep into the polar regions). Even at 64ppd and poles cropped, I still ended up with two images that were 23040 × 11264 pixels in size. This turned out to be a challenge for most of the image editing apps I have. Blender handled it (but barely). With both color + elevation images I followed an online tutorial [2] meant for cartographers wanting to use Blender for relief shading. NASA's moon map had no shadows (probably a good thing). I was not going to try to real-time shade/light the voxel terrain so I settled on "burning in" the shadows with Blender. While my MacBook ran some 8 hours or so (over night) to generate the relief-shaded lunar map, the result was quite nice. As a result, it is near sunset everywhere on my Moon, ha ha. With a relief-shaded image representing the color and a same-sized image representing the elevation, I wrote a custom app to read both files into memory and then generate the correct number of 512 x 512 tiles that contain both the elevation data and RGB data in a single raw file. Now I have 45 x 22 raw tiles covering the entire 64ppd Moon. The voxel algorithm uses simple math to figure out which tile a given voxel is to be found, reads the elevation/color data. In hindsight, I could have output PNG files or something with alpha channel (where alpha would be interpreted as elevation). As it turned out, the Moon color was so close to greyscale that I ended up treating it as such and used only the green channel when creating my Moon tiles (so the tile data has only a single 8-bit value for elevation and a single 8-bit value for "color" per voxel — cut the raw tile size in half). Still wrapping up the game [3]. I'll put the sources up on Github end of the month, I think. [1] https://svs.gsfc.nasa.gov/4720 https://svs.gsfc.nasa.gov/4720 [2] https://somethingaboutmaps.wordpress.com/blender-relief-tutorial-blender-basics/ https://somethingaboutmaps.wordpress.com/blender-relief-tuto... [2] https://mooncraft2000.com https://mooncraft2000.com
- bdefore 5y agoFascinating. Are there upcoming plans from any space agency to improve that 64PPD with upcoming or existing satellites or Earth-based capture of moon topography?
- JKCalhoun 5y agoThere are 512ppd data sets [1] already. As I say, I found them unwieldy with my workflow. A new workflow would be required to process these into "game tiles". [1] https://astrogeology.usgs.gov/search/map/Moon/LRO/LOLA/Lunar_LRO_LOLAKaguya_DEMmerge_60N60S_512ppd https://astrogeology.usgs.gov/search/map/Moon/LRO/LOLA/Lunar...
- bdefore 5y agoWhoops. I missed that you mentioned higher PPD is available. If your workflow was improved to accommodate it, I presume it would produce more, for lack of a better phrase, life-like terrain? Would a much higher PPD be required to reach a threshold to improve the experience. And are there plans coming to get finer detail than 512PPD?
- JKCalhoun 5y agoIt occurred to me that, beyond 512ppd, you could "synthesize" higher-res detail. I don't know how much of a cop-out that is though. There may be >512ppd data though. IANAS (I am not a selenologist).
- 127 5y agoI did some cropping of the LOLA dataset to a .raw that Unity3D could understand as terrain input: https://github.com/amb/SplitTIFF https://github.com/amb/SplitTIFF ... a couple of years ago Happy to hear any better alternatives for the task.
- JKCalhoun 5y agoThat is very cool. I starred your repo, if I try to up the PPD I'll have a closer look.