P0-P-172: Part 84: Planet Texturing
Modifying the planetary textures to work with the floating origin system was quite easy.
I just needed to grab the radius, max terrain height, and position (in world space) of the planet and send it to the shader that renders the terrain textures.
The terrain height and radius was easy, I could access it from the planets description object. It was a little more difficult to access the transform of the planet, since I needed it to be the correct, world space, transform, adjusted for the floating origin system.
This now seems to work well. The only problem is that the planets don’t look good from high altitudes. This is due to the fact that I am using a simple height based rendering system. I am basically just choosing a textures based on the height of each terrain pixel from the ground, and blending them together.
At some point, I will need to add in regions, ie, a desert, and ocean, forests, etc, in addition to the height based system.
I will also need to add randomised textures to each planet in the future.

05/01/2017 , 05:12:06 AM
Unity Personal (64bit) – P0Main.unity – New Unity Project – PC, Mac & Linux Standalone

07/01/2017 , 07:23:58 PM
Unity Personal (64bit) – P0Main.unity – New Unity Project – PC, Mac & Linux Standalone*
