Reflections and specular

From FSDeveloper Wiki
Jump to: navigation, search

Simple Scenery Design Tips.. The Basics of Specular Maps & Reflective Windows...

Specular levels and reflections are often confused as the same thing by novices, however are quite different!

Specular: The "shininess" of a material. This is how the sun reflects off of it. It is a greyscale value: If set to black, it is not shiny at all, like brick. If set to white, it's very shiny, like polished metal. The material can be made to have a single specular quality, set at the top of the material settings:

SpecMat.jpg

Or can be a texture sheet assigned to the specular slot, which should be the texture converted to greyscale, respective of the reflectivity of the constituent parts.

An Example: The wood and window frames want to be a mat, non reflective material, but the glass is shiny.

Diffuse: WindowsHouseOld0307 S.jpg

Specular: Windows spec.jpg

This can increase the size of texture load considerably, and can really degrade performance if you're not careful. Check that it's necessary before using it.

You will only notice the specular when the material on the object is viewed with the sun on it at an adjacent angle. If you are just after reflective windows then don't worry about specular too much. It is not noticeable underneath reflections.


Reflections:

This is a dynamic "reflection" of a global generic or custom cube map. This is great for windows and, IMHO, negates any need for specular maps. There are several ways to achieve this.

Inverse of diffuse alpha.

My personal favourite. Just apply the texture with a layermask and make the windows transparent by about 50%. Like so...

Diffusealpha.jpg

Then merge the visible layers, flip it and export as a .dds DXT5. DXT1 only has an "off" or "on" alpha and DXT 3 isn't as good. Plus reflections aren't used in FS9. The _lm texture needs to have the alpha applied too!

Then you need to assign the material to read the inverse of the diffuse alpha as the reflection map, and assign a reflectivity level. 60 works well I have found. Use the global environment map as reflection. You can assign your own cube map for the reflection, but this will not be covered here.

Reflectmaterial.jpg

Blend Environment by Specular Map Alpha.

Similar to the blend by inverse of diffuse alpha, the reflectivity will be determined by an assigned specular map. Use the same material settings but tick this one instead. The white of the specular for the shiny windows will translate to a reflection, where as the diffuse alpha is dark over the windows, hence inverted "by inverse of diffuse alpha".

Tutorial By S. Slade for the FSDEVELOPER.COM Community.