Unreal Developer Network Content Creation
Welcome to the Unreal Developer Network The Engine Unreal Powered Content Creation Technical Licensee Log In

Content Creation

Content Creation home

Documents listed below, but not hyperlinked, are restricted to engine licensees only.

As certain texts become relevant, due to released games using that technology, new documents will be made available. Check back often!
 
Getting Started
   - WhatToReadFirst
   Support
   - UnEdit (mailing list)
   - UnEditTraffic (summaries)
   - UnDevIRC (chat)
   - UnDevIRCTraffic (summaries)
   - UnrealEdSux0rs (bug list)
   Engine Prerequisites
   - BasicConcepts?
   - TextureSpecifications
   - TextureComparison
   - Etc.

General Editor
   Basics
   - UnrealEdInterface
   - UnrealEdKeys
   - BrushClipping
   - VertexEditing
   - BoxSelection
   - ShapeEditor
   - ExampleMaps
   - TriggersTutorial
   - WorkFlow
   Primitives
   - BspBrush
   - HardwareBrush
   - MoversTutorial
   - UKXPackagesTutorial
   - TerrainTutorial
   - VolumesTutorial
   - LightingTutorial
   - ProjectiveTutorial
   - MaterialTutorial
   - CollisionTutorial
   - FluidSurfaceTutorial
   Animation
   - AnimNotifies
   Particles
   - EmittersTutorial
   - EmittersExamples
   New Particle Editor
   - ParticleSystems
   - ExampleParticleSystems
   Matinee
   - MatineeTutorial
   - MatineeExample
   - MatineeDemoOpening
   - MatineeDemoDropship
   - MatineeDemoSoldiers?
   - SampleMatineeTips
   Scripted Sequences
   - ScriptedSequenceTutorial
   - ScriptedSequenceActions
   - AIControllers
   Techniques
   - LevelOptimization
   - NavigationAI
   - VertexBlendingTutorial
   - ConvertingContent739To829

Tools
   - ActorX
   - UnrealModelTutorial
   - ActorXTutorial
   - ActorXMayaTutorial
   - ActorXPhysiqueNotes
   - SkeletalSetup
   - WarfareSkeletalNotes
   - ObjToASEConverter
   - MayaBrushExport
   - VertexAnimationWith3ds2unr

mathengine.gif
Karma Physics
   - KarmaReference
   - KarmaExample1
   - KarmaExample2
   - ImportingPhysicsAssets
   - RagdollsInUT2003
   - KarmaExampleUT2003

secretlevel.gif
PlayStation2 and GameCube
   - ConsoleDevelopment

Contribute!
You can create a new page, and then you can edit this list to add it to the categories, as well as edit the Content Creation homepage to tell everyone about it!

Make Requests!
You can also stop by the UdnStaff page to see what we're working on, and edit it to add your own document requests.


Please take note! For mod developers working with Unreal Tournament 2003, this documentation is meant to be a starting point for your own explorations into UT2003, not a definitive guide. There will be differences between the documentation here and the product in your hands, and you may have to figure out quite a bit for yourself. Check out the Unreal Tournament 2003 page in the Unreal Powered area for links to community sites if you're having problems. UDN is a licensee support site, and cannot provide technical support or game-specific assistance to end users.

CollisionTutorial

Licensees can log in.

Interested in the Unreal engine? Check out the licensing page.

Questions about UDN itself? Contact the UDN Staff.

CollisionTutorial

Last updated by James Golding (jamesg@epicgames.com) October 22nd 2002

This tutorial is intended for UT2003 (2107) and later versions. It is rather basic at the moment, but will be expanded as time allows!

Collision Overview

As well as making your UT2003 level look amazing, it is worth spending some time on the collision in your level. After this tutorial, take a look at some of the UT2003 maps and see how the methods described here have been used.

Collision with the level BSP and terrain should work fine without much tweaking. Collision with static meshes, however, can require some optimisation, simply because of the large number of triangles involved. The main job here is using simpler shapes for collision than for graphics. There are 2 reasons for doing this:

  • Faster. With the number of triangles now in a level, using just the graphics triangles for collision can get really slow.

  • Smoother. It can be really annoying to get 'snagged' on some small graphical detail in the middle of a firefight!

Collision Types

There are two main weapons for tweaking collision in your level, the 'collision model' and the 'blocking volume'. Both must be 'closed' meshes.

Blocking Volume

These are invisible actors which the player will collide against in game. First make the builder brush the correct shape, then press the 'Volume' button in the editor and select 'BlockingVolume' from the list. These can also be useful for preventing players getting to certain areas of the level eg. over walls.

volume_tool.jpg

Collision Model

These are stored as part of a static mesh, in the .usx package. They are 'instanced' in the same way as static mesh graphics, so are more effecient memory-wise than blocking volumes. Note, in the static mesh browser you can change a few properties of how the collision model is used:

UseSimpleBoxCollision Defaults to True. The collision model (if present) will be used for 'non-zero extent' line checks. This includes things like player movement, but not weapon fire.
UseSimpleLineCollision Defaults to False. The collision model (if present) will be used for 'zero extent' line checks. This includes most weapon fire, corona traces etc.
UseSimpleKarmaCollision Defaults for True. If a collision model is present it will be turned into a set of convex hulls and used for karma collision. If false, karma will collide with the graphics triangles. Note: Only use this option if the graphics triangles are fairly large. See the 'Collision For Karma' section below for more details.

Note: With the default settings, Karma things (such as ragdolls) will pass through a static mesh unless it has a collision model.

Creating Collision Models

There are several ways to create a collision model for a static mesh. After adding a collision model to a static mesh you will need to save the .usx.

Save Brush As Collision

Place the static mesh that you want add a collision model to into a level. Then place the builder brush around it in the shape you want the collision model to be. Keep it as simple as possible! Then select the static mesh, right click and choose 'Save Brush As Collision'. This will take into account any scaling you may have applied to the static mesh.

save_brush_as_collision.jpg

K-DOP

For simple collision models there is a 'K-DOP' fitting tool. K-DOP stands 'K discrete oriented polytope' but that doesn't really matter :) Basically it takes 'k' axis-aligned planes and pushes them as close to the mesh as it can. The resulting shape is used as a collision model. In the editor k can be:

6 Axis-aligned box.
10 Box with 4 edges bevelled - you can choose X, Y or Z aligned edges.
18 Box with all edges bevelled.
26 Box with all edges and corners bevelled.

See below for an example. This util is quite handy for .usx's full of pipes, pillars and railings. Note that a k-dop is not a different type of collision model - it is simply a utility for generating one.

kdop_sizes.jpg

ASE Import

If you are using 3DS Max you and exporting/importing .ASE files into UnrealEd, you can create your collision model in MAX. Create the the collision model as a seperate object, but make sure the name start 'MCDCX_', for example MCDCX_collision (this is case sensitive). Then export both the graphics and collision mesh in the same .ASE. When you import the .ASE into UnrealEd it should find the collision mesh, remove it from the graphic, and turn it into the collision model.

Collision For Karma

The way that Karma works is to generate 'contact points' each frame for where things are touching. This is a more complicated process than performing a line check, so it is important to keep the geometry that karma objects (such as a ragdoll) collide with as simple as possible, both for speed and behaviour. For example, a lot of small triangles can lead to Karma objects getting 'snagged', and will take a long time to process.

First, for an actor to block karma actors, it must have the 'bBlockKarma' flag set to true. This is the default for static meshes and blocking volumes.

If 'UseSimpleKarmaCollision' is true, Karma will take the collision model and turn it into a set of convex hull primitives for contact generation. If you choose 'Show Karma Primitives' from the 'View' menu, it will show you each hull that was generated in a different colour, as well as giving you an overall count (indicated in the shot below). You ideally want to keep that count below 10, certainly under 100.

show_karma_prims.jpg

Karma actors collide against BSP and terrain per-triangle. For this reason, you should make sure your BSP and terrain do not have very small triangles in them. For small details, use a blocking volume/collision model.

Reviewing Collision In-Game

There are several console commands you can use in-game for reviewing how collision is set up - here are a few. Typing them toggles them on and off.

  • 'show collision' This will draw all collision models and blocking volumes in use in the level.

show_collision.jpg

  • 'kdraw triangles' This is only for Karma collision, but shows the raw triangles being fed to Karma for contact generation. It allows you to check the size and quantity of triangles you are getting.

kdraw_triangles.jpg

  • 'stat game' This shows you various useful stats on how long different types of collision are taking.


CollisionTutorial - r1.3 - 25 Oct 2002 - 22:08 GMT - Copyright © 2001-2002 Epic Games
Unreal Developer Network Content by those crazy Perilith guysSite design and art by 2 design