WoWs Model Exported
World of Warships 3D model Exporter
Loading...
Searching...
No Matches
Texture application

Functions

void wows_stitch_apply_textures (tinygltf::Model &model, const std::vector< std::string > &geom_order, wows_assets_bin_pdb_t *pdb, const std::string &game_dir, int lod_level, bool excl_damage, int max_tex, std::function< void(int)> progress_cb=nullptr, wows_file_provider_t file_provider=nullptr)
 Attach textures from assets.bin to the materials in a glTF model.
 
void wows_stitch_apply_default_material (tinygltf::Model &model)
 Apply a uniform grey default material to all primitives in a model.
 

Detailed Description

Function Documentation

◆ wows_stitch_apply_default_material()

void wows_stitch_apply_default_material ( tinygltf::Model &  model)

Apply a uniform grey default material to all primitives in a model.

Used as a fallback when texture lookup fails or textures are disabled.

Parameters
modelglTF model to modify in-place.

◆ wows_stitch_apply_textures()

void wows_stitch_apply_textures ( tinygltf::Model &  model,
const std::vector< std::string > &  geom_order,
wows_assets_bin_pdb_t pdb,
const std::string &  game_dir,
int  lod_level,
bool  excl_damage,
int  max_tex,
std::function< void(int)>  progress_cb = nullptr,
wows_file_provider_t  file_provider = nullptr 
)

Attach textures from assets.bin to the materials in a glTF model.

Looks up each mesh section's MFM path via the PDB, locates the corresponding .dds file, decodes it, and embeds the result as a PNG in the model.

Parameters
modelglTF model whose materials will be updated.
geom_orderOrdered list of .geometry file paths that contributed meshes.
pdbOpen assets.bin handle for material lookups.
game_dirRoot resource directory used to resolve texture paths.
lod_levelLOD level to use when selecting render sets (-1 = auto).
excl_damageIf true, damage-geometry render sets are skipped.
max_texMaximum texture dimension; larger textures are downscaled.