Files
jak-project/goalc/build_actor/common/MercExtract.h
T
Hat Kid c476b84182 custom models: option to copy mod/eye draws from original model (#3800)
Two new flags were added to the Blender plugin to allow reusing the mod
and/or eye draws of the original model that is being replaced. Works
pretty well for eyes, but the blerc draws can cause some Z-fighting with
the non-moving parts of the model.

Also a small refactor to the merc replacement code to de-duplicate some
code by moving stuff to `gltf_util.cpp`.
2024-12-09 20:49:56 +01:00

23 lines
976 B
C++

#pragma once
#include "common/util/gltf_util.h"
#include "goalc/build_actor/jak1/build_actor.h"
void extract(const std::string& name,
gltf_util::MercExtractData& out,
const tinygltf::Model& model,
const std::vector<gltf_util::NodeWithTransform>& all_nodes,
u32 index_offset,
u32 vertex_offset,
u32 tex_offset);
void merc_convert(gltf_util::MercSwapData& out, const gltf_util::MercExtractData& in);
gltf_util::MercSwapData load_merc_model(u32 current_idx_count,
u32 current_vtx_count,
u32 current_tex_count,
const std::string& path,
const std::string& name);
std::vector<jak1::CollideMesh> gen_collide_mesh_from_model(
const tinygltf::Model& model,
const std::vector<gltf_util::NodeWithTransform>& all_nodes,
int joint_idx);