Qfg5model is a small command-line program to export and import textures and meshes from Quest for Glory 5. The current release also supports importing higher resolution textures and meshes.
The textures component was created by GMFattay (with contributions from others), and the meshes component was created by richardbrucebaxter.
- 1 High Resolution Mesh/Texture Downloads
- 2 Exporting & Importing textures and 3d meshes using qfg5model
- 2.1 Extracting a MDL file for qfg5model
- 2.2 Texture Upgrades using qfg5model
- 2.3 3D Mesh Upgrades using qfg5model
- 2.4 Software Downloads
- 2.5 Examples
To install the high resolution models, just copy the extracted DATA/mdl folder (files) to the [QFG5 installation folder]/Data/mdl folder. QFG5 will then load these models instead of its original versions (hdnw.SPK).
High resolution meshes (does not include high resolution textures);
High resolution texture for Hero (MDL and PSD source);
You can extract MDL files files from SPK archives using Game Extractor. The MDL files are located in the hdnw.SPK archive.
Put any modified MDL files under [QFG5 installation folder]/Data/mdl and the game engine will load the modified files over the original files.
Usage: qfg5model <input file> <output file>
- To export MDL to BMP, set input file
.MDLand output file.BMP - To import BMP to MDL, set input file
.BMPand output file.MDL - To export MDL to HAK, set input file
.MDLand output file.HAK - To import HAK to MDL, set input file
.HAKand output file.MDL
HAK = 3D mesh (to generate high resolution mesh use hakenberg subdivision)
The current software release is available here: qfg5modelDevel-08March2013cSMALL.zip
- Extract an MDL file from a QFG5 .SPK archive:
- Ensure Java Runtime Environment (JRE) is installed (java.com/en/download/index.jsp, e.g.
jre-7uX-windows-i586.exe/x64.exe) - Download and install WinRAR (http://www.rarlab.com/download.htm e.g.
wrar420.exe) - Download QFG5 SPK plugin Plugin_SPK_2.zip
- Download and Install Game Extractor extract_201.exe - may require administrator privileges
- Use WinRAR to open
[Game Extractor installation folder]/GameExtractor.jar, and add filePlugin_SPK_2.class - Run Game Extractor - may require administrator privileges (right click - run as administrator)
- Open
[QFG5 installation folder]/Data/HDNW.SPKwith Game Extractor - Find and extract an MDL file (eg
mdl/010.MDL)
- Download and install qfg5model:
- Download and install the latest version of
qfg5model.exeqfg5modelDevel-08March2013cSMALL.zip- To compile it yourself use MS Visual C++ 2010 (open
qfg5model.sln, and Build All / click F7)
- To compile it yourself use MS Visual C++ 2010 (open
- Create a backup of original MDL file (
copy 010.MDL 010original.MDL) - Place
010.MDLin the same folder asqfg5model.exe
Here is an example of how to upgrade a model's skin (e.g. 010.MDL):
- Extract an MDL file for qfg5model (e.g.
010.MDL) [see above] - Upgrade the model's texture using qfg5model:
- Open Windows command prompt (Start - search - cmd)
cd [qfg5model.exe installation folder]qfg5model.exe 010.MDL 010.BMP- Enhance
010.BMPusing an image editor (e.g. Photoshop/PSP/GIMP) and increase its resolution- (Ensure to save the image back to a 256 bit palette. E.g. save the original 256 color palette, perform image touch ups, then reapplying it)
qfg5model.exe 010.BMP 010.MDL
- Install the MDL File and play QFG5:
- Copy the MDL file to the
[QFG5 installation folder]/Data/mdlfolder (create this folder if it doesn't exist) - Play the game
Example Screenshots;
Here is an example of how to upgrade a model's 3D Mesh (e.g. 010.MDL):
- Extract a MDL file for qfg5model (e.g.
010.MDL) [see above] - Extract the HAK file from the MDL file:
- Open Windows command prompt (Start - search - cmd)
cd [qfg5model.exe installation folder]qfg5model.exe 010.MDL 010.HAK- Note this will generate HAK files for each submesh within
010.MDL; eg010-0-footleft.hak
- Note this will generate HAK files for each submesh within
- Convert HAK file using Hakenberg subdivision software:
- Download Hakenberg software. The Hakenberg
mesh3d.exe/subdiv.exeprogram can be downloaded along with the source code on their website - Either a) use
subdiv.exestraight from subdivision.zip [untested]) or b) compile a version ofmesh3d.exefrom the source code (volutil.zip) using Visual C++ 2010- To compile one's own version of the Hakenberg subdivision software:
- Create MS Visual Studio 2010 console project
- import relevant
.cpp/.hppfiles - Build All / click F7, and manually fix up all compilation errors;
- Comment out all error throwing template references; eg
template <class type> array<type>::array(char *fn) - In
array.hpp, comment out this line;//if (array_output) cout << fn << " ->\t" << *this;
- Comment out all error throwing template references; eg
- Open Start - All Programs - MS Visual Studio 2010 Express - Visual Studio Command Prompt (2010).
- Note this will enable use of
cl.exe(the VS compiler) withincompile.bat. The software must be compiled usingcl.exeto use it (else it may crash).
- Note this will enable use of
cd [mesh3d.exe installation folder]compile.bat
- To compile one's own version of the Hakenberg subdivision software:
- Execute
subdiv.exe/mesh3d.exemanually or create and execute a script (e.g. qfg5modelHAKconversionExampleScript.bat)- High resolution example:
mesh3d.exe 010-0-footleft.hak b s - Ultrahigh resolution example:
mesh3d.exe 010-0-footleft.hak b s s- Note this will generate
.hak.outfiles
- Note this will generate
- High resolution example:
- Import the HAK(.out) files into the MDL file
- to prevent having to rename the
.hak.outfiles back to.hakyou can uncomment#define MDL_DEVEL_IMPORT_HAK_FILE_EXPECT_APPENDED_DOT_OUT_TO_FILE_NAMEinstdafx.h(and recompileqfg5model.exe) qfg5model.exe 010.HAK 010.MDL
- Perform manual touch-ups to high resolution mesh (e.g. nose shape);
- Create a backup of the new high resolution MDL file (
copy 010.MDL 010highres.MDL) - locate the high resolution .HAK(.out) files generated by
mesh3d.exe - export high res LDR files from the high resolution MDL file (
qfg5model.exe 010.MDL 010.HAK)- (note this will also export a new set of high resolution HAK files if the original ones generated by mesh3d.exe are not available)
- open the LDR file corresponding to the problematic submesh with LDView (e.g faceX), and identify which polygons/vertices need modification (use LDView in conjunction with a text editor, e.g. TextPad, to determine the specific nature of those modifications, e.g. move vertex XYZ by +q in the Y direction)
- manually apply these modifications to the corresponding high res HAK file (using a text editor)
- reimport the (touched-up) high res HAK files into the original MDL file
copy 010original.MDL 010.MDLqfg5model.exe 010.HAK 010.MDL
- Install the MDL File and play QFG5:
- Copy the MDL file to the
[QFG5 installation folder]/Data/mdlfolder (create this folder if it doesn't exist) - Play the game
The latest software/source (qfg5model.exe);
Batch scripts;
Note the following examples were generated before face geometry touch-ups were applied.
Submodel screenshots (HAK/LDR);
- qfg5modelWithHakenberg3dMesh-medResDemo.gif
- qfg5modelWithHakenberg3dMesh-hiResDemo.gif
- qfg5modelWithHakenberg3dMesh-ultraHiResDemo.gif
Short in-game animations (<2MB);
-
qfg5modelHighResolutionMeshExampleAnimation2.gif
Example in-game screenshots;
- batty1.png
- cerberus1.png
- guards1.png
- hippie.png
- katrina.png
- ogres2.png
- pegasus1.png
- pegasus2.png
- rakeesh.png
- statue1.png
- town1.png
- town2.png
- wolfie1.png


















