It is possible to generate efficient planar reflections on planar surfaces using Image Based Reflections, and these have their own actor type and process. This can include variable reflectivity, but is best for static lighting. For dynamic actors, a shadow plane must be included where the reflection will occur. In this recipe we will make a wet floor which reflects in some places more than others.
Enabling DirectX11
will be necessary for some users (depending on future updates to UDK). To do this, open in ConTEXT C:UDK~EngineConfigBaseEngine.INI
, search for AllowD3D11, and if you find that it's set to False
, change it to True
. A couple of lines below that you'll also see AllowImageReflections=True
, hopefully. If it isn't set to true, try setting it, but actually if it's not there could be a larger issue to solve.
In the properties for the icon which starts your UDK, for instance, in the Windows Start menu, in the Unreal Development Kit category, where it says UDK Editor, edit the Target command line
so that -D3D11
is appended to the line C:UDK~BinariesUDKLift.EXE editor -D3D11
. It is helpful to append -log
after it also.
When you re-launch UDK you will know what version of DirectX UDK is using by looking at the top of the editor where it says Unreal Development Kit (64 bit, DX11) … or DX9 . If it says DX9 perhaps you should look closely at your hardware and system.
Assuming that everything is okay on this score, open Packt_09_IBReflect_Start.UDK.
World Info has some properties that allow specifying reflections coming from an infinitely distant hemisphere over the level. This lets us add ambient reflections that appear like they are coming from the distance, and to bring out the detail that the shadowing methods provide. You have to set an ImageReflectionEnvironmentTexture , which is a panoramic environment texture for image reflections. It looks like a regular spherical environment map but the ground portion is cut off so that the image content's ‘horizon' is along the bottom of the image (V = 0) and straight up in world space is along the top (V = 1). The U direction of the texture then corresponds to rotation around the Z world axis.
The look of this kind of panoramic projection (which is a dome really) is something similar to the next screenshot. We've made a rough outline over the example that UDK provides in order to indicate the typical pattern that you'd see in this kind of projection.
3.15.2.78