Apollo 15 VR – Breakdown

Apollo 15 VR is an Android app for Google Cardboard that aims to provide a somewhat realistic experience of what it would be like to fly down to the lunar surface and rove the moon. If you want to try the app before reading, you can download it here.

One of the first things I wanted to get right was the environment; I knew I wanted to fly in, land, and then walk and drive around.

With all the technical limitations of the smartphone platform in mind, I started with the background. It’s an area you can’t reach, yet is visible at all times.

I downloaded some data from the NASA website, height data of the Apollo 15 landing site. It covered all the important bits. The data was quite high detail, so it was nowhere near fit for the VR demo. I loaded the data into Blender, and started making a custom mesh for it.

I couldn’t just use a grid for it, because this didn’t preserve the contours efficiently, and it would create geometry in places you would never see. So I came up with another method.

I placed 4 spotlights in the center of where the demo would take place, with shadows on. This would sort of highlight the contours of the mountains, so I could create a mesh that was more efficient.

This is the result, with the contour quite nicely preserved.

I used some areal photography together with some texture painting and light baking to give the environment it’s final look. I scaled the uv’s a little so that most of the detail was horizontal.

The local ground, the space you can actually rover around, required a different technique. It was a matter of using heightmap data, and adding some fictional craters, to give the player something to explore.

A special shader was required to show the larger details far away, yet show smaller detail on the ground directly below you. It’s a simple shader and I think it works fine. It uses 2 textures, one that spans the entire area, and one with some gravelish dirt.

These 2 meshes together create a nice looking result, considering it has to run on a phone, twice.

To make the background fit in a bit better with the rest of the scene, I wanted some sort of faint glow around the mountains. I couldn’t use any post processing effects, so I render a large skydome with a blurred version of the environment. To avoid compression artifacts, I exaggerate the contract, and tone it down with a shader.

To render the glare, I wanted to use the default unity lens flare effect, but this didn’t work in VR, as when you rotate your had, it rotates the flare along, and this feels weird. I implemented my own system for this, that would simply show/hide the flare if it was unobstructed. It works well enough.

For the physics of the rover, I found that 2 rolling cylinders worked perfectly for these purposes. The center of mass is far below the rover, to reduce the chances of it falling over.

One rule I kept during the development of this demo is that I would never rotate the camera. This made steering the rover very intuitive. You just look in a direction, and the rover steers that way. Everyone that I had try the app understood this system immediately.

The visual part of the rover is nothing complicated. It’s a simple skinned mesh, where I can deform the wheels and suspension, and I do so with code, via some perlin noise. There’s also a projector which projects a shadow on the ground. Had I started over, I would have done it with a matrix and a texture in the shader instead, but this works fine.

Here’s the final build up of the scene:

Apollo 15 VR – Breakdown