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

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

Post by id-daemon »

NFS Heat.

The latest and most advanced game, with lots of cars and character combinations. All static models also supported.
Usage is almost same as 2042 tool, read it here - viewtopic.php?p=69368#p69368
Doesnt matter which oodle version the game uses, just take the one you have, and rename it to oo2core_8_win64.dll

1. Dump the game with TOC tool. If you also want patch, first dump patch with toc_heat_patch.exe, then main game with toc_heat.exe. This is because tool will NOT overwrite files, so patch first, then base game. Dont forget to change path in the .INI for "patch" or "data" folders.

2. Convert models with Fb_NFS_Heat.exe

Image

Image

Image
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 »

NFS Heat tool updated.

Now dumper tools add metadata to resource names, so you can export meshes with inline geometry (not in external chunk, but in meshset itself)
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 »

Anthem dump/models tools

Usage is the same as NFS Heat, actually dump tool IS actually same tool, just renamed.

Image

Image

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

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

Post by id-daemon »

Map tool for NFS The Run.

First version, may be improved later. Most map objects properly placed, including those using havok and blueprints. Terriain not supported yet.

1. You have to dump the game, for example with this script: https://github.com/NicknineTheEagle/Frostbite-Scripts (use frostbite 2 version).
Then merge chunks with bundles/chunks. Duplicated chunks inside bundles are not needed, so you can skip or overwrite them.
Also merge EBX and RES folders inside bundles, to place them all in the root of bundles folder.

2. Edit the included INI file with paths to your dump.

3. Run fb_maps_run_db.exe tool once, it will scan whole dump for meshsets and blueprints, so later maps can be converted fast, without the need to go into whole tree of assets. This will take a few minutes. After that, 2 files will be created: bp.db & meshnames.txt, which need to stay in the same folder for main tool to work.

4. use fb_maps_run.exe (main map tool) to convert maps. Drop any EBX on it, use in command line with 1 parameter, or create a batch.
Maps are in \_c4\levels\ folder. Most objects (such as roads and buildings) are in "level..." files, but also many objects in "layer..." and other smaller files inside subfolders.

Image

Image

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

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

Post by id-daemon »

The python script above dumps chunks with dashes. For example: 1015579a-35ae-4827-95f9-71e720fa3ed1.chunk
To make them work with this map tool, you need to rename them after dump (using some automated tool)
or make a little change in the script (dbo.py file), so they will be dumped without dashes, remove these:

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

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

Post by id-daemon »

Working on terrains.
Frostbite terrains use different level of detail for each square.
You can see here how it looks. Each of these squares (from biggest to smallest) is 128x128 height map.

Image

Image

Image

Image
Ascend_Killer
Posts: 1
Joined: Sat Mar 05, 2022 5:50 pm

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

Post by Ascend_Killer »

id-daemon wrote:Battlefield 2042 tool.

Image

Dumping the game

1. Change paths in the .INI to your folders. Set parameter on the 3rd line to only dump "ebx" "res" or "chunks". If no parameter (empty line), it will dump them all.
2. Place oo2core_8_win64.dll from the game to the same folder
3. Drag any .TOC file onto toc2042.exe, and it will extract everything that was listed in that file

Converting models

bf2042_mesh.exe <meshset>
or
bf2042_mesh.exe <meshset> <skeleton>

Tool will find the needed chunk automatically in the same folder, "chunks" subfolder, or folder structure created by dumper.
If no skeleton name provided, tool will ask for default _soldierskeleton.ebx skeleton (which you can find in globals.toc)


Hi daemon ! Huge thanks for your tools, it's working like a charm !
I'm trying to convert the textures files from BF2042 to DDS files and I see that you actually have textures on ur models. Can you explain how did you do ? Would be insane to have those textures !

Thanks in advance !
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Here are 2 more tools for NFS "the Run" I forgot to post.
These are for special DLC cars from XBOX and PS3.

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

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

Post by id-daemon »

Map tool for SWBF2.

Image

Image

Image

Most map objects properly placed, including those using havok and blueprints. Also basic terrain support.

1. Dump the game

You can use existing python script, but its slower and dumps almost every texture twice with different names, producing about 30 GB of useless files.

I recommend using attached toc_swbf2.exe - set desired parameters in ufbe.ini and run it.

Parameters are:
- game path
- dump path
- asset type

Asset type can be "ebx", "res", "chunks" or "all". Anything else (or empty line) is considered as "all".

2. Edit the included MAPS.INI file with paths to your dump.

The other 3 tools need this maps.ini file with 2 parameters: paths to dumped bundles (ebx+res) and chunks.

3. Create database

Run fb_maps_swbf2_db.exe tool once, it will scan whole dump for meshsets and blueprints, so later maps can be converted fast, without the need to go into whole tree of assets. This will take a few minutes. After that, 2 files will be created: bp.db & meshnames.txt, which need to stay in the same folder with EXE for main tool to work.

4. Export maps

Use fb_maps_swbf2.exe (main map tool) to convert maps. Drop any EBX on it, use in command line with 1 parameter, or create a batch.

5. Terrain export

Main terrain data is in .TerrainStreamingTree files for each level. For some levels, these files are small, which means the actual data is in chunks. Sometimes data is in the file itself, in this case it may be big, about 50mb in size.

Drop .TerrainStreamingTree on fb_terrain_swbf2.exe or use command line.

It will export heightmap parts into "hmap" subfolder. As you can see on the pictures above, terrain in frostbite is saved in square parts of different size, organized in a tree-like structure. Some parts may be very detailed, while others not. Tool will only save highest detail level for each square and skip all lower LODs.

So far this first version terrain tool only exports base (heightmap) layer from these files. But they contain much more data, such as terrain masks, normals, textures etc. I can add support for it later.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Map tool set for Anthem.

Most map objects properly placed, including blueprints. Also basic terrain support.

Image

Image

Image

1. Dump the game

Use the new toc_anthem_v3.exe, it was updated since original anthem dump tool, because i found that some rare chunks were not dumped, and they are needed for maps. So if you have dumped anthem before, you need to redump it.

Set desired parameters in ufbe.ini
Parameters are:
- game path
- dump path
- asset type
Notice now there must be no "data" or "patch" in the end of "game path".
Asset type can be "ebx", "res", "chunks" or "all". Anything else (or empty line) is considered as "all".

Then you need to run dump tool on all .TOC files from the game. You can do them one by one as there are not too many, or in a batch, but its important that you must first run it on all .TOC files from "patch" folder, then on all .TOC files from "data" folder.

Tool needs oo2core_8_win64.dll or oo2core_7_win64.dll, just rename it to oo2core_8_win64.dll

2. Edit the included FB_MAPS.INI file with paths to your dump.

The other 3 tools need this fb_maps.ini file with 2 parameters: paths to dumped bundles (ebx+res) and chunks.

3. Create database

Run fb_maps_anthem_db.exe tool once, it will scan whole dump for meshsets and blueprints, so later maps can be converted fast, without the need to go into whole tree of assets. This will take a few minutes. After that, 2 files will be created: bp.db & meshnames.txt, which need to stay in the same folder with EXE for main tool to work.

4. Export maps

Use fb_maps_anthem.exe (main map tool) to convert maps. Drop any EBX on it, use in command line with 1 parameter, or create a batch.

In addition to .ascii export with all baked meshes, it will create a text file with a list of all mesh instances and their 3x4 transform matrices. So if you like, you can make a script for your favourite editor or engine (3dmax, maya, blender, unity, unreal) and place all meshes as instances.

5. Terrain export

Same usage as swbf2 terrain:

Drop .TerrainStreamingTree on fb_terrain_anthem.exe or use command line.

It will export heightmap parts into "hmap" subfolder. As you can see on the pictures above, terrain in frostbite is saved in square parts of different size, organized in a tree-like structure. Some parts may be very detailed, while others not. Tool will only save highest detail level for each square and skip all lower LODs.

6. Mesh export tool

Fb_anthem.exe - this was also included to support the new way of dumping meshsets (no metadata in filename, its included inside file). It also saves exported .ascii/.smd files in the original directory tree. Skeletons will be expected in the tool folder, as before.
HarryAli
Posts: 1
Joined: Wed Sep 07, 2022 4:06 pm

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

Post by HarryAli »

id-daemon wrote:NFS Heat.

The latest and most advanced game, with lots of cars and character combinations. All static models also supported.
Usage is almost same as 2042 tool, read it here - viewtopic.php?p=69368#p69368
Doesnt matter which oodle version the game uses, just take the one you have, and rename it to oo2core_8_win64.dll


Hello there. I downloaded the tool but it doesn't seem working. That command prompt window opens and closes without doing anything. Am i doing it wrong? Is there any brief tutorial? :)
cYcLoNe675
Posts: 1
Joined: Tue Nov 08, 2022 3:53 pm

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

Post by cYcLoNe675 »

HarryAli wrote: Hello there. I downloaded the tool but it doesn't seem working. That command prompt window opens and closes without doing anything. Am i doing it wrong? Is there any brief tutorial? :)
Assuming you have followed the instructions, my guess is that your dragging the .ebx from the bundles folder to the "fb_maps_run.exe" in another window.

Try copying the .ebx file into the "nfs_therun_maps" folder first. Then dragging it onto the .exe
StudioK
Posts: 2
Joined: Sun Dec 25, 2022 3:18 pm

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

Post by StudioK »

deleted
Last edited by StudioK on Sun Jan 01, 2023 11:23 am, edited 1 time in total.
StudioK
Posts: 2
Joined: Sun Dec 25, 2022 3:18 pm

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

Post by StudioK »

deleted
baconman2002
Posts: 1
Joined: Wed Jan 25, 2023 3:38 am

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

Post by baconman2002 »

id-daemon wrote: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.
I have a problem, when I drag the EBX and the mesh files into the Fb_BF4_Mesh.exe, it does nothing
speaker60
Posts: 2
Joined: Sat Jun 17, 2017 6:05 pm

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

Post by speaker60 »

Nm Solved my issue