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:

ParameterValuesDefaultDescriptioniOSAndroid
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.

(tick)(tick)
BakedNightLighting
true/false
false - iPad 3/iPhone 5/Mali T-604
true - other

Enables/disables an extended time of day animation that includes a mixture of baked and dynamic night lighting.

(warning) Can't be used when SpecularDirectionalIrradiance=true.

(tick)(tick)
SpecularDirectionalIrradiance
true/false
true - iPad 3/iPhone 5/Mali T-604
false - other

Enables/disables indirect specular directional irradiance from dynamic cube maps.

(warning) Can't be used when BakedNightLighting=true.

(tick)(tick)
NumShadowMapCascades
0 - 3,
0 - 2 when BakedNightLighting=true
or SpecularDirectionalIrradiance=true
0

The number of shadow map cascades.

(warning) 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.

(tick)(tick)
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.

(tick)(tick)
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.

(tick)(tick)
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.

(tick)(tick)
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.

(tick)(tick)
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.

(tick)(error)
ConstrainCameraMovement
true/false
false

Setting this to true constrains the camera so that it can not move outside of the arches.

(tick)(tick)
LogFPS
true/false
false

Logs the current number of frames per second if set to true.

(error)(tick)
LogEnlightenUpdateTime
true/false
false

Logs the time taken in milliseconds to perform an Enlighten runtime update if set to true.

(tick)(tick)
AnimateCameraOnStart
true/false
false

Specifies whether the camera animation should begin automatically when the app starts.

(tick)(tick)
AnimateLightOnStart
true/false
false

Specifies whether the time of day animation should begin automatically when the app starts.

(tick)(tick)
ForceUseETCNormalMaps
true/false
false

Setting this to true forces the use of ETC1-compressed normal maps on all surfaces (this looks bad!)

(error)(tick)
ShowSplashScreenOnStart
true/false
true

Whether or not to show the animated Enlighten splash screen on application start up.

(tick)(error)
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.

(error)(tick)

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