Reflections are a world feature added to version 6.0. They are used for ocean water shader rendering, as well as for other reflection effects on individual objects.
Reflections are global. At any location in a world, the reflection map is created dynamically by the rendering subsystem. It is available and supported for the DirectX rendering engine. It is not available for software and OpenGL rendering modes.
How it is done
Before reflections can be rendered onto a surface, it needs to create a special view to be projected onto a surface. This is called reflection map or cube map. As soon reflections are enabled, it will create such a cubemap on the fly, dynamically, from your current position in world. Below is an example of a cubemap, how it is rendered internally:
It shows the 6 sides of a cube folded up. Think of it as taking 6 screen shots from your current position into all directions. Now, while you're inside this cube, and project the image onto a surface (a polygon if you want so) you see exactly the reflecting sides of the cube.
What all is reflecting
You can select the kind of objects included into the reflection map in the world feature dialog.
- Static Objects
The example above got Sky, Clouds and Terrain included in the reflection map. The more objects are considered with reflection, the longer it will take to dynamically create the 6 screen shots for the reflection map. So, carefully consider if you really wish to include Static Objects and all other Objects as well, as this can cause some lag for slow computers.
Resolution of the reflection
The resolution of the reflection is the cubemap quality. The choosen resolution for the reflection can be low, as reflection maps are likely combined with other effects, e.g. the wavelets for ocean rendering. For water surface a resolution of 128 pixel squared for each side of the reflection cube is fine.
The Update Interval determines how often a reflection map is created on the fly. E.g an interval of 5 tells it to create these 6 screenshots internally every 5th frame. This is fine for most reflections and helps to reduce the load for slower PCs.
Hardware Requirement Details
The HAL (Hardware Abstraction Layer) must support at least:
- Cubemap texture as render target (for reflection maps)
Further, for effects using the dynamic cubemap:
- Vertex Shaders version 1.1
- Pixel Shaders version 1.4
- 5 simultaneous textures
- 24bit and 32bit RGB/ARGB and greyscale texture formats
- V8U8 texture formats (for bump maps)
Graphic cards that cannot describe these minimum features in their hardware layer, won't be capable rendering effects and/or using reflections. This only affects a few cards, including some embedded Intel chipsets.
The most significant hardware capabilities are shown, starting with build 1309, in the aworld.log file.