This can read basic MDL files (no terrain, shadow, edge geometry, etc.) and export them to OBJ. This will be expanded in future commits to let you export this to an easily readable vertex/index list. This code is mostly based off of xivModdingFramework/Lumina, and just ported to C++. All of it will eventually be refactored as there is duplicate structs EVERYWHERE.
21 lines
No EOL
361 B
C++
21 lines
No EOL
361 B
C++
#pragma once
|
|
|
|
#include <string_view>
|
|
#include <vector>
|
|
#include <array>
|
|
|
|
struct Vertex {
|
|
std::array<float, 4> position;
|
|
float blendWeights[4];
|
|
std::vector<uint8_t> blendIndices;
|
|
float normal[3];
|
|
float uv[4];
|
|
float color[4];
|
|
float tangent2[4];
|
|
float tangent1[4];
|
|
};
|
|
|
|
struct Model {
|
|
};
|
|
|
|
Model parseMDL(const std::string_view path); |