This is a copy of IAmNotASpy and PoueT's model tool, with a bunch of new features:
Both the importer and exporter treat the material name Material: Default Material
specially: it becomes no
material on export, and a lack of material on import is replaced with that. Otherwise, the exporter creates
a dummy material for each material name in the Diesel model. The importer doesn't care about the precise
definition of materials, only their names.
Exporting preserves the object hierarchy, and includes partial rigging support: bones and weights should be exported, but validating glTF parsers may complain about non-normalised weights, and whether or not meshes stay attached to their skeletons is a bit iffy.
Importing is designed so you don't need a modelscript so much:
Because GLTF dictates a 1m scale, and Payday 2 uses a 1cm scale, the exporter accounts for this (this does have the downside that if you're importing into Blender bones and empties are drawn much too big).
Format | Import | Export |
---|---|---|
OBJ | ✓ | ✓ |
DAE | ✓ | |
GLTF | ✓ | ✓ |
Data | DAE | GLTF In | GLTF Out |
---|---|---|---|
Triangles | ✓ | ✓ | ✓ |
UV channels | One | ✓ | ✓ |
Vertex colours | ✗ | ✓ | ✓ |
Vertex weights | ✗ | ✓ | ✓ |
Material slots | ✗ | ✓ | ✓ |
Object hierarchy | ✓ | ✓ | ✓ |
Bones | As objects | As objects | Partial |
Skinning | ✗ | Ignored | Partial |
Partial bone/skinning support refers to the result not being read sensibly in all implementations.
The GLTF importer completely ignores skinning data, so the results will be odd as well as effectively unrigged.
Diesel very rarely stores actual names of things if it can store a hash of the name instead, so a list of
names is needed in order to present something readable names instead of just large numbers. On export anything
not in the list will be written as a number, while the GLTF importer will assume any name that's a valid
unsigned long
is the result of that process.
A copy of Luffyyy's version of the hashlist is included; the
tool looks for files whose names include, case insensitively, hashlist
or hashes
, in the current directory
and next to the executable. Any it finds are interpreted as lists
of unhashed names, one per line. If you change hashlists you will need to restart the tool in order to pick
up the changes.
This program is Free Software under the terms of the GNU General Public Licence, version 3. A copy of this licence is distributed with the program's source files.
As an exception to the GPLv3, you may use Autodesk's FBX SDK as part of this program, and you are not required to provide that under the GPL (since it is impossible to do so, and would prevent binary redistribution).
If you are using this exception, you must ship the FBX SDK dynamically linked (not statically linked), and you must provide the entire rest of the program under the GPLv3 with this exception.
If you wish, you may also delete this exception from modified versions of the software and use the plain GPLv3.