Creating the sun

Creating the sun is a lot like making the earth and moon spheres, with one exception though. Since the sunlight source will be inside the sun (at 0,0,0 origin), its surface won't get illuminated. Instead, we'll make the sun material an emission:

  1. Import sun.png into Assets/SolarSystem/Texture.
  2. Create a Sphere object named Sun, which will be a child of SolarSystem.
  3. Delete its Sphere Collider.
  4. Drag the Sun texture onto the Sun object.
  5. Unfold its material and uncheck Specular Highlights and Reflections.
  6. Check Emission.
  7. Drag the sun texture onto the Emission Color chip.
  8. Move Sunlight so it becomes a child of the Sun.

The following is the resulting Scene view:

The following is the resulting Hierarchy:

Also, here is the sun material that we made:

In reality, the sun is about 109 times the size of the earth. It is not practical to show the actual relative size of the sun in this project, so we will keep its size at 1 unit for now. Alternatively, we can try something bigger but not ginormous; however, this could be an interesting extension to this project--to provide a mode that illustrates real-life relative scales and distances of the bodies in our solar system.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset