Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Deathloop model importer

Post questions about game models here, or help out others!
PeterZ
veteran
Posts: 95
Joined: Sat Sep 17, 2016 4:07 am
Has thanked: 6 times
Been thanked: 82 times

Deathloop model importer

Post by PeterZ »

Image
Image
Based on this blender scriptviewtopic.php?f=18&t=15518&hilit=dishon ... 60#p176066
I rewrite it to support Deathloop.Currently *.bmd6model/*.bmodel/*.edgeskl/*.bwm is supported.
Blender 2.9.2 tested

Code: Select all

2021.9.19 v2:Add .bmodel support
2021.9.21 v3:Add .bwm support
2021.9.21 v4:Fix a bug that fails to import bmd6model StaicMesh
2021.9.27 v5:fix a bug that fails to import *.bwm
You do not have the required permissions to view the files attached to this post.
Last edited by PeterZ on Mon Sep 27, 2021 11:04 am, edited 2 times in total.
rtrman
ultra-n00b
Posts: 1
Joined: Tue Sep 21, 2021 1:07 am
Has thanked: 1 time

Re: Deathloop model importer

Post by rtrman »

Hey, great work.
I can't seem to import weapon models, I get a failure message "Error: Could Not Import"
I'm using the files from .\generated\basemodel\models\equipment\weapon\_asset\[class]\[weapon]\mesh\
Thanks

Edit - console log:
Reading C:\Users\user\Documents\Development\Deathloop\generated\basemodel\models\equipment\weapon\_asset\hnd\hamlet\tech\w_hnd_hamlet.bmd6model...
C:\Users\user\Documents\Development\Deathloop\generated\basemodel\models\equipment\weapon\_asset\hnd\hamlet\tech\w_hnd_hamlet.bmd6model:76890: fatal: end of file

Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 150, in parse
self.do_parse()
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\model_files.py", line 39, in do_parse
self.meshes.append(self.parse_mesh())
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\model_files.py", line 87, in parse_mesh
mesh.vert_weights = self.read_array('16B', mesh.vertex_count)
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 114, in read_array
buf = self.read_bytes(size * count)
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 92, in read_bytes
self.abort('fatal: end of file')
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 80, in abort
raise Exception('Fatal error: could not parse file')
Exception: Fatal error: could not parse file
PeterZ
veteran
Posts: 95
Joined: Sat Sep 17, 2016 4:07 am
Has thanked: 6 times
Been thanked: 82 times

Re: Deathloop model importer

Post by PeterZ »

rtrman wrote: Tue Sep 21, 2021 1:31 am Hey, great work.
I can't seem to import weapon models, I get a failure message "Error: Could Not Import"
I'm using the files from .\generated\basemodel\models\equipment\weapon\_asset\[class]\[weapon]\mesh\
Thanks

Edit - console log:
Reading C:\Users\user\Documents\Development\Deathloop\generated\basemodel\models\equipment\weapon\_asset\hnd\hamlet\tech\w_hnd_hamlet.bmd6model...
C:\Users\user\Documents\Development\Deathloop\generated\basemodel\models\equipment\weapon\_asset\hnd\hamlet\tech\w_hnd_hamlet.bmd6model:76890: fatal: end of file

Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 150, in parse
self.do_parse()
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\model_files.py", line 39, in do_parse
self.meshes.append(self.parse_mesh())
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\model_files.py", line 87, in parse_mesh
mesh.vert_weights = self.read_array('16B', mesh.vertex_count)
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 114, in read_array
buf = self.read_bytes(size * count)
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 92, in read_bytes
self.abort('fatal: end of file')
File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\io_scene_Deathloop\io_utils.py", line 80, in abort
raise Exception('Fatal error: could not parse file')
Exception: Fatal error: could not parse file
Fix it in V4.
More tests are welcome :D
phoondos
ultra-n00b
Posts: 5
Joined: Sat Nov 14, 2020 5:55 am

Re: Deathloop model importer

Post by phoondos »

what about textures?
mariachiscalpi
ultra-n00b
Posts: 2
Joined: Sun Sep 19, 2021 8:53 pm
Has thanked: 3 times

Re: Deathloop model importer

Post by mariachiscalpi »

thanks for all the updates! it'd seem there are a few .bwm files which cannot be imported, pasting a few console logs below:

console wrote:Reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\upper_antenna\upper_antenna_p\upper_antenna_p.bwm...
C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\upper_antenna\upper_antenna_p\upper_antenna_p.bwm:98f52c4: fatal: end of file

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 168, in parse_lazy
self.do_parse()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 279, in do_parse
self.parse_instance_groups()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 435, in parse_instance_groups
self.instance_groups = [ self.read_array_flat('I', self.read('I')) for i in range(count+1) ]
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 435, in <listcomp>
self.instance_groups = [ self.read_array_flat('I', self.read('I')) for i in range(count+1) ]
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 118, in read_array_flat
return list(itertools.chain.from_iterable(self.read_array(spec, count)))
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 114, in read_array
buf = self.read_bytes(size * count)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 92, in read_bytes
self.abort('fatal: end of file')
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 80, in abort
raise Exception('Fatal error: could not parse file')
Exception: Fatal error: could not parse file
Failed reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\upper_antenna\upper_antenna_p\upper_antenna_p.bwm.
console wrote:Reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\tutorial\tutorial_01\tutorial_01_p\tutorial_01_p.bwm...
C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\tutorial\tutorial_01\tutorial_01_p\tutorial_01_p.bwm:fa9e94c: fatal: end of file

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 168, in parse_lazy
self.do_parse()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 278, in do_parse
self.parse_unk_indices()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 428, in parse_unk_indices
self.unk_index_list3 = [
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 429, in <listcomp>
(self.read('I'), self.read_array_flat('I', self.read('I')))
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 118, in read_array_flat
return list(itertools.chain.from_iterable(self.read_array(spec, count)))
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 114, in read_array
buf = self.read_bytes(size * count)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 92, in read_bytes
self.abort('fatal: end of file')
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 80, in abort
raise Exception('Fatal error: could not parse file')
Exception: Fatal error: could not parse file
Failed reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\tutorial\tutorial_01\tutorial_01_p\tutorial_01_p.bwm.
 
DV9 x Drillz
ultra-n00b
Posts: 9
Joined: Sun Nov 08, 2020 4:10 pm
Has thanked: 5 times
Been thanked: 1 time

Re: Deathloop model importer

Post by DV9 x Drillz »

Hey Guys, I was wondering if theres a tool for extracting the models and where I could find it. Can anyone point me in the right direction?
User avatar
CAXX
ultra-n00b
Posts: 3
Joined: Tue Aug 06, 2019 12:44 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Deathloop model importer

Post by CAXX »

Heya, thanks for writing the script! Here are some issues that I've found:
Hair meshes on complex hair don't import correctly
Image
And another thing that I've found is that imported meshes have basically unnamed vertex groups i.e.:
Here's what the skeleton bone names look like
Image
And here are the vertex group names
Image
adrenilanegaming
ultra-n00b
Posts: 4
Joined: Mon Sep 27, 2021 12:54 am
Has thanked: 2 times
Been thanked: 3 times

Re: Deathloop model importer

Post by adrenilanegaming »

im sorry im sort of a noob when it comes to modding, but i installed the addon and now using the import option its just the default files (cfg, resources, etc) do i have to unpack them and then import using the addon or whatnot? right now im very confused

edit - i actually just figured it out
adrenilanegaming
ultra-n00b
Posts: 4
Joined: Mon Sep 27, 2021 12:54 am
Has thanked: 2 times
Been thanked: 3 times

Re: Deathloop model importer

Post by adrenilanegaming »

DV9 x Drillz wrote: Sat Sep 25, 2021 1:04 am Hey Guys, I was wondering if theres a tool for extracting the models and where I could find it. Can anyone point me in the right direction?
you use this tool called "quickbms" http://aluigi.altervista.org/bms/deathloop.bms you can find the deathloop script here
PeterZ
veteran
Posts: 95
Joined: Sat Sep 17, 2016 4:07 am
Has thanked: 6 times
Been thanked: 82 times

Re: Deathloop model importer

Post by PeterZ »

mariachiscalpi wrote: Fri Sep 24, 2021 11:36 am thanks for all the updates! it'd seem there are a few .bwm files which cannot be imported, pasting a few console logs below:

console wrote:Reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\upper_antenna\upper_antenna_p\upper_antenna_p.bwm...
C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\upper_antenna\upper_antenna_p\upper_antenna_p.bwm:98f52c4: fatal: end of file

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 168, in parse_lazy
self.do_parse()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 279, in do_parse
self.parse_instance_groups()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 435, in parse_instance_groups
self.instance_groups = [ self.read_array_flat('I', self.read('I')) for i in range(count+1) ]
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 435, in <listcomp>
self.instance_groups = [ self.read_array_flat('I', self.read('I')) for i in range(count+1) ]
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 118, in read_array_flat
return list(itertools.chain.from_iterable(self.read_array(spec, count)))
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 114, in read_array
buf = self.read_bytes(size * count)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 92, in read_bytes
self.abort('fatal: end of file')
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 80, in abort
raise Exception('Fatal error: could not parse file')
Exception: Fatal error: could not parse file
Failed reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\upper_antenna\upper_antenna_p\upper_antenna_p.bwm.
console wrote:Reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\tutorial\tutorial_01\tutorial_01_p\tutorial_01_p.bwm...
C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\tutorial\tutorial_01\tutorial_01_p\tutorial_01_p.bwm:fa9e94c: fatal: end of file

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 168, in parse_lazy
self.do_parse()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 278, in do_parse
self.parse_unk_indices()
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 428, in parse_unk_indices
self.unk_index_list3 = [
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\model_files.py", line 429, in <listcomp>
(self.read('I'), self.read_array_flat('I', self.read('I')))
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 118, in read_array_flat
return list(itertools.chain.from_iterable(self.read_array(spec, count)))
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 114, in read_array
buf = self.read_bytes(size * count)
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 92, in read_bytes
self.abort('fatal: end of file')
File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\io_scene_Deathloop\io_utils.py", line 80, in abort
raise Exception('Fatal error: could not parse file')
Exception: Fatal error: could not parse file
Failed reading C:\Users\user\Desktop\DEATHLOOP\extracts\maps\campaign\tutorial\tutorial_01\tutorial_01_p\tutorial_01_p.bwm.
 
Fixed in V5.
PeterZ
veteran
Posts: 95
Joined: Sat Sep 17, 2016 4:07 am
Has thanked: 6 times
Been thanked: 82 times

Re: Deathloop model importer

Post by PeterZ »

CAXX wrote: Sun Sep 26, 2021 11:24 pm Heya, thanks for writing the script! Here are some issues that I've found:
Hair meshes on complex hair don't import correctly
Image
And another thing that I've found is that imported meshes have basically unnamed vertex groups i.e.:
Here's what the skeleton bone names look like
Image
And here are the vertex group names
Image
Image
I used "\generated\basemodel\models\character\player\juliana\_asset\body_a01\tech\f_juliana_head_a01.bmd6model" and didn't see the issue while vertex groups are unnamed.

Maybe the file you used is low LOD.
Could you please upload the sample files
User avatar
CAXX
ultra-n00b
Posts: 3
Joined: Tue Aug 06, 2019 12:44 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Deathloop model importer

Post by CAXX »

I used "\generated\basemodel\models\character\player\juliana\_asset\body_a01\tech\f_juliana_head_a01.bmd6model" and didn't see the issue while vertex groups are unnamed.
Okay, I've probably stumbled onto some sort of recompiled meshes :oops:. Importing from the path you wrote results in complete hair mesh, thanks.
That leaves vertex groups, I guess I can rename them manually or find a script that could handle it for me.
Do you have any clue on how to convert texture files? There are a bunch of BMS scripts for this format, but they are made for specific games.
Thanks again!
adrenilanegaming
ultra-n00b
Posts: 4
Joined: Mon Sep 27, 2021 12:54 am
Has thanked: 2 times
Been thanked: 3 times

Re: Deathloop model importer

Post by adrenilanegaming »

Im trying to import the maps from map_wharf_04_0.resources but every time i try to import the .bwm it says in blender "Map files must be imported directly from the game files". What do i do

Im exporting the unpacked files into a folder in my downloads, i tried moving the .bwm to the game directory to no avail.
PeterZ
veteran
Posts: 95
Joined: Sat Sep 17, 2016 4:07 am
Has thanked: 6 times
Been thanked: 82 times

Re: Deathloop model importer

Post by PeterZ »

CAXX wrote: Mon Sep 27, 2021 4:07 pm
I used "\generated\basemodel\models\character\player\juliana\_asset\body_a01\tech\f_juliana_head_a01.bmd6model" and didn't see the issue while vertex groups are unnamed.
Okay, I've probably stumbled onto some sort of recompiled meshes :oops:. Importing from the path you wrote results in complete hair mesh, thanks.
That leaves vertex groups, I guess I can rename them manually or find a script that could handle it for me.
Do you have any clue on how to convert texture files? There are a bunch of BMS scripts for this format, but they are made for specific games.
Thanks again!
If you have imported skeleton before, it will rename vertex groups automatically with the skeleton selected.
I am not familar with texture files, may not be able to process texture files :(
PeterZ
veteran
Posts: 95
Joined: Sat Sep 17, 2016 4:07 am
Has thanked: 6 times
Been thanked: 82 times

Re: Deathloop model importer

Post by PeterZ »

adrenilanegaming wrote: Mon Sep 27, 2021 11:32 pm Im trying to import the maps from map_wharf_04_0.resources but every time i try to import the .bwm it says in blender "Map files must be imported directly from the game files". What do i do

Im exporting the unpacked files into a folder in my downloads, i tried moving the .bwm to the game directory to no avail.
The script will check whether you have the following paths "your_BMS_export_path\generated" and "your_BMS_export_path\generated\decls"
If you have both these paths, it won't show error.
Post Reply