Congratulations! You received an "A" on your Solar System science project!
In this chapter, we built a Solar System simulation that can be viewed in virtual reality using a Cardboard VR viewer and an Android phone. This project uses and expands the RenderBox
library, as discussed in Chapter 5, RenderBox Engine.
To begin, we added a Sphere
component to our repertoire. Initially, it was rendered using a solid color lighting material. Then, we defined a diffuse lighting material and rendered the sphere with an Earth image texture, resulting in a rendered globe. Next, we enhanced the material to accept two textures, adding an additional one to the back/"night" side of the sphere. And lastly, we created an unlit texture material, which is used for the Sun. Armed with actual sizes of the planets and distances from the Sun, we configured a Solar System scene with nine planets, the Earth's moon, and the Sun. We added a star field as a sky dome, and we animated the heavenly bodies for their...