UDK Notes

 

Topics:

UDK Lighting
UDK Cameras

UDK Characters
UDK Models (Importing Models From 3D software like Maya, 3dsmax, or Blender)
UDK Kismet and Matinee

 

 

Resources:

Maya Camera Clipping Planes Adjuster Script

 

 


Notes From October 2nd 2011

-----------------------------------------------------------------

Where you save your files for UDK:
C:\UDK\UDK-2011-08\UDKGame\Content\your_name_udk_dm

Over time, keep this folder synchronized with your external harddrive. Continuously back it up. It is on the C:\ drive so if it crashes, you'll lose
everything. Make sure you back it up!
You must have all your files that are going into UDK in this folder, otherwise the engine can't work with it.

-----------------------------------------------------------------

The player start can sometimes say "Bad Size". This is an indication that the player doesn't have enough room to enter the level or respawn.
UDK will kill your player if he/she is in a wall, etc. Also try to make sure your player is not going to fall slightly when they enter to the level.

Naming convention for file: your_name_udk_dm_map_v001

-----------------------------------------------------------------

Maya to UDK - UDK to Maya:

- Go to Maya and set a new project in your "src_authoring folder" (this src_authoring folder should
be in your "C:\\UDK\UDK-2011-08\UDKGame\Content\your_name_udk_dm" folder) . Use defaults.
- Select all your surfaces in UDK and go to File > Export Selection > src_authoring > Save export to new Maya project.
- Maya: File > Import (your recent Export from UDK)
- You'll notice that UDK booleans all your objects together. Example: The verts of a pillar will be merged with the verts of the floor.
- It helps to build any objects at the origin in Maya. This is so that when you export to take it to UDK, the pivot will be in the right spot.
UDK uses the point of origin as the pivot.
- Use your UDK block-in as a seperate "template" layer.

- Once you've got your UVs laid out, copy them to a new UV set.
UV Texture Editor > Polygons > Copy UV Set > Copy to New UV Set > Name it "lightmap"
- UVs CANNOT overlap for light maps and MUST be within the 0-1 area.

- Engines have a hard time with hard edges. If you don't have to have hard edges in certain areas, don't use them.
Soften edges that don't have to be hardened.

- Call your collision object "UCX_pillar". Then make sure your ACTUAL pillar is called "pillar". You want them to contain the same name, but one
with UCX and one without. Create a material (UCX_mat) for your collision objects and a layer (pillar_UCX_Lay) as well.

- Ensure your pivot points are all in the right spot. XYZ: 0

- Go to your plug-in manager in Maya and load in "C:\\UDK\UDK-2011-08\Binaries\ActorX"

- In your MEL command line, type in "axmesh" and hit enter. When the window pops up, check the boxes: "Select items only",
"Auto triangulate" and "Obey hard edges".

- Save the file to: "C:\\UDK\UDK-2011-08\UDKGame\Content\your_name_udk_dm\src_udk". (src_udk is a folder you will create).
- Naming convention for things to be taken into UDK: "pillar_mesh" (example)
- Put textures into the same folder as your mesh file. Name it properly! Example: "pillar_diffuse_texture". Make sure the texture is not a JPEG.
Save as a TGA or PNG, etc.
- In UDK, go into your Content Browser and click "New". Create a new package using the "your_name_udk_dm" folder.
- You can apply the material to objects by hitting Shift + LMB while on your object.
- Import your model by going to your Content Browser and hit Import. Make sure the names are proper! They all have to match up.
- One convex per UCX Object should be checked. Otherwise UDK will do its own thing and mess it up. If you don't have a collision object,
you can try to get UCX to make it for you. It has to be a simple enough object though. UCX cannot automatically create a collision object for
something as complicated as a person, for example.
- In UDK, UV Channels are UV Sets.
- Light Map Resolution: Anything over 256 x 256 can really destroy the speed of the program. A good number is 64 x 64.
- LOD > Material > None. This is when you can go back into your package in your Content Browser, click the desired material, go back to the
LOD > Material section and hit the little arrow beside "None". It will then assign the material you clicked on to your object.
- Keep in mind you cannot save packages incrementily like you can with maps, so its good to figure out a way to save versions. Folders are a good way.

Importing your texture:

- TEXTUREGROUP_UI has very high limits. You can bring in any size and it won't argue with you. TEXTUREGROUP_World, for example, has limitations.
You could bring in a 1k map and it might downsize it to 512 for you because that it the limitation.
- Left-click drag a texture into your material's node graph to assign it. Then drag the texture into Diffuse, etc.

-----------------------------------------------------------------

Hotkeys:

CTRL + ALT = Drag Selection

 

Notes From September 21st 2011


-------------------------------------------------

Naming Conventions:
- It is good to, in certain multi-platform files, not use capital letters, use no spaces, and use underscores strategically.

For example: joe_crawford__deathmatch_map__blueprint__v001.ext

Using the name of the creator first (joe_crawford), then the description (deathmatch_map), the part of it specifically (blueprint),
then the version (v001).
Numerical padding is to the user's taste. A padding of three is useful.
This naming convention is beneficial for alphabetical sorting.

-------------------------------------------------

Building your 2D level design in UDK:

First: Block out your general floor shape in UDK using the pen tool.
Geometry Mode > Pen Tool
The pen tool allows for drawing shapes quickly and easily.
Holding down CTRL snaps your pen tool to the grid points.
You want Auto Extrude and Create Convex Poly ON when you use the pen tool.
Hit CTRL + A to Add your geo.

Use Brush Clip > Geometry Mode Options to cut away parts of your brush.

Inserting Weapon Pickups:
Content Browser > Actor Classes > Pickups > Weapon > UTWeaponPickupFactory
Put your pickup wherever you need it and then select what type of weapon in the Object Properties (Double-click on object to get to properties).

Do the same for your ammo and health, etc.

Don't forget to change the gameplay type to Deathmatch. (Under World Properties)

-------------------------------------------------

*Found Hotkeys*

Alt + MMC = move pivot point

Hold CTRL and move the object without having to touch the manipulator tool.

 

 

Notes From September 14th 2011

 

Documentation is at:

http://www.udk.com/documentation   -   This page will show you links to the UDN website, which is where the actual documentation is stored.

See the video tutorial section.  There are a great number of introductory tutorials listed which you can watch for free (created by 3dbuzz).

 

This page will be of particular importance:

http://udn.epicgames.com/Three/FBXStaticMeshPipeline.html

 

 

 

UDK is close to or at the top of the "high end" in terms of available game engines.  It is nearly identical to the full Unreal Engine used on a great many commercial titles.  The only differences are access to documentation and source code.  Neither of these differences are important unless you are a programmer.

If you are a programmer, I generally recommend Unity or something else over UDK.  UDK is quite tough to modify and work with, primarily because the API is not properly documented, and there is a general lack of documentation in general.  Also, you have to *restart* the entire editor/engine every time you make a change to scripting code.  It's insane.

At the time of writing, Crytek is the only real competition in terms of available high end game engines.  ID Tech 5 will likely ship soon and will also be competitive, if not flat out superior.

Fortunately, learning one engine will help you learn the others as well.  They are all fairly similar.  Using and learning Unity3D, and the Blender Game Engine, can also be valuable experiences.

 

UDK has a powerful post production system.  In fact, it pretty much has a fully functional node based compositor inside of it.  You can create custom composites and post processes right inside the engine.  UDK essentially contains a "Mini-Nuke".

Post production is more commonly used for:

Color Correction Motion Blur, Depth Of Field, Glows, Light Shafts, and Camera effects (such as blood splatter on lens)

UDK is fully HDR enabled, so compositing takes advantage of high dynamic range, which the materials, code, and effects are capable of outputting.  In case you want to do HDR work with Maya and Mental Ray, Open Exr is an HDR (High Dynamic Range) 128bit image format, which I recommend using.  You can render to Open Exr and composite using Open Exr.

 

UDK uses a zbuffer for rendering.

UDK may or may not use deffered shading.  This should be looked into.  Deffered shading is a performance booster that is used in many game engines. It works by not applying advanced shading to triangles that will not be seen. (Many games engines apply all effects whether or not the triangles will be seen by the audience.)

Per pixel lighting (this allows for normal mapping, spec mapping etc.  It's common these days, but prior to Doom 3 by ID software, most games did not use per pixel lighting.)

Can handle fairly high poly models.  Can use tessalation (real time displacement mapping) to achieve incredibly high polygon counts in real time.

Rain can be done as a particle system of alpha cards

Hair is usually done as alpha cards, especially for

Alpha cards often use "opacity mask" mode, which is simple on/off transparancy, and doesn't allow semi-transparent pixels.  This renders far far faster than semi-transparency (alpha blending).

 

Animated UV are often used to achieve effects.  Often only one of the UV channels/sets will be animated, so that the effects appear to change, but the base texture does not change.  This works for things like water running over a textured surface.  It can all be done right in the material.

 

Aside from lightmass, which is precomputed, polys cannot emit light in real time.  Instead you create light objects in the editor, similar to creating point, spot, and directional lights in Maya.

UDK offers a powerful shadow system that can work with the lights created in UDK.

Light shafts are also available, though caution should be used since they are only a post process. There are ways of creating additional light shafts using geometry and materials as well.

 

Simplygon is used for automatic generation of lower polygon models.   (It is also available as a plugin for other 3d software such as 3dsmax and Maya.)

A landscape tool exists for creating complex outdoor terrain.

Vertex color painting can be used for models. This is extremely useful for texture blending.

Matiness is UDK's animation/keyframing system and Kismet is its graph based visual programming tool.

APEX physics can be used for clothing etc

DX11 can be used with MSAA for hair.  (http://www.nvidia.com/content/PDF/GDC2011/Epic.pdf)

 

MSAA is now used usually used for antialiasing although FSAA (full screen antialiasing) has also been possible.  Many techniques have been possible in the past, but currently MSAA is generally the best choice.

 

Materials can be partially transferred from 3dsmax/Maya using the following setup:

(use a phong or phongE  material in Maya)

 

Map/Texture
3dsMax Setup
Maya Setup
Diffuse Diffuse > Bitmap Color > File
Emissive Self-illumination > Bitmap Incandescence > File
Specular Specular Level > Bitmap Specular Color > File
Specular Power Glossiness > Bitmap Cosine Power > File
Normal Map Bump > Normal Bump > Normal > Bitmap Bump > File

 

Unreal uses the skin_** naming convention to specify ordering for materials. This can be the entirety of the name of the material or appended onto the existing name of the material. It just has to be found within the name of the material.

So, if you have two materials that need to be ordered consistently, you might have them named:

  • M_ExampleMesh_skin_00
  • M_ExampleMesh_skin_01

 

 

Assignment - DeatchMatch Map Planning

Plan a simple level for 4 players to shoot at each other in.

Deathmatch
For 4 players
Should be action packed

Things you can add to make it more fun:
player starts (have at least 4, at bare minimum, more are better)

Health powerups

Weapons
default weapon
link gun (like default but faster)
shock rifle (strong instant precise shots)
rocket launcher

Ammo for each weapon

Holes in ground to fall and die
Lava, or slime that kills you slowly

Vehicles (be careful with these, they can make design harder, only use them if it really improves your level)

 

 

 

#################################################

## Notes Taken By Alexa for Class 2 ##################

####################################

 

UDK with Joe Crawford
Class #2, 14/09/2011

- Find additional UDK notes at Teaching3D.com > Unorganized Notes > UDK Notes

Today: Brush-based modeling, the theory of game design & level design, and planning a death-match level.

------------------------------------

- Teaching3D.com > Level Design Concepts

- Marketing shows us that when the graphics are good, far more people will purchase
the game. A great game combines: great graphics, great storytelling and great gameplay. 

-Things that effect the "fun factor" are:
	- Pacing
	- Fairness
	- Novelty of play, newness, and/or humour
	- Balance of rewards and challenges
	- Communication with others
	- Understandability
	- Emotional effects (such as suspense, surprise, or sympathy)
	- Quality of story, realism and immersion

- How levels fit into the overall game:
	- (Typo: "..including the game's User Interface or 'Frontend'..")
	- Designers should think about how the level begins and ends. What is the overall impact/feeling the designer wants 
	to instill in the player by the time they've finished the level? Designers should also think of a theme/atmosphere to submerge
	the player while they're playing.
	- Continuity is also very important when designing the game. You cannot have a dead character return in a prior level unless
	its intentional and part of the story. Also, for example, if the game is set in an era when refridgerators do not exist, the designer 
	should not allow for a slip-up such as placing a fridge in the kitchen. 

- Non-player character: a character not capable of being played as (damsel in distress, etc.)

- Emergent properties and goals in games can be a player-made way of prolonging the life of your character or other things that can be beneficial
to the player. (Ex: making a lake for yourself in Minecraft so that you don't die at night due to monsters)

- (Pacing section typo: "..both character's faces with the versus symbol..")

- If the game is too action-packed without a break the player can become too frustrated or uninterested and therefore give up.

- (Types of levels typo: "..ice worlds, fire worlds, and desert worlds..")

- WARNING: AVOID USING TOO MANY CRATES OR BARRELS (unless you're joking or in a freight environment). Try to think of something 
more interesting.

- Side note: www.GameRatings.com averages out the scores of game rating sites to achieve a fair percentage rating that can be more dependable. 
This is because it's not opinion-based.

- If the cutscenes/gameplay are heavily dependant on the actions of the player, it can really draw people in and motivate them to play more
and become more involved in the story. The immerging style, "pick-your-adventure", has become more popular recently (such as the PS3-exclusive
game, Heavy Rain). This style can bring back memories of "pick-your-adventure" novels in players. The more responsibility and involvement the 
player has, the more enjoyable the experience can be (because of the cinematic reward or moral choices, etc). This can be hard for designers.

- (Immersion typo: "..would be very important, while in a science-fiction..")

- Immersion: If a game depends upon feeling very immersive, you great graphics and a suitable atmosphere to support it. 

- (Continuity typo: "..Even a game.." [no comma])

- ("Arriving at a Solid.." typo: Insert a space and capitalize the 'i' in 'it').

------------------------------------
DEATHMATCH
4 Players
Should be action-packed

Designing your level:
	- Brainstorm. Always sketch out a rough idea for your level before-hand regardless of quality of drawing. 
	- If you are showing other people, however, try to make it neat and tidy.
	- You can also makes plans in Maya using CV curves, etc. 
	- You want it to be presentable enough that you can bounce ideas off of other people.

- Tip: The program 'Inkscape' is a free 2D drawing program you can download from the internet. It can be helpful if you just want something quick.

- Fun Fact: Games such as Wolfenstein and Doom were completely 2D-created. The artists did not have 3D experience. The program used was 
called "GtkRadiant".

2D level design tips:
	- You can use thick lines to represent walls. 
	- It will be very helpful to have a legend for all your different colours, and line styles, etc., so that other people can understand.
	- You want to indicate how high each floor is, where there are stairs, etc. Having a side-view can help if the level is simple enough.
	- FH = Floor Height (example: fh:10)
	- Solid black items can represent things the player cannot go into or interact with. 
	- Ramps and stairs can be indicated by symbols such as arrows and differing FH measurements.
	- Ultimately, make it understandable.
	- You also want ceiling height in there. 
	- FHs and CHs are in UDK units of measurement. 

- Try to design your level for strategic and fun play. Be creative about it. 
- Don't use doors or elevators yet, for you haven't learned about animation yet.

Quick ideas:

- Player starts 
- Health
- Weapons
	- default weapon
	- link gun (like default but faster)
	- shock rifle (strong, instant, precise shots)
	- rocket launcher
- Ammo
- Vehicles
- Bottomless pits of death
- Lava

Where to find vehicles, etc.:

UDK Content Browser > Actor Classes

------------------------------------

Brush-based Modeling

Shift+2 = Geometry Mode
Ctrl + Alt = Marquee Selection

- Remember to turn of Global Illumination in the World Properties.

- If you think it's really likely that you'll want to move an area around, feel free to create multiple boxes so that you aren't having to break up one 
big chunk.

- Click and drag the middle-mouse button in a straight line to get measurements. 

- Hitting 'Split' in the Geometry Tools creates a new edge loop. You have to have a perpendicular edge selected to do so. 

- The keys [ and ] decrease and increase your grid size. 

- Try to keep your vertices on grid points.

- 'Substract' is rarely used in real games. It's usually just for brainstorming. Most of the things you get from Maya are 'additive'. So, rooms are
usually made from building walls rather than subtracting from a larger piece of geometry. 

- You should not be modeling anything complicated enough that you can't willingly restart if you ruin it. 

-Use Split and Extrude and you should be able to get what you want for the most part. 

- SNAPPING IS REALLY IMPORTANT. 

- Ctrl + A = 'Add'

- If you don't snap to the grid, you'll be screwed, and die, and your unborn sons will be cursed, and they'll have to go to Haiti and have a voodoo
shaman lift the curse, but only with a sufficient sacrifice.

UDK - Important Hotkeys

 

Navigation:

OrthoViews:

LMB & RMB for viewport paning

Wheel or both  LMB & RMB for Zoom

Perspective Views:

LMB for Walk and Turn Cam left and right

RMB for free look

Both LMB & RMB for strafe in all directions

Wheel For Zoom

Hold L for Maya Style  Controls:

LMB for orbit, MMB for Pan, RMB for Zoom

(orbit takes  into account selection and where you click)

 

All Views:

Home key centers on selected object

 

General:

Shift 1 is obect/camera mode

Shift 2 is component/geometry mode

Space key toggles transform mode (move, rotate and scale)

Holding Alt while moving object copys object

Holding Shift while moving makes camera follow moving object

Holding Ctrl Moves object with out using transform munipulator

Meaning you can move object by clicking anywhere

Holding A key and click on a surface to add the highlighted object in the browser  to scene

Holding L key adds a new point light where you click

Holding S key adds  static mesh to scene from browser

Square brakets " [ ] " adjust  grid size larger or smaller

Del key deletes selected objects

Alt + Arrow keys nudge selected actors using current transform munipulator

Selection:

LMB selects object or components

Holding Ctrl selects multiple items or deselects individual ones

Holding down Ctrl and Alt draws a marquee selection window

When a surface is selected:

Shift B selects all surfaces on same brush

Shift J selects all  adjacent surfaces

Shift W selects all adjacent wall surfaces

Shift T selects surfaces with the same material

Shift N deselects all surfaces

BSP:

Crtl A create additive brush from builder brush

Crtl S create subtractive brush from builder brush

Materials:

Alt clicking selected material in content browser assigns it to selected faces

Shift clicking selected faces in viewport assigns selected material from browser

Alt RMB on surface in viewport to grab material from clicked surface, after this shift clicking will assign the material that was grabbed.

Copyright Joe Crawford 2009 Creative Commons License by Joe Crawford is licensed under a Creative Commons Attribution-Share Alike 2.5 Canada License.

UDK - Tips For Trickeys Topics

 

These notes are not meant to be comprehensive that all.  They are only here to provide assistance to certain problems which frequently occur for students, and as answers to frequent questions that are asked.

Creating Checkpoints:

Create several player starts and use the Action Toggle to change their enabled status.  At the begining, only the first player start, not the other checkpoints, should have Enabled turned on.

Collision Troubleshooting:

Sometimes collisions properties occur on both the component and the actor. In these case, the actor will override.  Both have to be on, if either is false then the collision will not work. The collide mode like, block all, touch all, etc, are just shortcuts (presets) that change other settings in the collision. Read more here:   http://udn.epicgames.com/Three/CollisionReference.html

Basic Scripting

Script Example 1 - Turbo Boost Switch

//// TriggerTurboBoost Script //// This script creates a Trigger which when activated, permanantly //// boosts the players speed //// Define a new class with a new made up name that inherits from an existing class class TriggerTurboBoost extends Trigger; //// The next two lines define the function and its arguments //// these have to match existing code, *NOTE01* event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal){ //// Cast the passed Other variable so that we can treat it as a "Pawn" class //// And then assign the float 3000.00 to it's GroundSpeed property Pawn(Other).GroundSpeed = 3000.00; } DefaultProperties { } //// *NOTE01* : The existing trigger that is part of udk already defines this function. //// Our has to match. You can actually find the Trigger.uc code in UDK which is //// the file that the line was copied from.

Script Example 2 - Kismet Based Speed Boost

//// KismetSetGroundSpeed Script //// This script creates a Kismet node which when activated //// modifies the players speed //// This script is based on a script shown by user //// PhoenixWing at the site //// http://forums.epicgames.com/showthread.php?t=685112 class SetGroundSpeedKismet extends SequenceAction; var() float NewSpeed; event Activated() { ////This is a variable that we will set equal to a certain ////SeqVar_Object in the foreach function local SeqVar_Object ObjVar; local UTPawn P;//So we can refer to the pawn as P and set it equal to the plugged in variable //This says for every linked or plugged in variable (the purple circle) we want to do this to it. //// We put ObjVar because we want to refer to it later on and it gets assigned to the Linked Variable which means that ObjVar instead of just referring to the SeqVar_Object class will now refer to this particular Object that we plugged into our Kismet action. foreach LinkedVariables(class'SeqVar_Object', ObjVar, "Target") { //// Set the P variable to a UTPawn so it has a //// value and doesnt just refer to the P = UTPawn( ObjVar.GetObjectValue() ); UTPawn class, and that UTPawn that we are setting it to is the Variable we called ObjVar earlier on so Kismet will know which pawn to modify P.GroundSpeed = NewSpeed; //Set the ground speed of that pawn } }

Changing Controls For Custom Keyboard Input

You can change the file: .....\UDKGame\Config\DefaultInput.ini Look for this section: ;----------------------------------------------------------------------------------------- ; Game Keyboard/Mouse Bindings ;----------------------------------------------------------------------------------------- ; Secondary default bindings .Bindings=(Name="Up",Command="GBA_MoveForward") .Bindings=(Name="Down",Command="GBA_Backward") .Bindings=(Name="Left",Command="GBA_TurnLeft") .Bindings=(Name="Right",Command="GBA_TurnRight") .Bindings=(Name="LeftControl",Command="GBA_Jump") .Bindings=(Name="Enter",Command="GBA_Use") ; Primary default bindings .Bindings=(Name="F10",Command="ToggleInventory") .Bindings=(Name="SpaceBar",Command="GBA_Jump") .Bindings=(Name="W",Command="GBA_MoveForward") .Bindings=(Name="S",Command="GBA_Backward") .Bindings=(Name="A",Command="GBA_StrafeLeft")

Changing The Gameplay Behavior of The Player with UTPlayerController

You can edit the file UTPlayerController.uc to reprogram how UDK plays. For example, you could insert or change programming in the UpdateRotation function if you wanted to change how the player would turn and look around.

Creating User Interfaces and Text Messages

There is a good tutorial about creating user interfaces here: http://www.hourences.com/tutorials-ue3-uiscene/ Alternatively, for simple msgs: In Kismet you can use a trigger in combination with an action, using: New Action > Voice/Annoucements > Play Annoucement or Using a trigger in Kismet: You can fill in the object comments field and check the checkbox "Output Obj Comment To Screen"

UDK - Python Script To Rename Collision Objects

## To use this script
## Parent all your collision objects to your base object
## Select your base object and then run the script.
## All of the transform objects that are children of the base object
## will be renamed with UCX_ at the begining and a number at
## the end

import pymel

import pymel.all as pm

 

## Select Heirarchy

pm.select(hi=True)

objs = pm.ls(selection=True)

first_obj = objs.pop(0)

basename = first_obj.name()

for obj in objs:

    if isinstance( obj, pymel.core.nodetypes.Transform ):

        obj.rename( 'UCX_' + basename + "_00" )


pass

Unsorted Notes:

Notes from November 16th 2011

 

A great listing of all the available nodes in the materials editor, and what they do, is available in the official UDK documentation. (This post in response to a question from Gui.)

http://udn.epicgames.com/Three/MaterialsCompendium.html

 

To blend colors (or any values really) use "linear interpolate". Linear interpolate is "blend colors".  The "alpha" input is the blend amount.

The UDK particle system is called "cascade".

Create a particle system by right clicking in the content browser and choosing
"new particle system". Double click to edit it.


You need to have your own material on it. You can click on the "required" block in cascade, and in the properties section, open the emitter section, to find the material properties.  Apply your own material here by pushing the green arrow after selecting the material to use in the content browser.  I recommend a translucent material with a texture for the opacity.

To make your material translucent, click on the material block in the material graph. In the properties section of the window (lower left) you will see several headings.  In the "Materials Heading" > Find "Blend Mode" > use "BLEND_Translucent"

Plug a texture into the materials "Opacity" input to control the transparency.  (Opacity is the opposite of transparency.)

 

For the final assignment handin of term 3, please submit:

  • Deathmatch level
  • Static Mesh with materials and textures (at least color, normal, and spec maps)
  • Interactivity