Page 9 of 11

Re: Deus EX: Mankind Divided .archive

Posted: Sun Dec 10, 2017 2:01 pm
by aspadm
Feregorn, thank you for this information. It helps understand, how render works, but I don't know, how data packed. BTW, it help me later.

If somebody need, this is the blender script for loading Tomb Raider hair files (don't need to enter numbers by himself)

Code: Select all

import bpy 
from mathutils import Vector
import struct
 
#w = 1 # weight 
listOfVectors = []
model = open("C:\\Users\\User\\Documents\\test1.hair", "rb")
for i in range(1500):
    arr = []
    for i in range(3):
        buf = model.read(76)
        arr.append(Vector((list(struct.unpack("19f", buf))[:3])))
    
    listOfVectors.append(arr)
model.close()

 
def MakePolyLine(objname, curvename, cList): 
    curvedata = bpy.data.curves.new(name=curvename, type='CURVE') 
    curvedata.dimensions = '3D' 
 
    objectdata = bpy.data.objects.new(objname, curvedata) 
    objectdata.location = (0,0,0) #object origin 
    bpy.context.scene.objects.link(objectdata) 
 
    polyline = curvedata.splines.new('NURBS') 
    polyline.points.add(len(cList)-1) 
    for num in range(len(cList)): 
        x, y, z = cList[num] 
        polyline.points[num].co = (x, y, z, 1) 
 
    polyline.order_u = len(polyline.points)-1
    polyline.use_endpoint_u = True
   
for stred in listOfVectors:
    MakePolyLine("NameOfMyCurveObject", "NameOfMyCurve", stred)
Unfortunately, it don't work with DEMD, but I hope, that I can understand file structure

Re: Deus EX: Mankind Divided .archive

Posted: Mon Dec 11, 2017 3:40 pm
by synthosc
aspadm wrote:Feregorn, thank you for this information. It helps understand, how render works, but I don't know, how data packed. BTW, it help me later.

If somebody need, this is the blender script for loading Tomb Raider hair files (don't need to enter numbers by himself)
what happens when you import a model, the hair mesh is missing or not correctly laid out?

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 12:36 pm
by Gaffers
Hi, im a bit of a noob to this but i want to get the 3d models for adams augmentations from the aug menu but im having trouble getting the DEMD database.exe to unpack all the runtime folders, it gets to around half way then comes up with the error "looks like the base conversion failed". im not sure if there is something im doing wrong but im following the help_en.html. is there something im missing and could you explain if there is? Thanks

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 12:53 pm
by aspadm
My program show this message when converter (Sir Kaine's DEMDextractor) return non-zero code or if it not create "NameMap.txt".
Looks like converter have some troubles with archives from the latest version of game. I use very old version (~month from first release in steam) and it works well.

You can extract game files using Sir Kaine's program manually, and open unpacked database in my program after that.

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 1:20 pm
by Ghosterer
Hi

I used "DEMD Databse" to extract all data, but it failed after a few minutes (1476 folders extracted for almost 7650 available).
So i extracted the whole 7650 with QuickBMS, but i can't read data with DEMD (for OBJ and texture extraction) because of no "NameMap.txt" "ExternalResources.txt" "ContainerNameMap.txt" "ResMap.bin".

is there any way to generate them from actual extracted data ?

Thanks for your reply !

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 1:31 pm
by aspadm
QuickBMS script not give names for extracted files + it decompress some types wrong.

You can try to unpack files using Sir Kane's extractor, and if (when) error occure just remove file that cause error and restart extractor (of cource, some data will be missed in my app).
Or you can try to tell him (Sir Kane) about this problem :)

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 4:04 pm
by Ghosterer
Thank you for the reply.
The problem is that it seems QuickBMS extract data from .archive (from runtime folder) which is larger and contain the whole obj and textures files, while "DEMD Database" seems extracting data from the ".pc_headerlib" folders (data extracted from DEMD Databse is the exact content from those folders).

Am i right ?

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 4:16 pm
by aspadm
Firstly, my app don't extract anything, it's just run 3rd party console program (DEMDextract by Sir Kane) ;)

Secondly, all variants unpack files from .archive, it need about 23gb. But Sir Kane's extractor also use .pc_headerlib files to create index with names (NameMap.txt) which is used in my program.

QuickBMS script unpack some files incorrectly, I saw it by myself when writing texture converter. It cut or make files too long.

P.S.
There are piece of code that runs convertion

Code: Select all

    // unpacker - full path to DXMDExtract.exe
    // game_folder - user input, runtime folder
    // path - user input, folder for storing extracted base
    res = subprocess.call([unpacker, game_folder, path], shell=False)
    if res != 0 or not os.path.isfile(path+"NameMap.txt"):
        error_mess = QMessageBox.critical(
            None, app.translate("ConvertError", "Convertion error"),
            app.translate("ConvertErrorText",
                          "Looks like base convertion failed.\nCheck your actions and/or read help."))

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 4:29 pm
by Gaffers
does this mean the DEMD database.exe wont work with the new version of mankind divided unless sir kane makes it or is there a work around because i tried to open the extractor from the tools folder but it closes straight away.

Re: Deus EX: Mankind Divided .archive

Posted: Fri Dec 22, 2017 4:35 pm
by aspadm
Gaffers wrote:does this mean the DEMD database.exe wont work with the new version of mankind divided unless sir kane makes it or is there a work around because i tried to open the extractor from the tools folder but it closes straight away.
First one. If Sir Kane fix DEMDextract, my app will be work again

Window closes because you need to open program in console (shift + rmb in folder with program, after that type: DEMDextract.exe "full path to runtime folder" "full path to export folder")

Re: Deus EX: Mankind Divided .archive

Posted: Sat Dec 23, 2017 1:33 pm
by Gaffers
I messaged Sir Kane to see if he can fix it but ive used the extractor manually through command prompt and have been able to get all the files and name tree on your Deus ex Database.exe. Thanks guys

Re: Deus EX: Mankind Divided .archive

Posted: Sat Jan 20, 2018 8:55 pm
by aspadm
Ok guys, looks like .linkedprim files now with working UVs :)

Image

Updated version below

If you use my DEMD Database, you need to replace "__init__.py" and "import_DeusExMD.py" files in folder "tools\Blender\2.78\scripts\addons\io_scene_DeusEx-MD" by new version. Closing the program is not necessary, the update will work right away.

If nothing change, I'll look at rig data.

Re: Deus EX: Mankind Divided .archive

Posted: Sun Jan 21, 2018 7:22 pm
by volfin
Aspadm came to me with the idea for his fix, but I wanted to implement it in the right way. I guess in his enthusiasm, He went ahead and released his version. I however recommend you use this version, as it integrates the fix so as to not break other existing formats.

I thank Aspadm for his efforts in finding a solution.

Re: Deus EX: Mankind Divided .archive

Posted: Wed Feb 14, 2018 6:36 pm
by MikkelMikkelsen
You guys are doing really neato work

Re: Deus EX: Mankind Divided .archive

Posted: Tue Feb 20, 2018 12:10 pm
by iero79
Hello friends.
I don't know English, so I'm using an online translator to communicate with you.
I'll try to be brief.
I know that this thread has not been answered for a long time, but I think it is the most suitable for receiving help.
I'm trying to understand everything they say, but it's impossible.
What I try to do is NOT extract 3d models and then edit them.
I would be interested in extracting the load animation, and saved from games. Yes, the one that is a triangle that turns on itself, and makes like mini triangles, in a loop.
Since I can't do it, because I don't know what tools I have to use either, I hope you'll help me, at least tell me which tools, and I'll find them myself.
I have managed to extract an animation from the bk2 videos, but it doesn't work for me, it has very little definition, I imagine that in the pc_headerlib files should be the other 2 or 3 animations remaining.
Thank you, and a greeting.

Translated with www.DeepL.com/Translator