Difference between revisions of "Reflective texture limitations on scenery"

From FSDeveloper Wiki
Jump to: navigation, search
m (Reflection and scenery moved to Texture - Reflection And Scenery: Titling Rationalisation)
(No difference)

Revision as of 13:50, 25 April 2008

This article has been written by Christian Stock on the AvSim forum. It is kept here for knowledge gathering purposes. It has been written for Fs2002, so not everything is still valid in Fs2004 and FsX.

FS2002 supports reflective textures, but not really for buildings. Firstly, TEXTURE2_REFLECTIVE doesn't work with TEXTURE_BUILDING. Of course, you could use TEXTURE_AIRCRAFT instead, but then you can loose your textures in the distance (maybe mipmapping doesn't work properly). On top of that FS2002 doesn't seem to treat mipmaps with alpha information right, so you'll loose reflections when you are still fairly close to your building. A possible workaround might be to generate your own mipmaps and import those into imagetool manually (I haven't tried if this works and some recent discussions with other people seem to suggest that this may not work).

Personally, I recommend to not use TEXTURE2_REFLECTIVE at all, for reasons that will hopefully become apparent in the following explanation.

What we see as the normal colour of an object is called 'diffuse' in graphics rendering. Whenever you set an object to say red, it's diffuse colour is red and it'll appear red in FS2002. When you put a texture on top, it'll loose it's red colour and will show the texture instead. Now, different materials react differently to light. Some materials keep their diffuse colour, whereas other ones reflect light, they appear shiny (e.g., metal surfaces). The shinyness of a material is modelled with the 'specular' colour. You can specify the specular colour in gmax and also set the specular power (i.e., the degree of shinyness). The good news is that the specular colour blends with the diffuse texture. You can use the specular settings to simulate buildings made out of glass. Set the specular colour to white and a specular power of, for example, 10, and the east side of your building will be close to white in the morning. It'll look as if it's reflecting the morning sunlight.

So far, so good, but most buildings have concrete or brick surfaces with windows in between. To make only some areas of a bitmap shiny (the windows), you'll need a 'gloss map', i.e. a bitmap that tells you where the texture is glossy and where not. TEXTURE2_REFLECTIVE uses such a gloss map in the alpha channel (i.e. the alpha channel controls the degree of glossiness). However, there are some serious flaws in the specular light computation using TEXTURE2_REFLECTIVE. Specular light is dependent on the light direction and your view direction. If you look at a shiny surface from the same direction as the light comes (e.g. you have a torch in front of you), the specular highlight is at its maximum. If the light comes from a different direction, the specular colour gets weaker. FS2002 seems to model the view direction dependency, but not the light direction dependency. A surface pointing away from the light still looks shiny! This is not correct and looks very wrong. Another disadvantage of TEXTURE2_REFLECTIVE is that it seems to also control the specular colour value. This means at 50% shinyness you automatically get a specular colour of 50% grey. You can't have 50% shinyness and white. This gives materials a greyish metal look. In conclusion, specular highlights only work correctly on all glass / metal surfaces (setting specular colours and power in gmax), but not on mixed material surfaces using a glossmap (TEXTURE2_REFLECTIVE).

On a side note, FS2002 doesn't use real reflectivity, i.e. your glass skyscrapers won't reflect the actual sky nor are you able to see a reflection of your plane. While recent games can pull this sort of thing off in closed environments in realtime, its not all that feasable in MSFS (yet). What we'll probably see in the not too far future (probably FS2006) will be dynamic sky reflections on water surfaces, but other environmental reflections (ground objects and aircraft) will probably be a few years off.




Placeholder text