Extract merc models into individual glb files (#3632)

e.g. instead of just `beach-foreground.glb` and `beach-background.glb`,
you'd now get:
- `beach/babak-lod0.glb`
- `beach/babak-lod1.glb`
- `beach/babak-lod2.glb`
- `beach/barrel-lod0.glb`
- `beach/beach-background.glb`
- `beach/beachcam-lod0.glb`
- ... (42 other files)
- `beach/windmill-one-lod2.glb`

`common` models are also grouped into their own folder
This commit is contained in:
Matt Dallmeyer
2024-08-16 13:00:12 -07:00
committed by GitHub
parent f2e7606f1b
commit 9426683ae5
3 changed files with 125 additions and 125 deletions
+3 -6
View File
@@ -323,8 +323,7 @@ void extract_common(const ObjectFileDB& db,
if (config.rip_levels) {
auto file_path = file_util::get_jak_project_dir() / "glb_out" /
game_version_names[config.game_version] / "common.glb";
file_util::create_dir_if_needed_for_file(file_path);
game_version_names[config.game_version] / "common";
save_level_foreground_as_gltf(tfrag_level, art_group_data, file_path);
}
}
@@ -361,14 +360,12 @@ void extract_from_level(const ObjectFileDB& db,
if (config.rip_levels) {
auto back_file_path = file_util::get_jak_project_dir() / "glb_out" /
game_version_names[config.game_version] /
game_version_names[config.game_version] / level_data.level_name /
fmt::format("{}-background.glb", level_data.level_name);
file_util::create_dir_if_needed_for_file(back_file_path);
save_level_background_as_gltf(level_data, back_file_path);
auto fore_file_path = file_util::get_jak_project_dir() / "glb_out" /
game_version_names[config.game_version] /
fmt::format("{}-foreground.glb", level_data.level_name);
file_util::create_dir_if_needed_for_file(fore_file_path);
game_version_names[config.game_version] / level_data.level_name;
save_level_foreground_as_gltf(level_data, art_group_data, fore_file_path);
}
file_util::write_text_file(entities_folder / fmt::format("{}-actors.json", level_data.level_name),