Cogito, ergo sum
UE2:Cubemap (UT2004)
Object >> Material >> RenderedMaterial >> BitmapMaterial >> Texture >> Cubemap |
- Package:
- Engine
- This class in other games:
- UE2Runtime, U2, U2XMP, UT2003
Creating Cubemaps[edit]
To create ready-to-use cubemap textures, first create the following keybinds in the [Engine.Input] section of User.ini:
NumPad0=set playercontroller bZeroRoll False | set playercontroller rotation (pitch=0,yaw=0,roll=16384) | onrelease shot Cube0_%td_%m NumPad1=set playercontroller bZeroRoll False | set playercontroller rotation (pitch=0,yaw=32768,roll=-16384) | onrelease shot Cube1_%td_%m NumPad2=set playercontroller bZeroRoll False | set playercontroller rotation (pitch=0,yaw=16384,roll=32768) | onrelease shot Cube2_%td_%m NumPad3=set playercontroller bZeroRoll False | set playercontroller rotation (pitch=0,yaw=-16384,roll=0) | onrelease shot Cube3_%td_%m NumPad4=set playercontroller bZeroRoll False | set playercontroller rotation (pitch=16384,yaw=0,roll=16384) | onrelease shot Cube4_%td_%m NumPad5=set playercontroller bZeroRoll False | set playercontroller rotation (pitch=-16384,yaw=32768,roll=16384) | onrelease shot Cube5_%td_%m NumPad6=set playercontroller bZeroRoll True | set playercontroller rotation (pitch=0,yaw=0,roll=0)
Next, run the game in window mode (Alt+Enter toggles window mode at runtime) and set the window size to the desired texture size, e.g. via setres 512x512
. (This must be square and a multiple of 4, better yet a power of 2.) Use the command togglescreenshotmode
to disable the HUD and crosshair and to hide your weapon. Now move to the desired location and let go of the mouse or controller to ensure you won't turn. Finally press the numpad keys 0, 1, 2, 3, 4, and 5 to take the screenshots for the cubemap sides. Pressing the key down sets your rotation, while releasing the key will take the screenshot. Once you're done, numpad key 6 will restore your rotation.
For best results, either enable the best anti-aliasing mode your graphics driver offers or pick a higher screenshot resolution than your desired cubemap size. In the latter case you need to resize the screenshots. Note that the screenshots need to be taken with FOV 90 to work as cubemap. If you don't take them in spectator mode, you will have to make sure your FOV is set to 90. In that case you will probably want to use the command fly
or ghost
to fly around in the map instead of walking.
Properties[edit]
Property group 'Cubemap'[edit]
Faces[edit]
Type: Texture
Array size: 6
The six sides of the cube map. If you use the above method to create your cubemap textures, the indices correspond to the screenshots taken by the numpad keys 0..5.
Internal variables[edit]
CubemapRenderInterface[edit]
Type: pointer
Modifiers: transient