« Posts tagged beginner

UDK Intro: Geometry Mode

Default 2D Scale Measurements for UDK 2D Platformer Kit

Introduction

You will have to recalculate the BSP every time you want to see the changes you have made.

This lesson will cover the use of geometry mode to transform a brush’s shape, or create an entirely new brush. There are several different ways a brush can be manipulated in “geometry mode” .  Select your builder brush and then hit the geometry mode button (diagram 1).

Unreal Development Kit "Geometry Mode" Button (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_02 NULL.png)

Diagram 1: Geometry Mode Button

Basic Polygon Components (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_01 NULL.png)

Diagram 2: Polygon Components

If you are in geometry mode all corners of your builder brush will have turned into large red squares. When manipulating your brush you should keep the different components of a brush in mind (diagram 2). Using these components often and effectively will save you time. Lets change the position of our “Builder Brush” components using the transform tools. Start by making sure the geometry mode has been turned on.

Tools

Unreal Development Kit Geometry Tool Options (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_03 NULL.png)

Diagram 3: Geometry Tool Options

Edit
While in edit mode you can select and manipulate single or grouped vertices, edges and faces. Try selecting one of the vertices and then hold down CTRL and select a few more. There are no options in the “Properties” section (diagram 3) of the Geometry Tool for edit mode.

Extrude
This mode is available exclusively for manipulating the faces of your geometry. To access this mode you will first have to select a face that belongs to your brush. Only after doing this will the radio button become available.


(http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/bsp01_04 NULL.gif)
To extrude a face simply select the face you want to extrude and pull outwards on the coordinate handles. For a more precise extrusion you can enter the “Length” and “Segments” of your desired extrusion into the “Properties” section. A properly extruded face can be seen in diagram 4.

 

Don’t forget you can also affect the translate handles without pulling on them. Try using these commands:

 

  • translate X = LMB + CTRL
  • translate Y = RMB + CTRL
  • translate Z = LMB + RMB + CTRL
Unreal Development Kit Geometry Extrude (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_04 NULL.png)

Diagram 4: BSP Extrude Example

Brush Clip
Have you ever wanted to split a brush in two, or perhaps make two brushes from a single brush. If so the “Brush Clip” tool is just what you need. In the orthographic view port hold down the CTRL key and click with the RMB. You need two points that clearly cut across your brush to make the clip work (diagram5). Click “Apply” and you will notice that your brush has been split. You should also notice a line perpendicular to your clip line. This line is the “normal”.

Unreal Development Kit Brush Clip (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_05 NULL.png)

Diagram 5: BSP Clipping Example

The normal direction is changeable in the “Properties” section. Reversing the normal will reverse the cut. The normal has to be flipped before the cut is made to have any affect on the brush. Underneath “Flip Normal?” is the option “Split?”. This option will take the part of the brush that is usually clipped off and create a separate brush out of it .

Pen
The pen tool can create new brushes from points you lay down in a orthographic view. To create a brush connect three or more points ending at the first while holding down CTRL and clicking the RMB. The shape is set to auto extrude to a depth of 256.

Try connecting a punch of points together in a random shape. You will notice that the shape extrudes in the coordinate that matches its view. For an example of this create a shape in the top orthographic view and notice that it has been extruded along the Z axis. This extrusion will follow the world coordinate associated with the orthographic view you created it in.

In the “Settings” section you will notice several different options available to you. If “Auto extrude?” is turned off you will not get a default coordinate extrusion when you complete your pen path. The “Create Brush Shape?” option is used in conjunction with several features including the “Lathe” tool. When creating a shape you will notice that the editor always triangulates your shape. If this is something that you don’t want you can tick off the “Create Convex Polygons?” option and your new shapes will consist of quads and n-gons (diagram 6). Our last option is “Extrude Depth”. This is the default extrusion depth your pen tool will create when completed.

Regular vs. Convex Geometry (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_07 NULL.png)

Diagram 6: BSP Clipping Example

Lathe
The “Lathe” tool tries to take your shape and revolve it 360% around the dominant coordinate of your current orthographic window. The “Lathe” option can only be selected if you create a polygon with the “Pen” tool while the option “Create Brush Shape?” is turned on. Your shape will be green in colour.

The last two options will help to control how much of a 360% sweep your shape will occupy. The “Total Segments” option will set how many segments will make up the whole 360% turn. The “Segments” section will determine how many of those segments to actually produce.

Let’s make a simple square with the “Pen” tool and the “Auto Extrude?” option turned off. Start in the top orthographic view and make your four point selection (diagram 7). Now highlight the Y coordinate view (top right by default) and re-select your pen shape. In your options box set your “Total Segments” option to 16 and your “Segments” to 8. Now go ahead and lathe your selected shape.

You will notice that the inner radius of the lathe makes a semi circle. This is because our “Segments” option was set to half of our “Total Segments”.

Unreal Development Kit Lathe Example (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_08 NULL.png)

Diagram 7: BSP Lathe Example

 

Modifiers

Delete
Faces and verticies may be deleted using the “Delete” tool. Be careful when deleting. Look at your geometry closely and make sure you won’t get any unwanted shape changes from the deletion. Any faces you delete can always be repaired by using the “Create” modifier.

Create
Great for filling holes or bridging BSP the “Create” modifier works using verticies. Add a simple cube brush to the world and  delete one of it’s faces.Now select the four verticies around the open face in a clockwise fashion and then hit ENTER. The face will have been created with its normal direction facing outwards (diagram 8). If you were to make the same selection counter-clockwise the face will have been created pointing inwards.

Unreal Development Kit Create Face Example (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_09 NULL.png)

Diagram 8: BSP Create Face

Flip
That thing we just talked about called the normal; it’s what the “Flip” modifier is all about. Working on faces, the Flip modifier reverses normals. Reversing a face’s normals flips the side of the polygon that is rendered. This is why you can’t see the insides of meshes when you pass through them in spectator mode. The normal for all of those faces is pointing outwards.

Triangulate
Fairly self explanatory, “Triangulate” breaks mesh faces up into triangles (diagram 9). If you notice a surface of your BSP is rendering funny triangulate the faces giving your the trouble. Chances are they’re n-gons of some sort. Try creating a cube brush and selecting it’s top face. Now triangulate that face and notice how that quad (four edged  polygon) was broken up into two tris (three edged polygon).

Unreal Development Kit Geometry Mode Triangulation (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_10 NULL.png)

Diagram 9: BSP Triangulation

Turn
If you have two triangles on a brush that share a common edge you can “Turn” that edge .This rotates the the common edge of the triangles. Doing this causes the line that connects the two triangles to snap the the other 2 verticies that make up their 4 verticie border (diagram 10). If you still are unclear on this try using the pen tool to make a non extruded shape. Now “Triangulate” this shape and practice turning some border edges of triangles around.

Unreal Development Kit Turn Edge (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_11 NULL.png)

Diagram 10: BSP Turn Edge

Split
The “Split” tool adds “edge loops” or a series of verticies that run around your mesh connected by edges. Create a cube and select one of its edges and then use the Split modifier. Notice that a line was run around your shape that is perpendicular to the original edge you selected (diagram 11). This will always be the case when Splitting. In conjunction with the “Extrude” tool, splitting can work well to help you achieve whatever BSP shape you need. Diagram 13  illustrates the idea behind this.

Unreal Development Kit Edge Split (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_12 NULL.png)

Diagram 11: Edge Split BSP With Extrusion

Optimize
Using “Optimize” on a group of faces with adjacent edges will create a new polygon in their place that has no edges running though it. Any verticies that are no longer required to keep the shape of the brush will be deleted. Depending how you merge your faces you can end up with some really “interesting” polygons. Try to make sure all your optimizations create quads or tris.

Weld
Verticies can be merged using the “Weld” tool. The position of the resultant merge will be the location of the first verticie you selected (diagram12). Create a cube and select two of the top verticies and Weld them togeather. Now do the same to the other two and then once more so you’re left with one verticie. Move the single remaining top verticie to the middle of the cube in the top orthographic view. You know have a pyramid. Wasn’t that fun?

Unreal Development Kit Weld Vertex (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/BSP01_13 NULL.png)

Diagram 12: Vertex Welding Steps

 

Conclusion

To exit geometry mode click the “camera mode” button (it looks like a TV camera) located beside the “geometry mode” button. It’s also of note that to “Undo” picked points with any of the tools you can hit the “ESC” key.

UDK Intro: Getting Started

Introduction

This lesson will cover the very basics of the interface while manipulating the “builder brush” with transform tools. For those of you who don’t have it yet the UDK can be downloaded here from Epic Games.

To enhance your transition into the Unreal Developer Kit please accept this assistance: Interface Diagram (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/udk_interface NULL.jpg)

Startup

After you get UDK installed and running you will notice several different options in your windows start menu. For this lesson we are going to open the one labeled “Editor” (diagram 1) . A “Tip of The Day” window will greet you upon entry. Whether you choose to leave this notice on is up to you. Right now simply click the “OK” button.

Diagram 1: Unreal Development Kit Icon (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_01 NULL.png)

Diagram 1: Unreal Development Kit Icon

Diagram 2: Unreal Development Kit SectionProgram Tabs (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_02 NULL.png)

Diagram 2: Unreal Development Program Tabs

The first window to gain focus after clearing the Tip of The Day button is the “start page”(diagram2). This page is a way for Epic Games to get news and updates to you through the UDK. Close this windows and you should see the main program window behind it (diagram3).

Diagram 3: Unreal Development Kit Main Window (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_03 NULL.png)

Diagram 3: Unreal Development Kit Main Window

The main program window is where we will be spending the remainder of this lesson. We’ll get to the other window, referred to as the “generic content browser” in the next lesson. Our first objective is to create a new file. There are two types of files we can create. Click on the File menu in the top left corner of the editor and select “New”.

We are given a choice between “additive” and “subtractive”. Generally you are going to want to use the additive level type. Select the additive radio button and click “OK”.

Navigation

 

Each view port can be maximized so that you can see its contents more clearly by pressing the “maximize view port button”. This button is the last button on the right of your view ports pictograph menu represented by a square with a black top border (see diagram 4). If you are running a dual monitor setup you might be interested in increasing your UDK screen space. To do this click the “tear of a floating copy” button located to the left of the maximize view port button. This button can be seen in diagram 4.

Diagram 4: Tear Off / Maximize World View Panel (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_04 NULL.png)

Diagram 4: Tear Off / Maximize World View Panel

Perspective View Port
Translate back and forth by holding down the left mouse button (LMB) and moving your mouse forwards and backwards.

Pan the camera in any direction by holding the LMB and RMB down while moving the mouse.

Free look by holding down the RMB and moving the mouse around.

WASD Cluster
You can hold down the right mouse button and use the classic W,A,S,D key cluster to move around as well. The Q key and R keys can be used to change your camera’s elevation level.

Orthographic View Ports
You’ll have noticed by now that you have three other view ports available to you. These are your orthographic view ports. They are fixed camera views of your level from the top, front, and side. In these views you obviously can’t free look, but you can pan around and zoom.

Take note: if at anytime you feel the camera is moving to slow you can adjust the speed in each view port independently by pressing the “toggle camera speed button” seen here in diagram 5.

Diagram 5: Unreal Development Kit Camera Speed (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_05 NULL.png)

Diagram 5: Unreal Development Kit Camera Speed

Basic Geometry Manipulation

On the left hand side of your screen you will notice two vertical rows of basic geometric shapes grouped together. This is your “brush pallet” (see diagram 6). Right click on the cube icon in your brush palette. A window with  the primitive’s properties will have popped up and in those properties we can clearly see the X, Y, and Z values for the cube’s dimensions. Click on each field and change the values to the following X:1024 Y:1024 Z:256. Now hit the “build” button and close the window. This red cube wire frame you have created is called a “builder brush” and it represents a shape that you could potentially add to your level. To get a better look at our new red “builder brush” lets navigate closer in the perspective view port.

Diagram 6: Unreal Development Kit Brush/Primitives Palette (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_06 NULL.png)

Diagram 6: Unreal Development Kit Brush/Primitives Palette

This wire frame cube we have added can be manipulated just like geometry in a 3D suite such as Maya or Cinema 4D. You can manipulate geometry in  three basic ways: translate, rotate, and scale. All of the tools to do this can be found along with the “undo” and “redo” buttons in the pictograph menu just below the main program menu (see diagram 7).

Diagram 7: Unreal Development Kit Undo / Redo Buttons (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_07 NULL.png)

Diagram 7: Unreal Development Kit Undo / Redo Buttons

The first button that looks like a mouse is your “selection” tool. If at anytime you lose focus of an object your manipulating you can simply select this tool and click on your object. You can’t manipulate geometry in this mode.

Translate
This button is located to the right of  “selection”. You can use this tool to move your object around in your level by clicking one, or combination of two axis arrows. The arrows are colour coded to match their coordinate direction. There is also a coordinate indicator in the bottom left of the perspective window (see diagram 8).

Diagram 8: Unreal Development Kit 3D Coordinate Orientation (http://www NULL.terrymatthes NULL.com/wp-content/uploads/2011/07/intro01_08 NULL.png)

Diagram 8: Unreal Development Kit 3D Coordinate Orientation

Rotate
To rotate your object you highlight one of the coordinate axis orbiting your object and drag. Unlike the translation tool you can’t move in more than one axis at a time.

Scale
Scaling your object can be done in two ways. You can scale your object up and down uniformly, or each coordinate direction can be scaled on it’s own.

To scale uniformly select the large gray square with the little square inside it. This is the bigger of the two gray squares seen side by side.  Notice that all coordinate axis handles are red. No matter which one you choose to pull on they will all scale your builder brush in the same fashion.

Non uniform scaling lets you increase the scale of one or two coordinates independent of the remaining coordinate(s) by dragging the handles you want to change. To select multiple handles move your mouse closer to the center of the two handles you want to manipulate.

Take note: You can use any of the manipulation tools as a selection tool. This way you don’t have to go  back and forth between manipulation tools and the selection tool.

Conclusion

The remaining intro lessons will be spent setting up very basic map. The goal will be to get you familiarized with the major aspects of the UDK. The topics you’ll be introduced to will include: adding geometry, materials, lighting, static meshes, particles, sound/music, and visually scripted events.