mirror of
https://github.com/open-goal/jak-project
synced 2026-08-06 09:54:10 -04:00
0b799821ed
This adds the blerc data from merc models to the GLB export as shape keys, also including the data from animations. Blender is unfortunately a bit weird about this and only really lets you change what animated weights are used via the NLA track editor by selecting both the corresponding armature animation and then the one for the shape keys. Additionally, due to the way the Blender GLB import works when you have animated weights on a model + animations as actions for an armature, any models that have blerc data get an extra useless empty, but this seems to be harmless. This PR also fixes materials that use texture animations so they now have their base texture in the export, rather than using the default material. Materials now also get named after their base texture for easier recognition.
19 lines
623 B
C++
19 lines
623 B
C++
#pragma once
|
|
|
|
#include <map>
|
|
#include <unordered_map>
|
|
|
|
#include "common/custom_data/Tfrag3Data.h"
|
|
#include "common/util/FileUtil.h"
|
|
|
|
#include "decompiler/level_extractor/common_formats.h"
|
|
|
|
/*!
|
|
* Export the background geometry (tie, tfrag, shrub) to a GLTF binary format (.glb) file.
|
|
*/
|
|
void save_level_background_as_gltf(const tfrag3::Level& level, const fs::path& glb_file);
|
|
void save_level_foreground_as_gltf(
|
|
const tfrag3::Level& level,
|
|
const std::map<std::string, level_tools::ArtData>& art_data,
|
|
const fs::path& glb_path,
|
|
const std::unordered_map<std::string, u32>& animated_tex_output_to_anim_slot); |