Cutscenes Part 3: Lighting, Placing the Player, and Conversations

From The DarkMod Wiki
Revision as of 01:43, 7 September 2010 by Grayman (talk | contribs) (→‎Wrapup)
Jump to navigationJump to search

NOTE: This article is under construction until this NOTE goes away.

Download the file [snitch3.zip.txt], remove the ".txt" from the filename, and extract it into your darkmod folder. This includes our Snitch work from Parts 1 and 2.

Open snitch3.map in Dark Radiant.

Lighting

Remember how the Guard's medium shot in Part 1 was dark? snitch3 includes a few lighting changes. A down light now sits above the bulletin board, with an ambient light at face-level to soften the shadows from the down light. Both actors should be properly lit now.

Placing the Player

When a cutscene plays, the player is frozen, unable to do anything. If they're too far away from the actors, they won't be able to hear what's being said. So it's important to place the player in a spot where they can hear a conversation without being in the way. Even though the player is invisible in the camera's view, the player is still there, and can obstruct actor movement.

For Snitch, the best place to hear the actors' lines is to stand just behind them. Since the player can't walk to this spot on their own, we have to move the player in the script code, with help from a func_teleporter.

Tport1
  • Just behind the actors, create a func_teleporter entity (darkmod/func/func_teleporter). Give it these Property/Value pairs:
  • "name" "Tport1"
  • "angle" "90"

angle sets the player's orientation when they arrive, and is important so the actors' voices come from the correct directions. When Tport1 is triggered, the player will be brought to it from wherever they are in the map.

  • For the player to leave after the scene, place another func_teleporter back on the porch with the player start. Give it these Property/Value pairs:
  • "name" "Tport2"
  • "angle" "90"

If you have multiple shots strung together that require the player to move from one to the next for sound reasons, simply move the player along via func_teleporters.

That's it for the scene setup. Let's move on to what the actors will say.

Dialogue

The key element in conversations is what the actors have to say. The dialogue files for Snitch are in the snitch/sound folder. We'll talk about how to create your own dialogue files and the associated definition files that TDM needs to play them.

For background information on adding sounds to your mission, please read Sound.

Creating the dialogue

The ideal way to record sound for games is to use a digital recorder that can feed the results into your computer for editing. However, not many of us own one, so we have to fall back on the lower quality "mic plugged into the sound card" method. For sounds that are heard one or two times during a mission, this is an acceptable solution. Anything that's going to be heard multiple times (like TDM's AI voices) should be done in a professional manner with high-quality equipment.

Steps to create a sound:

  • Use your favorite recording method to get the sound into the computer
  • Edit with sound-editing software:
  • remove background noise (essential)
  • remove low bass if needed
  • de-ess if needed to remove unwanted hissing
  • normalize to around 50%

OGG format

The sound format TDM uses is OGG, so if you can't record directly in this format, you'll need a way to convert your recording format to OGG. FlicFlac is a free program that can do this for you.

Sound shaders and folders

In snitch/sound, you'll find tdm_maps_snitch.sndshd, the sound shader (definition) file, and the folder voices/snitch/conversations, where the sound files live.

  • Place your OGG sound files into voices/snitch/conversations
  • Add a definition to tdm_maps_snitch.sndshd for each new sound

For example, let's say you add the sound file Snitch_Informant_1.ogg (the Informant's first line) to the conversations folder. To use it in the mission, add the following to the tdm_maps_snitch.sndshd file:

Snitch_Informant_1
{
   minDistance 8
   maxDistance 25
	
   volume 12

   sound/voices/snitch/conversations/Snitch_Informant_1.ogg
}

When you begin testing, you can adjust the volume to an appropriate level. Make sure it can be heard over any ambient music that's playing.

We'll see below, when we construct the conversation, how to play the dialogue sounds you add.

Conversations

For a discussion of the elements of a conversation, please read Conversations.

Dark Radiant provides an easy-to-use editor to create conversations.

  • Create the conversation_info entity that will hold the conversation (darkmod/Conversations/atdm:conversation_info). Place it near the bulletin board.
atdm_conversation_info_1
  • On the main menu, select Map/Conversation. A Conversation Editor window will appear. Note that atdm_conversation_info_1 is shown in the Conversation entities field. This entity can hold a number of conversations. If you have multiple conversation_info entities, they'll all be shown in that field.
Conversation Editor
  • Click in the Conversations field and hit the Add button. A new conversation named "New Conversation" will appear.
  • Select this and hit the "Edit" button. An Edit Conversation window appears. This is where we'll do the bulk of the work to create our conversation.
Edit Conversation
  • The first thing to do is to name this conversation. Let's call it "Snitch".
  • Because of the nature of our conversation (the actors might not want observers to know they're talking about anything other than the weather), we won't force them to face each other. So uncheck the "Actors always face each other while talking" box. If we want one actor to face the other at some point in the conversation, we'll handle that in the Commands field.
  • Now we add our actors. Click the Add button next to the Actors field and an entry "1 New Actor" appears. Single-click that twice and it will highlight for editing. Change it to "SnitchInformant", the name of our informant AI. Hit ENTER to complete the edit.
  • Click the Add button again and change "2 New Actor" to "SnitchGuard", the name of our guard AI.

At this point, the Edit Conversation window should look like this:

Edit Conversation


Animations

TO BE CONTINUED

Wrapup

In Part 3, we built the conversation for our scene, learning how to add dialogue and animations.

Alongside snitch3.map and snitch3.script, which we've been using above, you'll find snitch3a.map and snitch3a.script, which include the conversation from this lesson. You can build and run snitch3a.map and compare it to your own work.

In Part 4, we'll look at extras you can add to your scene.