Page 2 of 10
Re: Deus EX: Mankind Divided .archive
Posted: Sun Jan 08, 2017 6:32 pm
by volfin
aspadm wrote:U2LN wrote:Hey I don't have this game, but if y'all come across Alex Vega or Adam Jensen, can you let me know?
I found only his robo-legs
There small script to import big portion of 3d models. I already look to 20 of 80 thousands .dat files, what I unpack
You must install Volfin's addon to use it
Code: Select all
import os, sys, bpy, import_DeusExMD
k = 1 # Number portion of files
ksize = 1000 # Size of portion (files)
dirname = "C:/your_path" # Path to .dat files
z = os.listdir(dirname)
for i in range((k-1)*ksize,k*ksize):
try:
path = dirname + "/" + z[i]
print(path)
try:
import_DeusExMD.import_DeusExMD(path, bpy.context,True,True,False,True,1.0)
except:
pass
except:
pass
yeah not a bad idea under the circumstances. I wish we had filenames so we knew what things were.

Re: Deus EX: Mankind Divided .archive
Posted: Sun Jan 08, 2017 7:04 pm
by aspadm
volfin wrote:yeah not a bad idea under the circumstances. I wish we had filenames so we knew what things were.

Previos game was also without "human-readable" names. It's game engine's specific...
I think that only way to get correct names is to create a database for all files... But it's very bad way
P.S. Many models that I explore was identical - police suits, as examle - some of them in every 1-1.5 thousand of files.
Re: Deus EX: Mankind Divided .archive
Posted: Sun Jan 08, 2017 7:43 pm
by erik945
This script recursive scan folders, auto import dat files and export to fbx
Code: Select all
import os
import bpy
import fnmatch
folder_ = "E:\\Program Files (x86)\\Steam\\steamapps\\common\\Deus Ex Mankind Divided\\DLC\\runtime\\dlc1\\CF14A45978D4D15C17263FACED58B540.pc_resourcelib\\"
print(folder_)
files_ = []
root = 'E:\\Program Files (x86)\\Steam\\steamapps\\common\\Deus Ex Mankind Divided\\DLC\\runtime\\555\\'
pattern = '*.dat'
for folder, subdirs, files in os.walk(root):
for filename in fnmatch.filter(files, pattern):
fullname = os.path.join(folder, filename)
files_.append(fullname)
for dat_ in files_:
if(dat_[-4:] == ".dat"):
print(dat_)
bpy.ops.object.select_by_type(type = 'MESH')
bpy.ops.object.delete(use_global=False)
for item in bpy.data.meshes:
for scene in bpy.data.scenes:
for obj in scene.objects:
scene.objects.unlink(obj)
item.user_clear()
bpy.data.meshes.remove(item)
try:
bpy.ops.import_scene.deusexmd(filepath=dat_)
bpy.ops.export_scene.fbx(filepath=(dat_[:-4] + ".fbx"))
except Exception:
print("Importing error")
pass
Re: Deus EX: Mankind Divided .archive
Posted: Mon Jan 09, 2017 12:45 am
by aspadm
Thnx
erik945 for script - I use it with small changes(export to .obj, other logging etc.)
volfin,
Wanted to say earlier, but forgot: when I import some models it turns out something like this:

I looked .obj file - or all coordinates of vertex are NaN, or x/y is a large integer and the other coords a small(about 1.) floats.
In
this archive 5 examples of the different size - the original file and converted to .obj. I hope this will help to improve the import script.
Re: Deus EX: Mankind Divided .archive
Posted: Mon Jan 09, 2017 2:34 am
by volfin
aspadm wrote:Thnx
erik945 for script - I use it with small changes(export to .obj, other logging etc.)
volfin,
Wanted to say earlier, but forgot: when I import some models it turns out something like this:

I looked .obj file - or all coordinates of vertex are NaN, or x/y is a large integer and the other coords a small(about 1.) floats.
In
this archive 5 examples of the different size - the original file and converted to .obj. I hope this will help to improve the import script.
Thanks, I'll take a look. It's hard to find examples of every possible format for testing, so this helps a lot

Re: Deus EX: Mankind Divided .archive
Posted: Mon Jan 09, 2017 5:02 am
by volfin
Ok, I added support for all of those model types. There was 4 new types in among those 6 files, so I bet there's more. Let me know if you find any.
Enjoy.
Edit: new version below.
Re: Deus EX: Mankind Divided .archive
Posted: Mon Jan 09, 2017 5:33 am
by U2LN
Noob here, but is it possible there exists a database somewhere already? Maybe some kind of xml file or other?
Re: Deus EX: Mankind Divided .archive
Posted: Mon Jan 09, 2017 8:46 am
by aspadm
volfin wrote:Ok, I added support for all of those model types. There was 4 new types in among those 6 files, so I bet there's more. Let me know if you find any.
Enjoy.
I'm sorry, but as they say in my country: when fixing one you break another.
Models which correctly imported earlier now broken but what was broken now works

And I delete old version of script so I don't have files to compare, sorry.
BTW, thank you for this great job
I think that you incorrectly detect the format of the model. May be you make a version of the script with manually choice of the decoder?
Re: Deus EX: Mankind Divided .archive
Posted: Mon Jan 09, 2017 7:53 pm
by volfin
I had to completely change detection methods, as there are no clear flags. I see what I missed though. This new version should restore what was lost.
Edit: Newer version in later post.
Re: Deus EX: Mankind Divided .archive
Posted: Tue Jan 10, 2017 12:06 pm
by aspadm
volfin wrote:I had to completely change detection methods, as there are no clear flags. I see what I missed though. This new version should restore what was lost.
So I looked to new version of importer and
there new (old?) broken files - all or most of them. Hope that it help again

Re: Deus EX: Mankind Divided .archive
Posted: Tue Jan 10, 2017 6:43 pm
by erik945
I need remove old version plugin before install new?
Re: Deus EX: Mankind Divided .archive
Posted: Tue Jan 10, 2017 9:54 pm
by volfin
aspadm wrote:volfin wrote:I had to completely change detection methods, as there are no clear flags. I see what I missed though. This new version should restore what was lost.
So I looked to new version of importer and
there new (old?) broken files - all or most of them. Hope that it help again

You need to use the latest importer I posted. All of these are loading fine. Perhaps try deleting the old importer and installing the new one fresh.
erik945 wrote:I need remove old version plugin before install new?
See msg above.
Re: Deus EX: Mankind Divided .archive
Posted: Fri Jan 13, 2017 9:55 pm
by aspadm
U2LN wrote:Hey I don't have this game, but if y'all come across Alex Vega or Adam Jensen, can you let me know?
Yeah, I found it!
Model of Adam was one of this "broken files" - it's a file "0000000000000328.dat" about 15MB. But there's no hair and robo-legs - its in another files.
Big thanks
volfin for his great work

Re: Deus EX: Mankind Divided .archive
Posted: Fri Jan 13, 2017 10:11 pm
by U2LN
aspadm wrote:U2LN wrote:Hey I don't have this game, but if y'all come across Alex Vega or Adam Jensen, can you let me know?
Yeah, I found it!
Model of Adam was one of this "broken files" - it's a file "0000000000000328.dat" about 15MB. But there's no hair and robo-legs - its in another files.
Big thanks
volfin for his great work

Ah sweet. Does it have working UVs?
Re: Deus EX: Mankind Divided .archive
Posted: Sat Jan 14, 2017 9:36 am
by Robo911
I've been digging around using these tools but havent been able to find what I'm looking for. Specifically, I'm looking for the furniture in Adam Jensen's apartment because I love that neo-baroque style and I wanted to mess around with it. If anyone can point me in the right direction, i'd be very happy.