So, I read a couple of interesting articles about how to do cube mapping. The most straight-forward way I found was about using a cube to generate a sphere. This makes sense because you don’t need to do any insane math to work out the S,R and T coordinates of your cube texture.
Well, that’s what I’ve gone ahead and done. However, these vertices aren’t in any particular order; so tomorrow night I’ll need to work out a way to index them so that triangles are drawn. This was pretty easy, I haven’t looked at the code below to optimize it in any way; it just seemed like the logical way to produce the vertices.
After another couple of hours I’ve figured out what UV coordinates are and have managed to texture my rotating sphere with earth.
I’ve been reading that the best way to texture a sphere is with a Cube Map, so that’s the next thing to learn now. For example, if I move the camera to get a good look at the south pole (of my sphere) and then move my texture a bit, you can see how the UV mapping leaves a lot to be desired.
Understandably it pinches in the 2D texture. The best way I read this described was that it’s like trying to wrap a piece of paper around a basketball.
Thinking about a simulated economy
One of the things that I’ve definitely wanted to have in The Last Boundary is a simulated economy. As your mighty space empire grows the various sectors of the economy would produce supply and demand which would naturally result in the cost of your fleet and other projects rising and falling. Different government models would probably affect this in different ways.