Solar System in 3d (part 2)

Solar System in 3d (part 2)

In an old, previous post I showed some renderings of Mars in 3d using Java3d. That library was abandoned long ago and I mentioned I was working in a newer version using JMonkeyEngine. Indeed I did that but never spend enough time to post the results here, as I was always busy with other things. Finally, it's time to show the results I obtained.

The starting point was the jmeplanet project by Aaron Perkins, which seems to be only available now on SourceForge as spaceworld. You can also enjoy some test videos he has on Youtube. The latest code there is probably the best option now, since I took an old version of his engine. Then I prepared the Mars images for each section of the planet using the MOLA altimetry data and a high resolution texture. I encoded some RGB and bump images using the channels to avoid losing accuracy in the altimetry, so that these images can be directly loaded into the GPU and less space is needed. The code and textures used for such tasks are provided in the project link below, but obviously the original MOLA data is not included since the download is around 2 GB only for the altimetry.

As always I prefer to show results instead of describing in detail the code. In this case this is inevitable since I forgot almost everything about 3d programming (the little I learned with this project), and I developed this years ago. In addition, I simply put things together like in a puzzle, I'm not the author of the engine. But I think it can be useful and funny for others. I know a video would be better, but more time consuming, so I will put only screenshots (sorry).




 

There are some keys to control the movement (W, S, A, D; Q and E to rotate; S and X to go up and down), and in addition other keys like L and K to disable/enable the illumination and planet atmosphere. The program can also render the Earth, but using a low resolution bump map. Anyway, the global view with the atmosphere is quite nice, although not very realistic.


 

One of the few things I added to the original code (besides the real Mars textures) was the option to show an 'ocean' at a given height on the surface. The key g can be used to enable (or disable) gravity so that you will fall on the surface with the possibility of walking or even diving on the ocean. I show here two screenshots of the Chryse planitia (the region between Chryse and Vallis Marineris more exactly) in which it is evident the effects of the presence of water (erosion, sediments, lack of craters). It is also very clear the signs of the interaction of the lava with frozen water, visible as regions with many little fractures due to water vapor liberated from below the surface. The north region of Mars is about 2 km below the mean height and it is clear it was below water in ancient times. The key o will toggle the ocean at a level that emulates the approximate depth it had, which wasn't too high anyway, only a few hundred meters. This region is very interesting and some missions like Viking or Mars Pathfinder landed here. With the ocean activated it is very easy to follow its limits (the Mars coastline) and explore some others interesting places also linked to Vallis Marineris or even the Olympus Mons.



 

I had many ideas to evolve this project: identifying features, allow learning about the history of Mars, or doing the same with the Moon using the data from Clementine. Porting it to Android could be also feasible, but it seems I'm getting … old for such time demanding tasks. You are invited to download my not-so-little Mars project and play with or even evolve it. You will need of course the JMonkeyEngine library in the classpath, together with JOGL, JPARSEC, and the pngj libraries. The code is not very clean, but it works. Execute the SolarSystemTest class and enjoy!

Discussion

Enter your comment
  ____    ____     __   _  __   __  ___
 / __ \  / __/ __ / /  | |/_/  /  |/  /
/ /_/ / _\ \  / // /  _>  <   / /|_/ / 
\____/ /___/  \___/  /_/|_|  /_/  /_/
 
 
blog/solarsystem3d_part2.txt · created: 2019/03/20 12:57 (Last modified 2019/03/20 19:43) by Tomás Alonso Albi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki