Realistic Moon

Hi,

I just read that NASA has published 3D data of the moon.

Anyone with a space game out there, that is thinking of using the data somehow?
What would be the best way to use it in JME?
I think using the height map could be easy but how to apply it to a ball/ sphere.
Note: I have not reread the tutorials, so I am not sure if it is already in, I just remember the topic about height maps.

1 Like

:thinking: interesting.

We have an height map based terrain with lod, patches etc in jme, but it works only on quads afaik.

I think using the height map could be easy but how to apply it to a ball/ sphere.

applying the height map is easy, you get the uv for the vertex, sample the height map and find the height, multiply it by the vertex normal and displace the vertex accordingly.

But obviously if you just split the sphere everywhere in order to get the required vertex density, you might end up with too many vertices for it to be rendered efficently, one easy way to solve that is by using tessellation shaders to do the splitting and displacement (in this way you can do it dinamically based on the camera position…), but it might be a problem to apply physics on that.

Another way is to use patches and lods like in jme3-terrain and/or greedy meshing, but this is more complex.