This tutorial is for making the lips move for cinematic portraits. Since SC2 does not have actual support for talking animations (unless it's a custom model), we have to resort to this work-around that I first used in Subjection. I urge campaign creators to adopt this technique, as it goes a long way to increasing believability/immersion. Blizzard uses a software called FaceFX to animate their portraits, but it costs 900 dollars, and so to get a portrait to talk, we have to rely on existing FaceFX that Blizzard included with their portrait models.
1) First, you have to find the portrait that you want to talk. For this tutorial we'll use the marine. Go to the data editor, sound category, and find a sound file from the campaign which has the marine talking. For example, the first "pissed" sound:
2) Double click the sound, and note the duration of the sound file. Duplicate that sound, rename it Marine_Talk, and get rid of the other sounds besides the one you want. Make sure you retain the values in the "Facial Animation" row. This is what gets the model to move its lips.
3) Set the volume so that you can't hear the sound (-96 dB):
4) Go to the trigger editor, and create a trigger that plays the marine talk animation forever:
Use the duration of the sound that you chose in the data editor (though feel free to make it a bit shorter, so the portrait doesn't stop talking earlier). Make sure all your waits are in real-time seconds, not game-time.
5) Create a new action definition (Ctrl + Alt + R), which will play the transmission:
Give your action definition two new parameters (Ctrl + M):
1) Text (text)
2) Time (real)
"Trigger - Run showMarinePortrait"
Plays the portrait talking animation.
"Transmission - Send transmission to (All players) from (No one) playing No Sound Link with name "MARINE" and message text using (Cinematic portrait at Top Left) playing (None) (Add 90.0 seconds, Don't Wait until it finishes)"
This is used for subtitles. Enter your character's name here, and make sure you use an unused portrait (i.e. top-left cinematic portrait). Hide this unused portrait before beginning the game, or else you will get two portraits showing up instead of one:
General - Wait time Real Time seconds
This waits the duration you specify for whenever you use the trigger. Since we can't make our own faceFX we have to use Blizzard's animations and cut them off when we need them to stop talking.
Portrait - Hide (Cinematic portrait at Center Left) for (All players) (Do Not force visible)
Transmission - Stop all active transmissions
Trigger - Stop all instances of showMarinePortrait
UI - Clear All Messages for (All players)
These triggers hide the portrait and make it stop playing.
You'll use that action definition whenever you want your marine to talk. And you have to create one of these for each different character in your map/campaign. If you're using sound, just use the "wait until sound is 0 seconds from end" trigger. And there you go. It doesn't always look pretty, but it's 100x better than having the portrait do nothing! :)
The trick with the muted sound is pretty cool. Great if you have no talking sound. Very clever. :)
But if you have a proper talking sound, you can enter the facial animation ID into your sound and transmit that. The mouth will open more or less accurately to your sound file output.
The problem is that the facial animation doesn't loop meaning that if the used ID's animation's length is too short, your character will stop moving his mouth. But if it is long enough, this would be better than your method.
The ID names can be found within the fxa files in the archive, if opened with a text editor.
I'm using that in my Diablo map when you talk to the NPCs in case you want to see that in comparison.
You can use it with sound and it will loop. Just add a sound parameter to the action, use the "wait until sound is 0 seconds from playback" trigger, and same principle applies:
@ 5:20
Quote:
The ID names can be found within the fxa files in the archive, if opened with a text editor.
Huh, never knew about that. I've just been using the data editor.
Thanks for the tutorial, it's a very good thing. But sending a transmission via Action Definition prevents other actions of the trigger from being executed until the transmission is over. In my map some actions (movements of the camera, orders, etc.) are sometimes executed during transmissions. When I use this transmission workaround, these additional actions always wait the transmission to finish, though I have "Don't wait until it finishes" everywhere. Checking "Create thread" in Action Definition options just spoils everything and drives the trigger mad. Anyone has ideas how to solve that?
This tutorial is for making the lips move for cinematic portraits. Since SC2 does not have actual support for talking animations (unless it's a custom model), we have to resort to this work-around that I first used in Subjection. I urge campaign creators to adopt this technique, as it goes a long way to increasing believability/immersion. Blizzard uses a software called FaceFX to animate their portraits, but it costs 900 dollars, and so to get a portrait to talk, we have to rely on existing FaceFX that Blizzard included with their portrait models.
1) First, you have to find the portrait that you want to talk. For this tutorial we'll use the marine. Go to the data editor, sound category, and find a sound file from the campaign which has the marine talking. For example, the first "pissed" sound:
2) Double click the sound, and note the duration of the sound file. Duplicate that sound, rename it Marine_Talk, and get rid of the other sounds besides the one you want. Make sure you retain the values in the "Facial Animation" row. This is what gets the model to move its lips.
3) Set the volume so that you can't hear the sound (-96 dB):
4) Go to the trigger editor, and create a trigger that plays the marine talk animation forever:
Use the duration of the sound that you chose in the data editor (though feel free to make it a bit shorter, so the portrait doesn't stop talking earlier). Make sure all your waits are in real-time seconds, not game-time.
5) Create a new action definition (Ctrl + Alt + R), which will play the transmission:
Give your action definition two new parameters (Ctrl + M):
1) Text (text)
2) Time (real)
"Trigger - Run showMarinePortrait"
Plays the portrait talking animation.
"Transmission - Send transmission to (All players) from (No one) playing No Sound Link with name "MARINE" and message text using (Cinematic portrait at Top Left) playing (None) (Add 90.0 seconds, Don't Wait until it finishes)"
This is used for subtitles. Enter your character's name here, and make sure you use an unused portrait (i.e. top-left cinematic portrait). Hide this unused portrait before beginning the game, or else you will get two portraits showing up instead of one:
General - Wait time Real Time seconds
This waits the duration you specify for whenever you use the trigger. Since we can't make our own faceFX we have to use Blizzard's animations and cut them off when we need them to stop talking.
Portrait - Hide (Cinematic portrait at Center Left) for (All players) (Do Not force visible)
Transmission - Stop all active transmissions
Trigger - Stop all instances of showMarinePortrait
UI - Clear All Messages for (All players)
These triggers hide the portrait and make it stop playing.
You'll use that action definition whenever you want your marine to talk. And you have to create one of these for each different character in your map/campaign. If you're using sound, just use the "wait until sound is 0 seconds from end" trigger. And there you go. It doesn't always look pretty, but it's 100x better than having the portrait do nothing! :)
Map can be downloaded here.
This is really helpful! It's a shame it's so difficult compared to SC1 but I'm sure this solves a lot of problems for many campaigners.
Wow, this is really useful! Wish they would've made this default, but oh well.
The trick with the muted sound is pretty cool. Great if you have no talking sound. Very clever. :)
But if you have a proper talking sound, you can enter the facial animation ID into your sound and transmit that. The mouth will open more or less accurately to your sound file output.
The problem is that the facial animation doesn't loop meaning that if the used ID's animation's length is too short, your character will stop moving his mouth. But if it is long enough, this would be better than your method.
The ID names can be found within the fxa files in the archive, if opened with a text editor.
I'm using that in my Diablo map when you talk to the NPCs in case you want to see that in comparison.
You can use it with sound and it will loop. Just add a sound parameter to the action, use the "wait until sound is 0 seconds from playback" trigger, and same principle applies:
@ 5:20
Huh, never knew about that. I've just been using the data editor.
Thanks for the tutorial, it's a very good thing. But sending a transmission via Action Definition prevents other actions of the trigger from being executed until the transmission is over. In my map some actions (movements of the camera, orders, etc.) are sometimes executed during transmissions. When I use this transmission workaround, these additional actions always wait the transmission to finish, though I have "Don't wait until it finishes" everywhere. Checking "Create thread" in Action Definition options just spoils everything and drives the trigger mad. Anyone has ideas how to solve that?
How does create thread spoils everything?
You can allways use the transmission action inside another trigger, and call the trigger from the main one.
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
Cant get it to work in the new map version