This is the documentation for Enlighten.
Configuring GeoMobileDemo
On most devices, by default, GeoMobileDemo includes a night time light configuration that demonstrates how Enlighten's baked and dynamic lighting can be combined effectively:
However, on Apple's iPad 3/iPhone 5 and devices with ARM's Mali T-604 GPU, baked night lighting is omitted. Instead, the increased power of these GPUs is used to render indirect specular directional irradiance from dynamic cube maps:
App.config
Due to the limited number of available texture units, baked lighting and indirect specular irradiance from dynamic cube maps can not both be rendered. By default GeoMobileDemo will detect hardware capabilities and select the appropriate feature, however, it is possible to override this decision using a configuration file that must be copied onto the device. On iOS, App.config should be placed in the Palace app's Documents folder using a tool such as iExplorer. On Android, the Android Debug Bridge (ADB) should be used to push the App.config file to the following location, assuming the GeoMobileDemo has been installed correctly:
/mnt/sdcard/Android/data/com.geomerics.enlighten.GeoMobileDemo/files/App.config
In fact, App.config can be used to configure the app in a number of ways. Valid configuration parameters and values are described in the table below:
Parameter | Values | Default | Description | iOS | Android |
---|---|---|---|---|---|
NativeResolutionScaleFactor | [0.0...] | 0.5 - iPad 3/iPhone 5/Mali T-604 1.0 - other | Scales the native display resolution of the device by the given value. Setting this to a value less than 1.0 can improve performance on devices with very high resolution displays. | ||
BakedNightLighting | true/false | false - iPad 3/iPhone 5/Mali T-604 | Enables/disables an extended time of day animation that includes a mixture of baked and dynamic night lighting. Can't be used when SpecularDirectionalIrradiance=true. | ||
SpecularDirectionalIrradiance | true/false | true - iPad 3/iPhone 5/Mali T-604 | Enables/disables indirect specular directional irradiance from dynamic cube maps. Can't be used when BakedNightLighting=true. | ||
NumShadowMapCascades | 0 - 3, 0 - 2 when BakedNightLighting=true or SpecularDirectionalIrradiance=true | 0 | The number of shadow map cascades. Due to a limitation in the number of GLSL varyings, a maximum of 2 cascades can be used when either BakedNightLighting=true or SpecularDirectionalIrradiance=true. | ||
ShadowMapTextureSize | 0 - max supported texture size | 2048 | The width and height of the shadow map texture. The shadow map texture is divided up according to the number of shadow map cascades, each one being square. For example, two shadow maps are packed into a texture ShadowMapTextureSize x ShadowMapTextureSize / 2. Similarly, three shadow maps each use a quadrant of the shadow map texture ShadowMapTextureSize x ShadowMapTextureSize. | ||
ForceAlwaysUpdateShadows | true/false | false | By default, shadow maps are only generated when either the light or camera change sufficiently which can result in an inconsistent frame rate. Setting this parameter true forces the shadow maps to be updated every frame. | ||
ShowShadowMapCascades | true/false | false | Setting this to true visualises the shadow map cascades by tinting fragments that belong to each accordingly. Fragments are coloured red, green and blue for the first second and third cascades respectively starting at the cascade that is closest to the camera. | ||
ShowShadowMapTexture | true/false | false | Setting this to true renders the shadow map currently being used to a screen-aligned quad in the top left hand corner of the screen. | ||
ShadowMapToolbar | true/false | false | When set to true, a toolbar with various shadow map debugging/visualisation options is shown when the Enlighten menu is opened. | ||
ConstrainCameraMovement | true/false | false | Setting this to true constrains the camera so that it can not move outside of the arches. | ||
LogFPS | true/false | false | Logs the current number of frames per second if set to true. | ||
LogEnlightenUpdateTime | true/false | false | Logs the time taken in milliseconds to perform an Enlighten runtime update if set to true. | ||
AnimateCameraOnStart | true/false | false | Specifies whether the camera animation should begin automatically when the app starts. | ||
AnimateLightOnStart | true/false | false | Specifies whether the time of day animation should begin automatically when the app starts. | ||
ForceUseETCNormalMaps | true/false | false | Setting this to true forces the use of ETC1-compressed normal maps on all surfaces (this looks bad!) | ||
ShowSplashScreenOnStart | true/false | true | Whether or not to show the animated Enlighten splash screen on application start up. | ||
MaxFPS | [0 - 60] | 30 | Specifies the maximum number of frames per second that the app should attempt to render. Fixed at 30 on iOS devices. |
The following App.config example specifies default values for all parameters. Note how it would, however, override the selection of specular directional irradiance over baked night lighting on the iPad 3/iPhone 5 and Mali T-604 devices:
NativeResolutionScaleFactor=1.0 BakedNightLighting=true SpecularDirectionalIrradiance=false NumShadowMapCascades=0 ShadowMapTextureSize=2048 ForceAlwaysUpdateShadows=false ShowShadowMapCascades=false ShowShadowMapTexture=false ShadowMapToolbar=false ConstrainCameraMovement=true LogFPS=false LogEnlightenUpdateTime=false AnimateCameraOnStart=false AnimateLightOnStart=false ForceUseETCNormalMaps=false ShowSplashScreenOnStart=true MaxFPS=30