UDK Tips and Resources

UDK (Unreal Development Kit) allows you to create games using the Unreal 3 engine. It can also be used for machinima. However, most of the people who use UDK are trying to make games, not machinima. Therefore it may be difficult to find answers related to machinima. I’ve tried to address some of those here.

UDK Advantages
Dynamic lighting
Easy scaling of objects
Simple importing of textures and models
Real-time map previews
A powerful material editor
Matinee (timeline editor)
Moving cameras

Increasing the UDK Quality
After installing the UDK, there are a few options you can change to increase the visual quality.
1) Open UDKEngine.ini which is located in UDK\UDK-2011-11\UDKGame\Config\
2) Change the following settings:
bUseMaxQualityMode=True (default is False)
bUseTextureStreaming=False (default is True)
– Set the UDKEngine.ini file to read-only after modifying it, or else the settings will revert the next time you run the UDK.
– The ResX and ResY settings set the resolution of your preview window.
– Using a Post Process Chain on your map can be used to set the anti-aliasing.

Scripts
I use a small custom script to attach Skeletal Meshes together when creating machinima, you can download it here. Add these to UDK\Development\Src\Engine\Classes. You will be prompted to rebuild scripts next time you start UDK.

Creating a Bink video
1) Using a video editor, render a video in AVI or WMV format (16:9 aspect ratio is recommended).
2) Convert the file using radvideo.exe.
3) Import the BIK file into the UDK and create a material. Apply the material to a mesh.

Understanding camera DOF
Cameras in unreal have a number of properties that can be set. The DOF settings are among the most important when making machinima.
DOF_Focus Distance – Distance from the camera to where the blur begins.
DOF_Focus Inner Radius – How much to blur things close to the camera. This can generally be left at 0.
DOF_Max Far Blur Amount – How blurry the background is.
DOF_Max Near Blur Amount – If DOF_Focus Inner Radius is set to 0, this will provide a blur to everything. Enabling this can help hide aliasing problems.

Tips
– Keeping package size small can make saving quicker.
– Saving maps under a new name for certain events can be helpful. Example: dungeon_intro and dungeon_collapse.
– When making machinima, using seperate cameras for each Matinee sequence is a good idea.
– Recording directly from the editor preview window is nearly as good as recording in the game itself. It also doesn’t require spawn points.
– To load a map using the console, type “open mapname”.
– Try to use as many models as you can, instead of brushes.
– Unreal Tournament 3 and Monday Night Combat packages can be opened directly in the UDK, although they should be renamed and resaved.
– Trying to open a game package that isn’t from UDK or UT3 will crash the UDK.
– The “environment color” setting inside WorldInfo can be helpful for setting the mood of your map.
– Adding a fog effect can also help with the mood of your map.
– You cant open maps unless the uncooked map file has been released, but you can use Umodel to extract their models and textures.
– The log window can be found under View > Browser Windows > Log.

Matinee Tips
– CTRL + W will duplicate a matinee keyframe.
– The matinee play rate can be altered to create a slow motion effect.
– It’s generally a good idea not to replace the first keyframe of a track, instead set the time of the first keyframe to .1 when making machinima.
– Matinee data can be copy and pasted between maps.
– Don’t do camera cuts in Matinee. Use your video editor instead.

Problems and Fixes
1) What causes the black fuzz in my level?
– Ambient Occlusion. Turn this off in the WorldInfo settings.
2) How can I export a movie frame by frame?
– “C:\UDK\UDK-2011-11\Binaries\Win64\UDK.exe” NightAndDayMap.udk -BENCHMARK -MAXQUALITYMODE -NOTEXTURESTREAMING -DUMPMOVIE -FPS=30 -ResX=1920 -ResY=1080
3) How can I prevent rescaling of 2048×2048 textures?
– Under the import options, select “texturegroup_vehicle” under the LODGroup setting.
4) Water is producing ugly shadows.
– This is likely caused by using a custom water material. Try using one of Epic’s water materials instead.
5) How can I select a brush?
– Click on the surface while holding Ctrl+Shift.
6) I am unable to select objects with translucent materials.
– Go to View > Allow Translucent Selection
7) I am unable to delete a SkeletalMesh.
– Make sure a FaceFX asset is not currently assigned to the SkeletalMesh.
8) My level doesn’t look cinematic enough.
– More detail is always better. Keep adding more props to the background. It’s an easy solution to a common problem.
9) Creating a mirror effect isn’t working properly.
– Scenecapturereflectactor and the brush need to be aligned to the same spot for the mirror effect to work.
10) How can I check my map for missing assets?
– Go to Tools > Check Map for Errors.
11) I’m getting a warning that says “Map should have KillZ set”.
– Open the WorldInfo properties and adjust the Kill Z setting.

Custom UDK Map Examples
Moated Grange Environment
Demon Throne
Unreal WoW – Warsong Gulch Preview
Autumn Park

Helpful Links
Hourences Unreal Engine 3 Tutorials
Controlling a Material in Unreal Matinee
Unreal Engine 3 Console Commands
How to add soft body (jiggle bones)
Toggle cinematic mode to remove the HUD
Umodel
UT3 necrify effectExample

Using Decals in UDK

Decals are an easy way to add detail to an Unreal map. Decals are a texture projected onto a surface such as posters, graffiti, or street markers.

Adding a Decal
1) Import the texture into the UDK.
2) Right-click the Content Browser background and select New DecalMaterial.

3) Drag the decal onto the map. Open the properties to adjust the width and height.

Output Example #1

Problems and Fixes
1) My decal is not showing up properly in Matinee.
– In the camera settings, deselect the “Constrain Aspect Ratio” setting.

Unreal Tournament 3 Machinima Info

Unreal Tournament 3 uses the Unreal 3 engine. The assets can be opened in UDK, or exported using Umodel,

– Fraps footage will have the “UT3” prefix.
– The game packages have the extensions .upk and .ut3. Both can be opened in UDK (although it may give a few errors).
– Packages are located in “unreal tournament 3\UTGame\CookedPC”.
– While UT3 comes with an Unreal Editor, the editor has not been updated since release. Using UDK is a better option.

Official Maps Examples
A few examples of the different visual settings in UT3.

Fearless

Shangri La

Heat Ray

Searchlight

Avalanche

Downtown

Strident

Deimos

Garry’s Mod Machinima Info

Garry’s Mod is arguably the most advanced machinima platform of the Source games, and is able to load content from other Source games, with the exception of Left 4 Dead. There’s a huge number of addons available here.

What does Garry’s Mod offer over other Source games?
– Dynamic lighting.
– Dynamic props that can be easily moved.
– Quick to learn.
– Tons of addons to add additional features.
– All the map features of Episode 2 are supported including NPC entities.

Useful Addons for Machinima
Moving Camera [Download] – A basic and easy to use moving camera system.
Better Camera [Download] – Allows you to set the field of view quickly and easily.
NPC Scene [Download] – Allows you to easily select and play VCD files.

TF2 Machinima NPCs
I created some real basic TF2 NPCs for Garry’s Mod which you can download here. These are not NPCs in the traditional sense. All they do is stand in a basic t-pose. However, you can use them to play VCD files much like you would using bots in TF2.

Tips
– Set the launch options to use windowed mode (-sw paramater), otherwise alt tabbing may crash the program.
– Make binds to automate commonly used console commands.

Console commands
Force an NPC to loop a VCD: ent_fire !picker setexpressionoverride scenes\elfrun.vcd
Alternate method of playing a VCD: actor_playscene engineer scenes/engie_test.vcd
Change an NPC’s weapon: ent_fire engineer setbodygroup 1
Disable an NPC’s shadow: ent_fire engineer disableshadow
Turn off LOD: r_lod 0 (default is -1)
Increase the ground detail distance: cl_detaildist 2400 (default is 1200)
Turn off bloom: mat_bloomscale 0 (default is 1)

Using TF2 facial animations with Garry’s Mod
Copy a class phoneme files to the Gmod expressions directory (Steam\steamapps\username\garrysmod\garrysmod\expressions).
– This will override the default expressions so the the HL2 NPCs face movement will no longer work.
– Some TF2 classes seem to share phonemes. Heavy is unique.
– To use TF2 VCD files in Gmod, copy the VCD files, sound files, and animation files (if using custom animations) to the Gmod directories.
– TF2 class phoneme files are located in “team fortress 2 content.gcf” (example: root\tf\expressions\player\demo\phonemes\phonemes.txt)

Adding Garry’s Mod to the Source SDK
By default Garry’s Mod is not included in the Source SDK and will need to be manually added. This is a pretty simple process.
1) Make sure the Engine Version is set to “Source Engine MP”.
2) Select “Edit Game Configurations”.
3) Press the “Add” button.
4) Set the name to “Garry’s Mod” and enter your full Gmod path for the directory setting (it should end with \garrysmod\garrysmod).

Rendering
In addition to changing the graphics settings to max (16x AF, 8x AA, ultra-high textures, etc), the visual quality can be increased even further with a few console commands. A number of configs with preset settings can be found here. Place in your Steam\steamapps\account name\garrysmod\garrysmod\cfg directory (or whatever game you’re using). While in game, open the console and type “exec configname.cfg”.

Helpful Links
MaxOfS2D’s Tutorials
Ultra High TF2 Settings

Left 4 Dead 2 Machinima Info

Left 4 Dead 2 is more challenging to work with compared to other Source games. The engine has been modified substantially and a number of core features have been removed. While L4D is a great game with a unique look, I would not recommend trying to work within the engine itself. If you’re looking to create a L4D machinima, you should extract the assets and use them elsewhere (Garry’s Mod, etc).

Differences between other source games
– There are no NPC entities to work with.
– The animations can NOT be decompiled.
– Additional workarounds are needed when setting up basic scenes compared to other Source games.
– Some idle animations will override any custom animations. This can be fixed by turning off the character’s flashlight, making their arms drop to their side.

Useful console commands
– Removing the HUD: hidehud 4; r_drawviewmodel 0
– Take control of a bot: sb_takecontrol (bot name)
– Enable a trigger from the console: ent_fire (entity name) (value) (examples: ent_fire vcdtalk start; ent_fire camera1 enable)

Mapping
– It’s a good idea to use small basic maps for testing purposes, as they wont require long compile times.
– Setting windowed mode in the launch options of hammer is helpful, otherwise the game may crash if you try to alt+tab.

Example Maps
Moving Camera Example – An example of how a moving camera effect can be done using path_track.
VCD Example – An example of how a VCD file can be added to a map. While in game, open the console and type “ent_fire vcd_talk_test start” to play the VCD.

Official Maps
A few examples of the different visual settings in L4D2.

c2m1_highway

c2m2_fairgrounds

c2m5_concert

c1m2_streets

c3m4_plantation

c5m1_waterfront

Links
L4D Map Tutorials

Importing Starcraft 2 Characters into 3DS Max

Starcraft 2 game assets can be extracted using MPQ Editor.

Importing the models into 3D Studio Max
1) The M3 files and textures can be exported using MPQ Editor. The main file containing the assets is “base.SC2Assets” which is located in your SC2 directory under StarCraft II\Campaigns\Liberty.SC2Campaign
2) Download and install Starcraft 2 Model (.M3) Plugins for 3ds Max.
3) Run the 3DS Max script m3_import_v0.30.ms. Select the M3 file and import.

Rendering SC2 Characters in 3DS MAX
1) Import the character into 3DS Max.
2) Add a skylight to the scene and change the rendering options to enable Light Tracer.

From here we will need to redo the materials. The import script uses wrong settings for the materials, so we will need to fix that.
3) Create new materials for each of the textures. Change the “Alpha Source” setting to “None”.

Output Example #1

Converting Starcraft 2 Characters to the UDK
1) Import the character into 3DS Max with m3_import_v0.30.ms.
– Most of the characters can be found in StoryModeCharacters > Terran.
2) Select everything and scale by 25000%. Reposition the model as needed.
– Any extra meshes and their bones can be deleted (example: the SM_RaynorCommander model has a gun and shot glass included).
3) Rename the meshes (head, teeth, etc) and apply a unique material ID to each of the meshes.
– Note: While you do have the option to attach the meshes together, doing so would break the face bones needed for facial animation.
4) Export with ActorX. Import the character and the textures into the UDK.
– Some of the character textures use a 2048×2048 resolution. Select TEXTUREGROUP_Vehicle when importing to prevent them from being re-sized.
– Some materials may need their texture coordinates changed (example: SM_FirstOfficer’s shoulder pads).
– The hair materials can be tricky and may require experimenting to find the best look.
– The eyes may need to have a separate material assigned in 3DS Max.
– A script can be used to create a biped rig.

Creating facial animations
1) Select the mouth bones. Link them to the biped head (Bip001 Head).
2) Export the reference PSK in ActorX.
3) Create the FaceFX poses using this guide.
4) Export each face pose as a separate PSK, then import into the UDK as morph targets.
– Rotating the jaw bone will control the teeth.
– You may want to delete the tongue mesh.

Tips
Some of the file formats contained in the MPQ files include:
.m3 – Contains meshes and sometimes animations as well.
.m3a – Contains additional animations. It is currently not possible to load these into 3DS Max.
.fxa – FaceFX file. These contain the facial animations.
– The Starcraft 2 Previewer can be used to find the material settings for the .m3 model file.
– The textures are in DDS format and should be converted to something more manageable (like TGA). You can use NConvert, or the save image feature in 3DS Max for this.
– Some textures have duplicates in different sizes. Check to make sure you’re using the highest resolution available (usually 2048×2048).
– Emissive textures will have a coordinate index of 2.

Helpful Links
Converting Starcraft 2 Props to the UDK
SC2 Model Previews

Writing Tips

The basis of any good machinima is the writing. Unfortunately, most people avoid it entirely and take the easy route of making a music video or silent film. While writing may seem like a daunting task, it’s really not that hard (and actually a lot of fun) once you get into the swing of things. Here’s a few tips which may make things a little easier.

Start with a list of ideas
I start all my projects with nothing more than a list. Possible characters, lines of dialog, a setting, etc. Do research some research if you need to, but feel free to put down anything that pops into your head. Even if it’s not the best idea it may inspire something later.

Write everything down
Keep a text editor open at all times so you can quickly jot down notes (I like to use Notepad++). If you’re away from a computer often, consider carrying a notepad and pen with you. You never know when a good idea will strike you.

Write a rough draft
It is easier to rewrite than to come up with a perfect script on the first go. Start with a first draft that roughly connects the events. Getting that first draft done is essential, or else you may get hung up trying to make things perfect.

Revise it
Rewrite your script to fix plot holes or alter any scenes that don’t seem to flow right. Consider keeping old versions of scripts too (this can be helpful if collaborating with someone else).

Writers block?
Try taking a walk or do something different from your typical routine. A change of environment will often lead to new ideas.

Don’t wait on anything
Don’t ever feel like you have to wait for something or someone before you can begin writing. If you have the time to write, then write. Always keep this in mind.

It gets better with time
The longer you work on something, the better it will be. New ideas will come if you stick with it.

Set deadlines
Set some sort of deadlines to actually get stuff done, even if it’s not perfect. It could be a daily deadline to get a page done, or a weekly deadline to finish a script. Set these goals yourself and really try to stick to them.

Finish it
This may seem like obvious advice, but it is absolutely the most important. You must finish your script. The vast majority of people will give up before ever completing a personal project. It may begin to feel grueling and you might even look for excuses not to work on it. Getting it finished will prove to yourself and to others that you are a capable person.

Cinematography and Editing Basics

Even with a virtual environment, it’s still a good idea to follow basic cinematography and editing fundamentals. While things like lighting and lenses aren’t always under your control, there are still some basics you can follow.

Cinematography
The rule of thirds

Next time you watch a movie, take notice of how the characters are framed.

In nearly every shot you will notice the subject is located in one of these four areas.

You can use this same principal when making machinima.

180 degree rule

When two characters are facing each other, make sure the camera is always on the same side of them. Switching sides may disorient the viewer and confuse them about where the characters are facing.

You can mix it up with wide shots, close-ups, or over the shoulder shots to add some variety.



Establishing shot

An establishing shot is a shot that’s used to indicate where a scene takes place.

In this example the top shot is held for a few second to identify the location, then cuts to the character inside the store.

Editing

Frame rate

Frame rates are something you will see as an option on many different programs or video editors. The three most commonly used are 24p, 25p, and 30p. When it comes to machinima there’s little difference between the three. Just make sure you are using the same frame rate across all programs you may be using (Fraps, Vegas, 3DS Max, etc).

Aspect ratio

Aspect ratio is the relationship between image width and height. I would recommended using 16:9, as it is the most commonly used aspect ratio and the Youtube standard.

Color Grading

Color Grading (or color correction) can often set the mood, just be careful not to abuse it.

Tips
– When editing, try to cut from action to action. Example: if someone is swinging a sword, cut while their arm is still moving.
Whip pans are a good option for comedy films.

Helpful Links
Working with Voice Recordings
Color Grading Masterclass

Adding Custom Models to Source Games

This is intended to be a very quick and simple tutorial for adding a custom model to the Source engine. This assumes you have a model ready to export in 3D Studio Max. You will need to download and install the SMD export plugin for 3DS Max for this.

1) Load the model into 3DS Max.

2) In 3DS Max, go to File -> Export, select SMD from the dropdown. Select the “Export Reference SMD” option. Export to a new directory.

3) Copy the toolbox folder to the new directory.
4) Export the Summary Info file in 3DS Max (File > Properties > Summary info. Press the “Save to File” button). Save to toolbox/summary_info.txt.

5) Run convert_3dr_scene_to_source.bat.
– During the conversion VTFEdit will open. Go to Tools -> Convert Folder to convert the TGA files to VTF format. Close VTFEdit when done to continue the conversion.

6) Open output.vmf in Hammer to view the model.

Output Example #1
Output Example #2

Note: This method uses prop_dynamic entities. If you wish to use prop_static entities you will need to edit the QC file to include the line $staticprop.

Old Manual Method 1) Load the model into 3DS Max. [Pic] 2) In 3DS Max, go to File -> Export, select SMD from the dropdown. Select the “Export Reference SMD” option. [Pic] 3) Create a .qc file for the SMD. Here is a very basic example:

$modelname "myprops/mini_car.mdl"
$cdmaterials "models/myprops"

$scale 1.0

$model "mini_car" "mini_car.smd"

$sequence "idle" "mini_car.smd" fps 30

3) Compile the model using GUI StudioMDL.
– You should now be able to preview the model in the SDK Model Viewer, albeit without materials. [Pic]
4) Each material will need a seperate VMT file. Here’s a very basic example.

"VertexLitGeneric"
{
        "$basetexture" "models\myprops\mini_car_doors"
}

– You should now be able to preview the model with materials in the SDK Model Viewer, or add it to your map. [Pic]

Problem and Fixes
1) My model displays blocky in the Source engine.
– Try selecting the “Alternate normals export method” option when exporting from 3DS Max.
2) When running the compiler I get a “filesystem.dll” error.
– This is usually caused by not having the SDK open when running the compiler.
3) My model is too small or too big.
– Change the “scale” setting in the QC file and recompile.

More Info
Shader Paramaters
QC Commands

3D Ripper DX Tutorial

3D Ripper DX is a tool for capturing geometry and textures. This is very useful for machinima because it allows you to export models from a huge selection of games. You will need a 3D program for this. 3D Studio Max is recommend, but other programs that can import OBJ files may work as well.

Capturing a scene with 3D Ripper DX
1) Open 3D Ripper DX and locate the game exe. Make a mental note of your capture key, then press launch.
– If using a Steam game, make sure steam is running first. Use the game exe, NOT steam.exe.

2) You will see a “Ready to capture” message in the top left corner of your screen if the program is running.

3) Press the capture key when ready. The game will freeze during this process which may take a few minutes.
4) Import the file into your 3D program. Most of the import options can be left at their default setting.
– For “recommended values” use the settings in the dropdown box (this is auto-generated by the program). There may be more than one, but it doesn’t seem to matter which one you select. [Pic]
If everything worked it should look something like this.

Useful Tips
– Always run 3d ripper as admin.
– The OBJ capture option wont allow you to adjust the aspect ratio.
– Consider using Umodel or other tools to extract game models before using 3D Ripper DX.
– Scale up to prevent visual bugs.
– “Global system monitoring” only works on 32-bit Windows XP.
– Steam users: Each game needs to have it’s own EXE that can be launched without Steam. HL2 and TF2 do not have this, although you can rip from the Hammer editor or use “Global system monitoring”.
– This program won’t work with some Source engine games, but it will work with Hammer (the Source engine map editor). Try Steam\steamapps\username\sourcesdk\bin\orangebox\bin\hammer.exe.
– Rotate the models before exporting them.

Problems and Fixes
1) The skin color or clothing doesn’t look correct.
– Many games use dynamic materials which allows them to easily change the appearance or characters. Mass Effect for example uses pale orange white texture for the skin, then the game engine (Unreal3) shades it. You will need to manually adjust this.
2) Some ripped models seem to be very low poly.
– This is likely due to LOD models. Some games will allow you to disable these in the settings, otherwise just try getting closer to the model before hitting the capture key.
3) Why are some models solid black?
– This may be related to the UV channels. Try changing or deleting any extra UV channels.

Links
3D Ripper DX Compatibility Chart
Converting a 3D Ripper DX Scene to Source
Converting a 3D Ripper DX Scene to UDK