BG3 Toolkit Moonglasses Movie Tutorial
The background for the BG3 Toolkit Movie Tutorial is that I discovered that much like in DOS2, the Osiris scripting in BG3 allows one to call on pre-recorded movies. DOS2 makes use of this in the intro, transitions between acts and in the epilogue scenes.
In BG3, there are a total of 3 movies: A splash screen, the intro movie before character creation and directly after character creation. Movies are not used otherwise in the game.
We wanted to ✨bring movies to BG3 modding ✨. Movies of all sorts are a excellent story telling tool, allowing animation that would be impossible to do using the game's engine. In our example, we created a pre-rendered CGI animated intro, but modders could also use this to import hand-animated introductions, claymation or even live action video in their mod.
[youtube]9Hh8N3jAlbM[/youtube]
Before you can import video or audio into the game, they need to be in the correct format. You can see my previous guide on how to make audio files like MP3s and Wav files into .Wem files here (LINK).
The video also needs to be in the correct format. Like most video games, video for Baldur's Gate is compressed into a bk2 file. This is done using a free software called Bink Video, which can be downloaded here. Once installed, select the mp4 video from your files, then click "Bink It" and continue with the default settings.
However, even with the correct file types, there was still a problem: Currently, the Toolkit with Moonglasses breaks compression of audio. This means that in order to have audio that plays in your .pak, you need to unpack and repack the .pak exported from the Toolkit using a tool like LSLib, which can be downloaded here. Ironically, this process breaks movie .bk2 files, even without compression.
Fellow modder Eli Cash and I spent about 3 months trying to figure out how to fix this — admittedly, a lot of this time was due to Eli making his fantastic movie showcase sequence, visualizing a potential fan-made campaign in Avernus.
**How to make movies AND audio work in your custom campaign - Instruction movie:
**
[youtube]lEu8lgKsTcE[/youtube]
How to make movies AND audio work in your custom campaign:
- Install Moonglasses LINK to unlock additional Toolkit functions.
- Make a Toolkit project that's just a default level + , and place your bk2 movie file in the correct folder. Near as we can tell the correct folder is /Mods/YOUR-MOD-HERE/localization/english/video (you will have to create the video folder yourself). Export this as a .pak from the Toolkit.
- Next, make a separate Toolkit project for your campaign: this contains the folder path for the movie, your .wem audio files and timelines/script/anything else needed for your project.
The script needed to trigger a movie could be built in many different ways, but this is how we've set up our little showcase project:
//Upon loading the level, we teleport in characters needed for dialogues, in this case just Volo
IF
LevelLoaded("level2")
THEN
TeleportTo(S_GLO_Volo_2af25a85-5b9a-4794-85d3-0bd4c4d262fa,
(TRIGGER)TeleportTrigger_001_42818417-87b1-4b74-a1a6-44495a0f37fa);
//Script for having NPCs sit on chairs indefinitely
SitOnEntity((GUIDSTRING)ORIGIN_INTRO_Karlach_test_000_1f617564-133b-4e2f-a8b2-1f717ae68518,
(GUIDSTRING)FUR_GEN_Tavern_Stool_Large_A_002_f3ab813f-3103-4f7c-83b4-b98076b5dc1c);
SitOnEntity((GUIDSTRING)S_GLO_Volo_2af25a85-5b9a-4794-85d3-0bd4c4d262fa,
(GUIDSTRING)FUR_GEN_Tavern_Stool_Large_A_001_0a899716-6361-492c-aa4f-34cc64a4042e);
SitOnEntity((GUIDSTRING)ORIGIN_Wyll_Devil_test_000_8ad17a6d-814d-4633-b73d-f4368ab35e9b,
(GUIDSTRING)FUR_GEN_Tavern_Stool_Large_A_000_90e9a674-4176-458a-9646-1666f5b52d67);
SitOnEntity((GUIDSTRING)ORIGIN_INTRO_Laezel_test_000_e7c83247-6a9d-4d72-ab45-cd8148ec10d3,
(GUIDSTRING)FUR_GEN_Tavern_Stool_Large_A_003_20be1826-2f45-4cba-baee-ffe4f382d3ae);
//When entering the trigger in front on Karlach, the multi-NPC dialogue leading into the sound and movie starts
IF
EnteredTrigger(_Player, EventTrigger_000_d5bd6588-63ab-4db4-bea1-54981c7cc6c1)
AND
DB_Players(_Player)
AND
QRY_StartDialog_Fixed(firstconvo_b7d15cf8-f442-259d-47a9-0278090d6433,
ORIGIN_INTRO_Karlach_test_000_1f617564-133b-4e2f-a8b2-1f717ae68518,
ORIGIN_INTRO_Laezel_test_000_e7c83247-6a9d-4d72-ab45-cd8148ec10d3,
ORIGIN_INTRO_Astarion_test2_000_92e57fdb-57bb-453e-9bf4-c21291b6e1ad,
ORIGIN_Wyll_Devil_test_000_8ad17a6d-814d-4633-b73d-f4368ab35e9b,
_Player)
THEN
DB_NOOP(1);
//The Flag set at the end of the dialogue launches an automated dialogue from the soup next to Karlach. This soup has one voice line: the soundtrack for the movie. At the same time, we launch a timer.
IF
FlagSet((FLAG)perfectcreation_playmovie_ebd61605-f21f-0df7-552f-30bf34c20206, _, _)
AND
DB_Players(_Player)
AND
QRY_StartDialog((DIALOGRESOURCE)moviesound_6ceae993-7591-1f17-d20c-baa2063c0c66,
CONS_GEN_Food_Bowl_Soup_Shrimp_A_000_914fd12e-3cd4-4829-b406-120ad3f5d60b)
THEN
TimerLaunch("MovieStartTimer", 1000);
//When the 1 second timer finishes, we launch the Movie. We added the timer because the engine didn't seem to dependably launch the Automated dialogue (containing the audio) and the movie at the same time.
IF
TimerFinished("MovieStartTimer")
AND
DB_Players(_Player)
THEN
MoviePlay(_Player, "avernus", 1);
//When the movie has finished, the next dialogue is automatically launched.
IF
MovieFinished("avernus")
AND
DB_Players(_Player)
AND
QRY_StartDialog_Fixed((DIALOGRESOURCE)secondconvo_e4ca8048-4920-e855-8f18-03f8e3c3ddb0,
ORIGIN_INTRO_Laezel_test_000_e7c83247-6a9d-4d72-ab45-cd8148ec10d3,
ORIGIN_Wyll_Devil_test_000_8ad17a6d-814d-4633-b73d-f4368ab35e9b,
S_GLO_Volo_2af25a85-5b9a-4794-85d3-0bd4c4d262fa,
ORIGIN_INTRO_Astarion_test2_000_92e57fdb-57bb-453e-9bf4-c21291b6e1ad,
_Player)
THEN
DB_NOOP(1);
//Optional: You can add the following to avoid a long black screen after the video finishes.
IF
MovieFinished("BK2-Video-Name")
AND
DB_Players((CHARACTER)_Player)
THEN
TriggerMovieEndFadeIn(_Player, "BK2-Video-Name");
**In this project, you'll find:
**- The movie .pak:
- The movie .mp4
- The audio .pak
- The .wem audio file
- The .bnk movie file
As stated above, the audio containing .pak must be unpacked and repacked with LSLib for the audio to work in game.
- Both projects should be loaded in BG3MM (or your preferred mod manager), with the pak containing the movie last in the load order.
- Be aware that the project with the audio should not contain the movie file, because the game will try to load this movie that was broken by the unpack/repack process.
If you install the two .paks like described above, you can start a new game to experience the movie in game. After creating a character, you will end up in the pub and can walk over to Karlach to talk to your companions. You may need to work at aligning yourself directly in front of her and Astarion to get this to trigger, as this isn't a dialogue that triggers by simply clicking on Karlach.
Additional comments:
- For the presentation video, some pub sounds were added in post-processing. You could easily add these in game by using the same .wem approach and triggers.
- This project does NOT use a .bnk for audio. If you were to build a .bnk there is a fantastic guide by FluxPixel here:
**BG3 WWise Base Project **https://www.nexusmods.com/baldursgate3/mods/20442?tab=descriptio
If you use this approach, you would be able to use scripts calling on sound events. You would not need to play audio .wems as voice lines.
- Audio in this project was added as a voice line .wem for an automated dialogue. The script starts this dialogue and plays the "voice line" (movie OST), then a timer starts the movie 1 second after. We did this because we found that the engine struggled starting a dialogue and a movie at the same time. This is the reason you might have the sound slightly misaligned if you load play the custom campaign in game. Creating and calling on audio from a .bnk would solve this issue (you could use "PlaySound", for example).
Shout outs
Credits for Bloodwar cinematic assets:
Music and sound effects - Pixabay.com
Funky Funk - by Vibehorn
Cinematic Adventure - by Andri
Return of the King - by ShimaFM
Horror Dark - by Alexaa221
Middle ages happynes 2 - by Land_of_Books_YouTube
Special thanks to HyperspaceTowel, Lyra, Mazzle, Jerinski and He Who Shall Not Be Named.
And last but not least: Larian Studios for making their Toolkit available.
Largest thanks to Eli, who made a full CGI intro cinematic for the campaign that never was but really, really should be!
**
As LizardPhunk mentioned, I got a little overly hyped on making this animated intro, as it took nearly three months to make. This isn't a tutorial on how to create animated CGI films with Blender however. Any kind of animation or video should work so long as you make it into a bk2 file. - Eli**
来源与文件
前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:baldursgate3:22645 -->