As you probably know, there is an effect called sun fog or area fog in the KotOR games. This gives model parts further away from the player a flat color overlay. But as you might have noticed, skybox models do not get that overlay even though they are the farthest away. So my question is now: Why?
I've been talking to Sithspecter and Fair Strides about this and here's Fair Strides answer:
The problem is that I don't think that this is how it works or is at least incomplete in a way. And since there may be other people interested in this topic, I figured I'd create a topic for it
From what I could tell I think that there is no fog from where to player stands up to the distance specified in SunFogNear. Then there is probably a linear gradient and from SunFogFar on, the fog is fully opaque. And here's what makes me think that this is the case:
To explain the picture: What you see is the first Ravager module in TSL (851nih) with the vanilla fog settings. All I did was to add an additional backdrop model to the module. As you can see, there is a fog gradient for the metal structures in the foreground. Then there is the vanilla backdrop/skybox model which includes the star background, the sith fighters, the red lasers and the explosion. None of that model has any fog overlay. But my new model with the planet backdrop and the Sith warships on the sides appears completely grey, even though all parts of this model ar closer to the camera than the skybox model but farther away than the Sith fighters. So, if the fog was only determined by the distance to the player, then all of this should be visible just as the vanilla skybox.
My first guess was that some file specifies which models receive sun fog and which do not. But when I take my model and replace the vanilla skybox, it still appears completely grey due to the fog. So, I assume that something in the model file tells the game whether or not this model gets the fog overlay. The problem is that when I export the ascii-version of the vanilla model and recompile it with MDLOps, this vanilla model also turns completely grey. So I fear that this information is lost due to our available tools, but I was hoping that you know a solution to this problem.
For the time being, I edited the .are file. In vanilla, the values are SunFogNear = 0 and SunFogFar = 150. I changed SunFogFar to 5000 and the fog disappeared completely just as I would expect going with my understanding of the way sun fog is handled. This is also why I think that your description is incorrect as this change should have turned everything grey when applying your explanation. The other weird thing is that setting SunFogOn = 0 had absolutely no effect...
But I'd like to keep the vanilla fog anyway, so I'd rather figure out the model part instead^^