Frostbite dump / model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Frostbite dump / model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

Tools for fixing frostbite "distorted heads" will be released here.
Also mesh tool can convert ANY model, not only heads.

Currently tested games that can be fixed with this method:
- Dragon Age: Inquisition
- Mass Effect Andromeda
- Battlefield 3
- Battlefield 4
- Battlefield Hardline
- Battlefield 1
- Battlefield V
- Medal of Honor Warfighter
- Star Wars Battlefront 1
- Star Wars Battlefront 2
- Mirror's Edge Catalyst


Video: https://youtu.be/_np_P8PUvfM

Image
Image
Last edited by id-daemon on Tue Feb 08, 2022 5:21 pm, edited 4 times in total.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads" (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

Battlefield 1

This first test version will only work with characters using 3pantskeleton.ebx, it must be in the same dir (for both tools)

Fb_BF1_mesh.exe - mesh extractor

Usage: Fb_BF1_mesh <mesh> <chunk>

Fb_BF1_faces.exe - face fixing tool

Usage: drop VisualUnlock file onto the tool

This will make a small .SMD file with skeleton pose, which will fix the head. Apply transformation to bake it.

To apply transformation:
Load the head mesh, delete its skeleton, then import small SMD (it will actually be new skeleton with 2 poses: initial pose and corrected pose), and connect it to the head.

If you prefer to do it manually, you can edit model SMD file as text file. Open head SMD, scroll down to the "triangles" line, and delete all lines before it (this is the skeleton). Then insert small SMD in the beginning of the file.

Star Wars Battlefront 1 - same 2 tools, same usage, skeleton name: humanmale.ebx


------------------------------------
VisualUnlock files allows to automatically find the needed face asset inside the bank.
Every mesh in ANY frostbite game must have this unlock file. Can be called different. Usually located near mesh.ebx file. Example:
\ebx\characters\sp\ep3_mudandblood\townsend_ingame\sp_townsend_head_ingame_vu.ebx
\ebx\characters\mp\faces\unlocks\mp_faces_ako.ebx

Note that for some characters, these VisualUnlock files may contain asset links not in head, but in teeth, hair or beard instead. There are also some weird cases, where head links to incorrect asset, and the correct one is in hair.

Also in the same dir must be .assetbank file (or files) where you think assets for this face can be.
These are usually biggest bank for the level, located in "res\animations\antanimations\"
You can place ALL banks there, tool will check them all. This can be slow, because banks are HUGE.
Some scripts incorrectly name .assetbank files as ".ANT", in this case you need to rename them.
Last edited by id-daemon on Sun Dec 03, 2017 7:36 am, edited 10 times in total.
testament
Posts: 5
Joined: Sun Jun 11, 2017 6:00 pm

Re: Frostbite "distorted heads" (Battlefield, Battlefront, Mirror's edge, etc...)

Post by testament »

I'd like to test this out but the method is a little vague. How does one get the mesh and chunks unpacked? Is there an updated python dumper tool for the BF games?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads" (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

UFBE 0.2.1

Image

Changes:

- case-insensitive search
- cloth and other "special" meshes (which require no chunks) will now have a number in its name, allowing mesh tool to convert it
Last edited by id-daemon on Sat Dec 02, 2017 7:14 pm, edited 2 times in total.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads" (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

Update. Models extracted with vertex normals.

Note: for some characters, these VisualUnlock files may contain asset links not in head, but in teeth or beard instead.
lyutor1945
Posts: 42
Joined: Wed Feb 24, 2016 4:24 pm

Re: Frostbite "distorted heads" (Battlefield, Battlefront, Mirror's edge, etc...)

Post by lyutor1945 »

Now this extractor works only for BF1 or for other frostbite games too?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

First post updated. Lots of improvements in mesh tools!

IMPORTANT: tool usage changed
Now you only need 1 parameter: meshset name, or just drag the meshset onto the tool. Chunk will be found automatically:

Chunk auto search
The tool will try to find the chunk it needs:
- in the current folder
- in the "chunks" subfolder
- in the directory structure created by dumper script. So for example if you just drop some meshset from "bundles\res" onto the tool, it will find it.
- if it still can't find the chunk, you'll get a message with chunk ID needed

Fixed static meshes
Statics now can be exported. They will still have skeletons, ignore them

Physics bones
Special physics bones will be created and mesh will be weighted to them. Manual bones adjusting may be required for them to work.

XNALara ascii format export with multi-UVs
If you need it with proper rotated bones, import SMD skeleton and connect it to model.

Skeleton read from EXE dir, not current dir
So you can use the tool from any folder, no need to put it next to the meshset file

Skeleton name parameter
For custom skeletons you can run:
Fb_SWBF2_mesh <meshset> <skeleton>
If no skeleton parameter provided, it will expect the default walrus_humanmale.ebx

Cloth meshes
Cloth meshes usually have no chunks. They have data inside of meshset itself. Now they are supported. Important note: the original dumped long name is required to detect the raw data position in the file, so don't rename the file.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

Tools for:
- Battlefield 3
- Battlefield 4
- Battlefield Hardline (same tool as Battlefield 4)
- Medal of Honor Warfighter


With all the newest options (from previous post) and a new face-fixing style for old games:
Since in old games face-fixing assets have proper names, usage is very simple:
Just run the face tool in the folder where you have assetbanks and corresponding skeleton file.
It will find and extract all face-fixing SMDs.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

And for those who don't want to run face tool, ready SMDs for all 4 games.

Here is Medal of Honor WF
Last edited by id-daemon on Sat Oct 28, 2017 4:06 pm, edited 1 time in total.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

And the Hardline
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by Doctor Loboto »

Out of curiosity, does this by any chance work for Plants VS Zombies: Garden Warfare? There's a great deal of models I'd like to get from said game.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

Doctor Loboto wrote:Out of curiosity, does this by any chance work for Plants VS Zombies: Garden Warfare? There's a great deal of models I'd like to get from said game.

No idea. I'd need some files to check that.
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by Doctor Loboto »

I'd be glad to get you some if I knew how to properly extract said game's archives...
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

Too bad. Ok, maybe someday i'll find time to get this game, unpack archives and check the models. But I have too many other games to check.
Doctor Loboto
Posts: 376
Joined: Sun May 31, 2015 2:23 am

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by Doctor Loboto »

Well I have said game myself, but I'm not sure how to properly extract the archives? Last time I searched it utilized an incredibly irksome series of Python scripts. I managed it once but didn't know where to go from there. Is there a new method to do so?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

I have plans for making a new frostbite extractor
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by aluigi »

:D
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

Re: Frostbite "distorted heads", model tools (Battlefield, Battlefront, Mirror's edge, etc...)

Post by id-daemon »

aluigi yes i know you have frostbite bms script, but it's not working with most games, or can't extract files properly, and doesn't extract chunksN.toc files at all. And these chunks are most important for models, textures and sounds.

Also I need more options for fast and custom extraction of files I need for my researches.