GG Script Guide (UE Viewer)
**UE Viewer**
(c) Konstantin Nosov (Gildor), 2007-2021
Support the development by making a donation:
https://www.gildor.org/en/donate
**System Requirements**
- Windows or Linux operating system
- x86-compatible CPU with SSE2 support
- OpenGL 1.1 (OpenGL 2.0 recommended)
- SDL 2.0 (only for Linux; Windows distribution includes SDL2.dll)
**Supported Games**
UE Viewer supports all Unreal Engine versions (1-4). Over 300 game titles are supported, though some may have limited or no support. Detailed information is available at:
https://www.gildor.org/projects/umodel/compat
**Web Resources**
- Homepage and forum:
https://www.gildor.org/en/projects/umodel
(Russian version:
https://www.gildor.org/projects/umodel)
- FAQ:
https://www.gildor.org/projects/umodel/faq
- Tutorials:
https://www.gildor.org/projects/umodel/tutorials
- YouTube channel with tutorials and news:
https://www.youtube.com/playlist?list=PLJROJrENPVvK-V8PCTR9qBmY0Q7v4wCym
- Documentation:
https://www.gildor.org/smf/index.php/board,9.0.html
**Project Name**
Initially created in 2007 as a test for a skeletal animation system, the project evolved from a "UT2004 model viewer" to "Unreal model viewer," or simply "umodel." After a request from Epic Games, the name was changed to "UE Viewer."
**Quick Start**
Before using UE Viewer for the first time, it's advisable to read the FAQ and watch video tutorials (links provided above).
UE Viewer is primarily a console application with robust command-line capabilities. The simplest way to run it is by typing 'umodel <package_file>.' To view the full list of command-line options, use 'umodel -help.'
You can also drag a package file (.upk, .xxx, .ukx, etc.) onto the UE Viewer icon to launch the application. However, default settings will be applied, which may not work for games requiring specific compatibility options.
A response file can be used to provide command-line arguments. More information is available in the Wiki:
https://github.com/gildor2/UModel/wiki/Response-file
**Graphical User Interface (GUI)**
A simple GUI was added for the Windows version of UE Viewer. It appears when you start the application without arguments, such as by clicking on the icon from Windows Explorer. Note that all command-line options remain functional even in GUI mode.
The startup window appears only if neither a game path nor a package name is specified. It allows you to choose the directory where UE Viewer will look for files (using the '-path' option) and to enable compatibility options. If you specify the '-path' option from the command line, the startup GUI will not appear. To set the path and display the startup GUI, add the '-gui' option to the command line.
The viewer window features a user menu at the top. Review and try the options provided there. Most of these can also be accessed using keyboard shortcuts, which are listed in the menu.
**Viewer Mode**
UE Viewer is controlled using the keyboard and mouse. Press 'H' to view the full list of keyboard shortcuts. Here are some examples:
- PgUp/PgDn: Browse through loaded objects
- Ctrl+S: Take a screenshot to the file 'Screenshots/ObjectName.tga'
- Alt+S: Take a screenshot with a transparent background
- Ctrl+X: Export all objects from the current scene
- Ctrl+PgUp/PgDn: Scroll onscreen texts
- Shift+Up/Down: Change the scene field of view (FOV)
- Ctrl+L: Switch lighting modes
- Ctrl+Q: Toggle visualization of debug information (text, 3D axes, etc.)
- Ctrl+G: Toggle between OpenGL 2.0 (using shaders) and OpenGL 1.1 (no shaders)
- Esc: Exit UE Viewer
Press 'Ctrl+A' to attach an AnimSet to a SkeletalMesh object. Use the '[' and ']' keys to navigate through animation sequences, and press the Space bar to start playback.
**Exporting Psk/Psa**
To import Psk/Psa files into 3ds Max, use the ActorX Importer script, available at:
https://www.gildor.org/projects/unactorx
Announcements thread:
https://www.gildor.org/smf/index.php/topic,228.0.html
Some meshes contain information that exceeds the Psk standard. To accommodate this, the format was extended to include advanced details. Files in this extended format have the '.pskx' extension and cannot be imported into UnrealEd or other applications with ActorX support. Currently, only the ActorX Importer tool supports this format.
**Exporting Md5mesh/Md5anim**
UE Viewer can export skeletal meshes and animations in the idSoftware md5 format. Use the '-md5' command-line option to activate this feature. MeshAnimation and AnimSet objects are exported as multiple 'md5anim' files, one for each animation track. The 'bounds' section in the 'md5anim' file is filled with placeholder data, and the 'hierarchy' section does not contain the actual skeleton hierarchy, as Unreal Engine uses the mesh hierarchy. Some md5 viewers/importers may require the hierarchy information, while others do not.
A 3ds Max importer script for md5mesh/md5anim files is available on the UE Viewer forum:
https://www.gildor.org/smf/index.php?topic=87.0
or here:
https://www.gildor.org/downloads
Originally created by der_ton, this script has been updated by me.
Please note that the Psk/Psa format offers more capabilities, and the ActorX Importer plugin has significantly more features compared to the md5 Importer.
**StaticMesh Export**
StaticMesh export is performed in the Psk format, which was originally designed for SkeletalMesh but is also used by UE Viewer for StaticMesh. The exported mesh will lack a skeleton and vertex influences. To prevent errors, such meshes are saved with the '.pskx' extension. They can be imported into 3ds Max using the ActorX Importer plugin, just like regular Psk files.
**Material Export**
Materials are exported in a custom file format with the '.mat' extension. At present, only the ActorX Importer plugin supports this format. Unreal Engine materials are complex, making it difficult to separate channels like diffuse, specular, and bump. UE Viewer uses heuristics to achieve this, resulting in varying degrees of success. Note that full materials, including GLSL scripts, are not exported.
**Audio Export**
Audio assets cannot be previewed in UE Viewer, as it lacks a built-in sound library. However, sounds can be exported. By default, sound loading is disabled in the options. To enable it, use the '-sounds' command-line option or check the "sounds" option in the startup window. Keep in mind that while a package may contain sound-related objects, not all of them actually include sounds. In UE3, sound objects are SoundNodeWave and SoundWave, and in UE4, they are Sound. In older versions, they are simply called Sound.
Used third-party libraries
~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL - Simple DirectMedia Layer
(c) Sam Lantinga
http://www.libsdl.org/
zlib data compression library
(c) Jean-loup Gailly and Mark Adler
http://zlib.net/
libpng
(c) Glenn Randers-Pehrson
http://www.libpng.org/
LZO data compression library
(c) Markus F.X.J. Oberhumer
http://www.oberhumer.com/opensource/lzo/
libmspack - a library for Microsoft compression formats
(c) Stuart Caie
http://www.cabextract.org.uk/libmspack/
LZ4
(c) Yann Collet
http://www.lz4.org
NVIDIA Texture Tools
(c) NVIDIA
https://github.com/castano/nvidia-texture-tools
PVRTexLib Library
(c) Imagination Technologies Limited
http://www.imgtec.com/powervr/insider/
ASTC encoder
(c) ARM Limited and Contributors
https://github.com/ARM-software/astc-encoder
detex
(c) Harm Hanemaaijer
https://github.com/hglm/detex
ooz
(c) Powzix
https://github.com/powzix/ooz