Howdy everyone, not-very-longtime listener, first-time caller. Since this is my first time here, some introductions! I'm IlmrynAkios over on the BGS forums and TRSGM on Doom3World.org; if you play either Oblivion or Doom 3, chances are you may have heard of some of the things I've had my hands in-- Sikkmod and OBGE/OVEP. While I've been out of the modding scene for some time, I recently ran across the FSCP and had a pretty powerful itch to get back into things.
Hello and welcome! I'm not a coder (though I can probably dig and claw my way through some simple code snippets and get a general idea of what they do), but I do know stuff about textures!
So, long introductory cutscene over, onto the meat. In rough estimated utility:
- I see you use tangent-space normal maps for your ships which seems very wasteful. The reason everyone in the professional sector loves these is because it works well with skinned meshes (meaning you're recalculating all that stuff anyway) and because you can, in theory, recycle the same texture for multiple objects. Since FreeSpace does neither, you can instead create object-space normal maps (more on that in a sec) and skip a 3x3 matrix multiply per pixel. While your normal encoding scheme would no longer work, you can probably get away with standard DXT5. In application land, you would just need to pre-rotate the light data by multiplying it with the model's rotation matrix. Pretty basic change for wide-reaching benefits.
Here are my comments on this, for what it's worth:
There are several ships that use tilemaps instead of UV mapped textures, and moreover there are several ships that share certain textures - usually tiles, but I'm reasonably sure there are ships that share UV textures, or use parts of the same texture.
To retain compatibility with these assets, tangent space normals should still remain compatible, and adding object space normal map support would require a new texture type, OR alternatively some identifier that changes how the map is read and how the normal map is applied.
Ignoring the questions of feasibility: On the topic of using standard DXT5 for object-space normal map, I must very much disagree. In DXT compression algorithms, the contents of RGB channels affect each other. For diffuse and specular maps this is good enough; for normal maps, it isn't. This is the reason why the DXT5nm format is used for tangent space normal maps. It stores one normal map channel in RGB and the other in Alpha; these remain distinct in DXT5 compression, so that the contents of vertical normals channel don't end up affecting the horizontal normals channel.
With different data in red, green and blue channels, you would end up with hopeless artefacts on the normal map.
Moreover, I was under the impression that object-space normals basically store 3D vectors, rather than 4-vectors (I am assuming that 3D graphics is not yet branching to general relativity). Surely, three channels would be sufficient to store three values; in this sense, if DXT compression were used, it would have to be DXT1c for maximum memory efficiency (and horrid quality). In practice this would most likely be untenable due to quality drop, so u888 would likely be the target format.
Now that I think of it, if the engine can identify whether the normal map has an alpha channel or not, it could use that to define whether it should apply tangent space normals or object space normals. I do not know if this is feasible to execute.
Other part of your post that interested me was the stuff about making the skybox affect the lighting more, but I really have no clue about OpenGL or 3D graphics coding in general.