Some more progress today:
- The colours now fade to black with distance. After much discussion with my friends who work professionally with 3D graphics, I implemented a function neither of them suggested, but that seems all right to me, namely, Gaussian luminescence. This has the property, that the lighting stays roughly constant near the camera, then gradually decays to zero further off. There are many ways of doing the same thing, but Gauss is very convenient to me as a physicist, since it has a well defined scale to it which can easily be tweaked (the physicist in me chooses not to think to much about the fact that the light should really fade like 1/R²…). I also tweaked the light source to have a very faint red hue, but it’s very subtle.
- I’ve implemented rotations for the objects (and refactored that piece of the code since it was becomming stupidly redundant). This means that the engine is now visible! I’ve implemented the rotations by using explicit rotation matrices, which is what I know and understand, but its probably not very efficient compared to quarternions. If, at a future stage, this appears to be a performance issue, then maybe I’ll have to learn about those…
Next on the list are (in no particular order):
- Depth culling
- Better object sorting
- Controls (mouse + keyboard)
- More objects
- Shadows
- Particles
- Variegated ground
But that’s all for another day!