mirror of
https://github.com/open-goal/jak-project
synced 2026-08-04 09:09:52 -04:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user