introduction to matinee sai-keung wong chiao tung university, taiwan, r.o.c. reference: mastering...

68
Introduction to Matinee Sai-Keung Wong Chiao Tung University, Taiwan, R.O.C. Reference: Mastering Unreal Technology (MUT)

Upload: sophie-owen

Post on 18-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Introduction to Matinee

Sai-Keung WongChiao Tung University, Taiwan, R.O.C.

Reference: Mastering Unreal Technology (MUT)

Contents

• Matinee• Examples

Matinee Basics

• Change the properties of actors– e.g. materials and colors

• Make animation• Activate events, – e.g. facial animation

• Activate Matinee sequences from Kismet sequences.

Matinee Basics

• Kismet -> Matinee, open Matinee editor• Create cutscenes (游戲玩家無法控制的游

戲片段)。• Create Machinima ( 游戲引擎影片 )

Matinee Basics

Matinee Terminology

• Keys(帧) • Curves(曲线) • Tangents(切线) • Tracks(轨迹) • Groups(组)

– Director Group(Director组)

Animation

Animation is the rapid display of a sequence of images of 2-D or 3-D artwork or model positions in order to create an illusion of movement. It is an optical illusion of motion due to the phenomenon of persistence of vision, and can be created and demonstrated in a number of ways. The most common method of presenting animation is as a motion picture or video program, although several other forms of presenting animation also exist.

• Source: http://en.wikipedia.org/wiki/Animation• [accessed on 10 April 2010]

Keys

• Keys (帧) or “ 关键帧( Keyframe )”• Store information at a specific time instant

Curves

• Curves (曲线) • A shape which is defined between two keys.

Tangents

• Tangents (切线)

Tracks

• Tracks (轨迹) • A set of keys for executing certain controls.• E.g. control the movement of an InterpActor

based on the information of a movement track.

Groups

• Groups (组) • A container of tracks.

Director Group

• Director Group ( Director 组) • A special group• For managing special effects of cameras– For example, • 剪辑,慢动作效果,淡入淡出,以及颜色比例

Example: Mover

• Purpose:– Create an InterpActor static mesh– Move it back and forth between two positions

• In level editor– Create an InterpActor static mesh

Example: Mover

Example: Mover

• Select the InterpActor• In Kismet,– Create a Matinee – Double click the block “Matinee”– Make sure the InterpActor is selected

Example: Mover• In Matinee Editor,• Under “All”, at the empty area, right click,

and click “Add New Empty Group”.

Example: Mover

• Right click at the newly created group “Mover”,• Click “Add New Movement Track”

Example: Mover

• Now, the interface looks like as follows:

Example: Mover• Add a new Key as shown below.• Note: press ENTER to add a new key• Press CTRL and drag the key to change key time

position

slider

Example: Mover

• Now, minimize the Matinee Editor window– Note: Don’t close the window.

• Go back to level editor.• Drag and move the InterpActor to the desired

position. The yellow line is the path of the InterpActor.

Example: Mover

• Save and test.• The InterpActor does not move.• To solve the problem:– In Kismet– Add an event “Level Startup”

Example: Mover

• How do you let it go back and forth?• Don’t read the next slide if you haven’t solved

it.

Example: Mover

• Solution: read below!!!

Example: Mover

• Save and test.

Example: Mover

• In Matinee• Add more keys.• Change the position

of the InterpActor for each key

Example: Mover

• Save and test.• Move the player to step on the mover.

Example: Mover• In Matinee• Click “Toggle Curve Editor”• Click the “black” box.

It becomes yellow.• The motion paths of the InterpActor are shown.

Red: XGreen: YBlue: ZNote: Scale the size if the curvesare not fitted.

Example: Mover

Example: Mover

• Click “Fit View to All”

Example: Mover

• Select a key (marked as square), a tangent vector is shown.

• Move it and see the effect.

Example: Mover• Overshoot ( 過量 )• A part of the curve bounded inside the red

rectangle overshoots, (its value > desired value 500).

Example: Mover

Sound

• Property Dialogue->InterpActor

Close SoundClosed SoundClosing Ambient Sound….

Tracks

Movement Track

• Control positions of objects

Event Track

• Allow Matinee sequences to generate events

Float Material Param

• Float Material Param (浮动材质参数) • Apply to MaterialInstanceConstant (材质实

例常量) for setting ScalarParameter (标量参数)

Director Group Specific Tracks

• Director 组特定轨迹• Create cutscenes

Matinee Remarks

• Movement track: – only for objects with Physics (物理) property– PHYS_Interpolating is checked

• Create a key at time 0.00 instead of using default values

• If a key is selected, a message “ADJUST KEY #” is shown.

Matinee Remarks

• InterpActor 的 CollisionType (碰撞类型)– Default value : COLLIDE_NoCollision 。– Make sure to set it as COLLIDE_BlockAll 或

COLLIDE_BlockAllButWeapons in case you need it • bStopOnEncroach (被碰撞时停止) is

correctly set• Assume that Matinee is open.– Press Shift and move the objects but the camera

does not move.

Example: Elevator

• New.• Subtractive.• Purpose:– Go at the doors– Open doors– Close doors– Move up / down– Open doors– Close doors– etc.

Example: Elevator

Example: Elevator

Example: Elevator

• Now, create a hole between the two floors. How?

Example: Elevator

• Subtract

Example: Elevator

• Assume that you have prepared what you need.

• Select an InterpActor Door

Example: Elevator

• In Kismet,• Create a Matinee sequence• Double click the Matinee block• Now, create an empty group• Add movement track for one door• Repeat for another door

Example: Elevator

Example: Elevator

Example: Elevator

• Now, add sound for InterpActor Doors• Save and test.• The doors do not open. ?!• To solve the problem:– Add a triggerVolume

(right click at “add Volume”)

Example: Elevator

• A green brush is created from the red brush.– It’s the triggerVolume

• Resize the green brush and place it properly.

Example: Elevator

• Select the triggerVolume• In Kismet, create new event using

triggerVolume

Example: Elevator

Example: Elevator

• Select the elevator:– Create a matinee sequence to control its motion

Example: Elevator

• Now, open the doors at the second floor.• Create a new Matinee• Duplicate the data of the first Matinee

sequence for the second Matinee sequence

Example: Elevator

• Matinee motion data can be reused. • Make sure “Relative to Initial” is selected.

Example: Elevator

• Create a Matinee sequence for the elevator at the second floor.

• Note: copy and paste are useful

• What does the Kismet sequence do?• What is wrong with the Kismet sequence?• Save and test.

Example: Elevator

• Start at the first floor• Go to the second floor• Go out of the elevator• Try to go inside after 5 seconds• The platform “disappears”.• Solve the problem.

Example: Elevator• Add triggerVolumes for controlling the

movement of the platform.

Example: Elevator

• Use some variables to record the state of the platform.

• Logic: If the player is on the platform and doors are closed, move the platform.– How do you know that the player is on the

platform?– How do you know that the doors are closed?– How do you know that both conditions are

satisfied?

Example: Elevator

Need a variable (bool or int)to record the state of something.

Example: Elevator

Precise description

• Tasks:– Stand at the doors and open doors– Stand out of doors and close doors– At the first floor. If the player is inside, move up

from the first floor to the second floor– Stand at the door and open doors– Stand out of doors and close doors– At the second floor. If the player is inside, move

down from the second floor to the first floor

Suggestions

• Always make sure “Max Trigger Count” is correctly set.