Using Bink 2 (Bink2ForUnreal) For Lagless Video Imports in Hades (FULL TUTORIAL)
Support and future updates courtesy of the Hades Modding Discord. Discovery by me ! !!!! ! ! (And discord user red.)
(If you already know how to prepare a file to be targeted by Bink, you can skip ahead to the Bink Settings.)
.bik
files are a kind of highly compressed video file commonly used in game development. Hades, for example, uses pre-rendered .bik
files to animate its 3D.
This guide will cover downloading RAD Video Tools (Bink2ForUnreal), creating a video to replace a .bik
in Hades, properly adjusting Bink 2's settings to stop lag, and modifying the .bik
to work in Hades, since Hades only "supports" .bik
videos in version 2.5, which recent updates do not generate.
To import a .bik
formatted video file into Hades without the lag that had previously stopped the community from replacing video files, you can use either the original RAD Video Tools (Bink 1; less options, will have issues with colors, but you can skip the hex editing step) or Bink2ForUnreal (Bink 2, maximum compatibilty and options, requires extra steps outside of RAD Video Tools, recommended). This guide will be using Bink 2, though we'll cover Bink 1 options when relevant.
Click For Links And Info On How to Download Bink 2 or 1 (free!)
Bink 1 can easily be found for free on the RAD Video Tools site, and Bink 2 is automatically included in downloads of Unreal Engine 5.0. You should be able to find Bink2ForUnreal.exe in even a partial download of the engine. It can also be found elsewhere, if need be.
Bink 2 from Unreal Engine
Bink 1 from RAD Video Tools
Create whatever video you want, and decide on what animation you want it to replace (new animations entirely are out of scope for this tutorial, though with Video Creationcustom SJSON it is very much possible). In this tutorial, we'll be setting the Club Penguin Penguin's dance to be Zag's idle animation.
By going into Hades/Content/Movies/
, we can find the .bik
file that we want—ZagreusIdle_Bink.bik
. It has a corresponding .bik_atlas
file.
(The
.bik_atlas
file contains a header and the bink file's name and resolution. If keeping resolution and filename the same (recommended), the.bik_atlas
file can be safely ignored. If changing resolution, skip ahead to the bik_atlas, but understand that this is literally undocumented territory, and may be really annoying to work with.)
Open RAD Video Tools
or Bink2ForUnreal.exe
and find your desired video! All screenshots in this tutorial will be using Bink 2, but the process is nearly identical in Bink 1.
You'll want to navigate to your Hades folder in Bink 2 (this will likely work for other Supergiant Titles, but this guide was written for Hades) and find its Content subfolder. (If you're having trouble locating that folder, the description of ModImporter explains how to find it.)
Once there, go to the Movies subfolder, and click on your chosen .bik. Then click File info. (You can also, for fun, play the file, or, for useful, convert it to an MP4, PNG sequence, or anything else.)
(In this example, we scroll down to findZagreusIdle_Bink.bik
.)
(Don't mind the extra copies of ZagreusIdle_Bink.bik
- but this is actually a good opportunity to remind you about backing up any game files you modify!) Before taking any further steps, you should rename whatever file you're planning to modify to something like nameoffile_BACKUP.bik
in the photo so that it won't be affected later in the process.
Clicking on File Info will make a screen like the below visible:
Take note of the width, height, and number of frames. Zagreus's idle animation is 128 pixels wide, 224 pixels tall, and has 3,840 frames of animation. (We will get to the frames of animation.)
Our chosen source gif has 104 unique frames, and is 100 pixels wide and 97 pixels tall, but we're targeting a resolution that does not match that.
In our example, I'll open the gif in my editor of choice (Photopea.com), though of course you can edit your source file however you want.
Video Preparation
NOTE! This gif has some frames last longer than others, which means that importing the gif by itself will lead to only the unique frames being included in the
.bik
file!. Using ezgif, I redid the timings and cloned frames in order to have them export in sequence, one-per-frame, but using the gif as linked above will not work! I've attached a zip file to this repo with the uncropped PNG sequence - just import them all into Photopea at once, put all the layers into one folder, and then the guide should be identical.
(...and then click Fit The Area. This tells the image to take up exactly as much space as it can: no more and no less.)
(You should now be able to click and drag to move all of the layers of the project at once! Move them around so that your character is positioned to be standing roughly where Zagreus was.)
Now Back To Bink
Find wherever you extracted your PNG sequence to, and navigate there in Bink. You're going to want to click once on any of the frames, then click List files....
A dialog box should appear. Click yes if it asks you to treat the png sequence as a single animation, which is the whole point of the prior excersize.
A dialog box should appear. Click yes if it asks you to treat the png sequence as a single animation, which is the whole point of the prior excersize.
Close it...
...save it...
...name it...
...and you've now got a .lst
file ready to be Binked!!!
All that was to get us to this step. If you want to use this .bik
in literally any other game, smash that Bink it! button and use that .bik
to your heart's content.
For Hades modding, read on.
Bink Settings
Find your .lst, .mp4, .mov, or any other source file...
...and Bink it.
You'll be presented with a dizzying array of options.
We only care about the output file name, and the compression settings. Change the output file name to whatever you want, so long as it ends with .bik
. (Since this is going to replace ZagreusIdle_Bink.bik
, I'll name it that, because I would need to change the name again later anyways).
As for the compression settings, there are a lot of options! I don't know what all of them do. But I know what SOME of them do.
- File format:
- Unless you're working with HDR video (you probably aren't) stick with Bink 2.
- Overall data rate settings:
- Probably more important than I think, but it's likely fine. I leave it at 100%.
- Peak data rate:
- This is where that "File info" button from earlier is useful. Target a number around the average and it should be fine.
- Frames to preview:
- I literally have no idea what this does. Probably leave it.
You probably could've left all of those alone, honestly.
SETTINGS YOU MUST CHANGE
- Click for alpha plane options
- You are more than likely using a transparent background. Click on this checkbox, and then click "leave alpha plane unchanged." That should work fine.
- Compress audio
- You can uncheck this one, because there's no audio in your video, lol. It'll help with speeding the process up.
- Set video slices options
- Hades uses two slices. This option is only be present in Bink 2 - it is not necessary, but it might help with issues.
In order to not have your .bik
look washed out, also disable deblocking and VAQ. Doing so is exclusive to Bink 2.
THIS IS THE MOST VITAL PART
- Key frame control
- Type in a number in the "Key at least every" box. For this animation, it's 15.
You can find out what number you want by going out of the "Bink it!" window and clicking "Analyze file."
Use the mouse wheel to scroll in, and count how many frames exist between the evenly spaced red dots. In this case, there are 15 frames (as delinated by numbers on the bottom axis), so that is what we write in the keyframe settings.
Double check that your file is being saved as a .bik
... and smash that MF Bink button.
Congratulations! You now have a .bik
file.
If you're using Bink 1, you're done! Drop it into the Movies folder in your Hades game, use it in your Mod Importer mod, and enjoy the... washed out colors!!!!! But no lag, eh?
Skip ahead to SJSON Tips to properly configure your frame rate, if your source video has a different one than your original one.
If you're using Bink 2, read on.
Hex Editing
The problem with Bink 2 is that it's too good.
No, really. Bink 2, as provided by Unreal, generates files in the "Bink 2.8" video format. Hades will only read files in the "Bink 2.5" video format.
All Bink 2.5 videos have a header in hex that looks like this:
Whereas our Bink 2.8 videos all have a header in hex that looks like this:
Damn, right? Game over.
But what if you could...
Just reach out and...
...use the CLI tool developed by the Mass Effect Legendary Edition community...
...or download Visual Studio Code and then install the offical hex editor extension and then just.
Make that 6E in hex (the letter n in ascii)
Into 6A in hex (the letter j in ascii)
And save your file and have it match, and have Bink and Hades think your video is Bink 2.5?
...
Yeah, so you can literally just do that.
Yay!!!!!!!!!!
MOVING RIGHT ALONG
Wait, seriously? That was actually it?
Yeah.
Sheesh. Keyframes and version numbers.
That's the tl;dr right there.
Here're gifs of the first working Zag replacements made with Bink 2:
You're gonna need to do some SJSON stuff to get it working right if you don't have the same number of angles and frames as the original gif, but it's 2:30 AM, and if you're familiar with SJSON edits, you can figure it out. The bink shenanigans are over..... for now.
I'll add sections about the .bink_atlas
and recommended SJSON values to look at soon, but this should be enough to get you started!