Материал из CryWiki Russia
Animated movie sequences can be created with ease in the редакторе Sandbox 2.
The Track view is the tool used for making no interactive scenes that are pre determined like cinematic cut scenes, or scripted events.
Included in the CryEngine 2 Sandbox editor is a powerful cut-scene editor, which allows you to sequence objects, animations, sounds, etc. into a scene which can be triggered in the game, and played either as a detached cut scene from the third person perspective, or from the first person perspective of the player as he plays the game. The system will be familiar to anyone who has used animation software like 3D Studio Max, but this brief guide will help those of you unfamiliar with cut scene editors to start creating simple scenes for your levels.
Введение — Основные понятия
The cut scene editor is a little bit different to what you will have become accustomed to while learning the sandbox editor, and there are a few key concepts that relate to it that you need to understand, especially if you have never used a sequence editor before. These key concepts are:
- Timer Indicator Bar
The sequence is the cut scene itself, and for each sequence you can add a number of nodes for each object that you use, including the top level node of the scene itself which is created with the camera icon on the tool bar. For each node that you have, you can have a number of tracks, depending on what kind of node it is. A camera node can only have the default tracks of FOV, Position and Rotation, plus an events track, but an animated object like a Korean Soldier can have many more. Each track is measured in seconds, and has points marked on it to indicate where a sound starts, or where an object will be at that particular time. Each section of a track’s time is marked off by a Timer Indicator Bar, which moves across the track from left to right as the sequence is played. Any key that falls under the Timer Indicator Bar as it moves across the track becomes active.
Описание/элементы редактора кат-сцен
1 Sequence Tool Bar , contains the icons used for editing sequences.
2 Node hierarchy window , area where the components of the scene are displayed, elements can be added here by alternative right clicking in the white space.
3 Timeline , time display of the length of scene and where the scene currently resides.
4 Key editing window , area displays the sequence key frames and where certain events occur, this is where the majority of editing the scene occurs
Панель управление кат-сценой — Иконки и их функции
The cut scene editor has no pull down menus, although each icon does have a roll over hint to remind you what it does.
Файл:Sandbox TrackViewRef image007.jpg Add Sequence, used to create and add new sequences.
Файл:Sandbox TrackViewRef image008.jpg Delete Sequence, used to delete an existing sequence.
Файл:Sandbox TrackViewRef image009.jpg Edit Sequence, used to edit the sequence properties of an existing sequence.
Файл:Sandbox TrackViewRef image011.jpg Drop down selection box for selecting which scene is to be worked on.
Файл:Sandbox TrackViewRef image012.jpg Add Selected Node , adds a selected entity to the track view
Файл:Sandbox TrackViewRef image013.jpg Add Scene Node, adds the scene track to the track view, the scene track contains the high level components of the scene like the camera to be used.
Окно свойств кат-сцен
- Sequence Name
- Contains the name of the current sequence.
- Play On Load
- Plays the scene when the level starts.
- Disables the sequence from being randomly seeked.
- Cut Scene
- Enables the scene to have 16:9 bars.
Переключатели кат-сцены (Cut-Scene Toggles)
- Disable HUD
- Disable the default HUD during the scene.
- Disable Player
- Hides the player during the scene.
- Applies cinema style black bars to the scene.
- Makes the scene uninterruptible by the player when checked.
- Disable Physics
- Disables physical collisions, useful for performance
- Disable AI
- Useful to stop systematic AI interfering with scene, useful for performance.
- Disable Sounds
- Disables sounds that are not in the Track view, useful for disabling systematic sounds from AI which can interfere with the scene.
- Start Time
- Sets the time the sequence will start at.
- End Time
- Sets the time the sequence will end.
Диапазон вывода (Out of Range)
- Воспроизвести кат-сцену один раз.
- Воспроизводить кат-сцену непрерывно.
- Воспроизводить кат-сцену циклически.
Масштабирование тайминга (Rescale Timing)
- Rescales the scene to the length you specify in seconds
- Rescale Time
- Применить выбранную длину кат-сцены.
Элементы управления воспоизведением
Файл:Sandbox TrackViewRef image015.jpg Go to start of sequence
Файл:Sandbox TrackViewRef image017.jpg Drop down selection for playback speed, Playback speed can be adjusted be selecting different values
Файл:Sandbox TrackViewRef image020.jpg Go to end of sequence
Файл:Sandbox TrackViewRef image021.jpg Record, When active, an entity which is selected and contained in the Track view will have it position recorded at the current frame.
Файл:Sandbox TrackViewRef image022.jpg Loop, loops the scene back to start when finished
Файл:Sandbox TrackViewRef image025.jpg Go to previous key, moves the time slider to the previous frame on the track
Файл:Sandbox TrackViewRef image026.jpg Go to next key, moves the time slider to the next frame on the track
Файл:Sandbox TrackViewRef image027.jpg Copy, copies a selected key in a selected track
Файл:Sandbox TrackViewRef image028.jpg Move keys, moves the selected key back and forth when dragged
Файл:Sandbox TrackViewRef image029.jpg Slide keys, moves the selected key and all keys proceeding it back and forth when dragged.
Файл:Sandbox TrackViewRef image030.jpg Scale keys, scales the selected key and all the keys proceeding it when dragged.
Файл:Sandbox TrackViewRef image031.jpg Add Key, adds key frame to the selected track can also be done by double clicking in the timeline track.
Файл:Sandbox TrackViewRef image032.jpg Delete key, deletes key, can also be done by selecting a key in the track and pressing delete key
Файл:Sandbox TrackViewRef image033.jpg Time, displays the time slider is currently on.
Навигация в редакторе кат-сцен
- Полезные сочетания клавиш
- Scrubbing the timeline, click on time bar to make the time slider jump to that position, click and holding will allow scrubbing of the time slider.
Файл:Sandbox TrackViewRef image034.jpg
- Настройка ключевых кадров
- Sliding keys, click on a key frame to select it, a yellow line will appear, click and hold the key frame to slide back and forth to adjust timing.
- Настройка нескольких ключевых кадров
- Click and drag in the empty space to group select key frames for adjusting multiple keys at a time
- Масштабирования шкалы времени
- Zooming the timeline in and out, make sure track view window is active and use the middle mouse button wheel while scrolling to zoom in and out
- Дублирование ключей в треке
- Position the mouse over the key to be duplicated, hold shift then left click the key, a new key should be positioned directly on top of the old one, continue too hold down lift click to drag the key to the desired time.
- Копирование и вставка функционала между двумя сущностями
- First select the key/s that are to be copied, while selected press (ctrl+c)
Then move the mouse over the track of the entity you wish to paste the key frames into. (crtl+v) note, keys can only be copied and pasted between similar tracks, i.e. between the positional tracks of two entities.
Треки и свойства
Each entity supports multiple tracks, the “track” is where keys are edited to create the animated sequence, by adding multiple entities with the desired tracks complex scenes can be constructed.
The first node which is generally always required is the Scene Node, it contains the tracks for the high level components for the scene.
There are many tracks in total, certain tracks are only available if the entity supports them,
Файл:Sandbox TrackViewRef image035.jpg
animObject1 with multiple tracks
- Animates the entities position in world space
- Animates the entities rotation in world space
- Contains a list of event options that relate to the entity, for example unhide and hide on specific frames
The following tracks need to be added manually
- Animates the entities scale in world space
- Animates if the entity is visible or not
- Plays a sound at the specific times, can be and effect or dialogue
- Plays an animation on the entity, animations need to be in the .cal or in a, cga.
- Facial Sequence
- Plays a facial sequence that has been created in the facial editor.
- Look at
- Procedurally controls the character entity to look at a specific entity using head and or eye movement.
- The camera also has its own special FOV track for adjusting the camera field of view during the scene.
The Scene track is slightly different to other entities which are added to the track view
Файл:Sandbox TrackViewRef image036.jpg
Scene node with tracks
- The camera track is used to select which camera the scene will be using at a particular time, multiple camera keys can be added to achieve camera cuts.
- Sounds can be added like other entities, owever the sound track plays sounds relative to the camera view, for example its useful for fp dialogue as it will non directional, as the camera moves around
- The sequence track is used for embedding other Track view sequences within the scene.
- The console track enables various console variables “CVars” to be set and adjusted over time, for example r_gamma.
- Enables a music mood to be set.
Добавление и удаление треков у сущности
Additional tracks can be added to entities for additional functions, by default the basic tracks are only added when an entity is added to the Track view.
Also tracks can be removed from an entity, this is useful for keeping the Track view clean from un needed visual clutter.
Note that only entities can be added, brushes cannot be added to the track view.
Добавление дополнительного трека
Simply right click on the entity in the hierarchy section to display options, mouse down to add track and select the desired track to be added, note that different entity types have different parameters and that certain tracks can only be added for certain entities.
To remove a track simply right click on entity and select Remove Node.
Файл:Sandbox TrackViewRef image037.jpg
Note its also possible to double click an entity in the tree view to select it.
Once keys have been added to a specific track the key properties is required to select the desired function.
By right or double clicking on a key the key properties can be opened. The properties window will differ depending on the track type being edited.
Positional, rotational and scale key properties.
Values can be adjusted in here more precisely than dragging objects around in the view ports,
- Ease To
- Values from the previous key in the track will ease to the next keys value.
- Ease From
- Values from the current key ease to the next key.
- Raising the tension increases the influence this key has over time
- Raising the continuity will cause values between multiple keys to from an angular animation path while a low value will have a smooth animation path.
- Shifts the animation paths influence to either side of the key.
- Indicates which time the frame occurs on in the timeline.
Свойства ключа Look IK
- Select Node
- Selects the entity to be the look at target.
- Manipulated Bones
- Filters the objects that are effected by the look at, eye is eyes only,
Start animation: selects that animation to be played on the entity, note, this option is only available if entity supports/has animations, the animations are referenced in the “.cal” animation file or as a “.cga” contained within the file.
Loop animation: loops.
Root not move: useful for animations that offset from the origin over time.
Speed: used to speed up and slow down animations.
Playing the Scene
A basic flow graph needs to be created for playing a Track view sequence, the flow graph node that is responsible for playing a sequence is found under Animations:PlaySequence,
Overview of the Flow Graph node
Inputs on left
input field for sequence to play.
when triggered will start the scene.
when triggered will stop the scene.
when the sequence is stopped; by default the time slider will go to the very last frame and trigger logic, this can be useful for when a scene is skipped; you can still trigger all the logic and positional info on that last frame, this will option will overwrite that logic.
if a value is stated the game camera will take the value to blend to the Track view camera, used for making the transition from game to cutscene smoother.
same as abovebut for rotational values.
blends the end camera position to the player position, smoothing out transition from cutscene to gameplay.
Outputs on right
triggers output when the scene has started.
triggers output whether the scene has finished by itself or if skipped by the user.
only triggers if scene finishes with out being interrupted by user.
only triggers if the scene if stopped or skipped by user.
By attaching related entities to a common parent, assets can be organized into a more manageable hierarchy.
To attach entities together and create a hierarchy first in the menu select Group>Attach, once selected, select the child then select the parent, the entities will now be linked and by manipulating the parent the child will also follow.
If an entity has a parent it will be grouped under that parent if both parent and child are added to the Track view, this is useful for organizing entities
Файл:Sandbox TrackViewRef image043.jpg
Example of plane_animObject with attached entity hierarchy
If the entities tree is minimised all the children entities will also be hidden underneath it, this is a nice way to keep the Track view uncluttered.
Animating entities with key frame animation
Basic object animation can be achieved in the Track view, using positional rotational and scale tracks,
To start animating the entity keys can be manually added in the Track view and there values adjusted in the Key Properties by adjusting positional, rotational and scale values over time.
Файл:Sandbox TrackViewRef image044.jpg
Track view sequence by manually added multiple keys and adjusting the key properties over time.
A more effective method however is to work by manually manipulating the entity in the view ports and recording the movements,
Файл:Sandbox TrackViewRef image045.jpg
With the record button clicked, and AnimObject1 selected, any movement in the 3d viewport of the entity will automatically be recorded in the Track view, simply move the time slider along to record various positions at different times.
First make sure the entity you wish to animate is added to the Track view, once added make sure it is selected then click the record icon, with the record icon depressed any movement applied to the selected entity will be recorded into the Track view at the current time, to add more keys simply move the track view time slider to another time and adjust the entity to the desired position, there will now be keys frames that the Track view will interpolate between animating the entity.
Animating Camera’s with key frame animation.
Basic camera animation is very similar to object animation except instead of manipulating the camera from a third person perspective it is possible to look through the camera you are animating to get an exact representation of what the camera will look like in the scene.
By default new manually placed cameras are locked, first they need to be unlocked,
Файл:Sandbox TrackViewRef image046.jpg
In the top left of the view point right click and uncheck the “lock camera movement” option, this option will only be visible if you have first added a camera to the scene, next the record button needs to be selected in the Track view.
Again simply position the camera where desired at a given time then while the record button continues to be active move the time slider to a new time and reposition the camera, continue this process to get the desired camera movement.
The cameras “FOV” Field Of View can be animated by adding keys to the FOV track and adjusting the FOV key properties at specific intervals.
Track view, Flow graph relation integration
Certain features required for creating cinematic effects are only contained within the flow graph, in order to access these effects a bridge between the flow graph and the track view needs to be created.
A useful technique for using the Track view and flow graph together is to send events using trigger entities that send events to the flow graph to trigger flow graph nodes, time delay nodes can be used but are more fiddly when adjusting timing and also pose issues when a scene is skippable as the logic will continue,
Файл:Sandbox TrackViewRef image047.jpg
The Track view above has an Area'Trigger “cine_FadeOut_DT” which triggers a leave event at 11 seconds, when this is triggered it will fire a port in the Flow Graph.
First place an Area'Trigger into the scene and add it to the track view, under the event track add a key frame where you want to trigger a certain event in the flow graph, in the key properties select for example Leave, now add this same trigger into the flow graph, when the Track view plays over this key it will send an output from the Area'Trigger’s “Leave” output port, this can be connected with a flow graph node to trigger cinematic effects, i.e. a camera fade.
Skippable Scene Logic
When a track view sequence is skipped in game, the track view by default will still trigger all logic which is placed on the final frame in the Track view. This can be very useful if your scene requires heavy post scene clean up to hide entities specific for the scene.
Файл:Sandbox TrackViewRef image048.jpg
Track view sequence with keys setup on last frame for post scene clean up.
For example, on a sound entity it can be useful to have a “stop” key frame in the event track on the final frame, this means that if the cutscene is half way through playing a sound effect, if the user skips the scene the sound will be stopped, other wise the sound will continue to play after the scene creating a undesired effect.
It is much cleaner/bug free to place event keys on the final frame to clean up the end of a scene, than to place multiple flow graph nodes to achieve the same after a scene has finished.
Capturing scenes to disk for pre rendered scenes and/or post
As a track view sequence is pre determined and camera movement is precise the ability to record them to a movie format is useful.
Possible for promotional work or if its decided to pre render the scene for fluctuating frame rate issues.
Cry'engine 2 incorporates a system for frame by frame capturing that can later be complied into a movie format.
By using a few c_vars frames can be rendered into a local folder
The captured images are by default placed in the root directory off the game inside a folder called “CaptureOutput”
The following c_vars are useful for frame by frame capturing.
used to the lower the game speed to achieve a constant frame rate.
fixed_time_step 0.0for default game play speed fixed_time_step 0.03333 for a frame rate of 30 fps fixed_time_step 0.04 for a frame rate of 25 fps
capture_frames 1, enables capturing of frames capture_frames 0, disables capturing of frames
set the output format for the images
capture_file_format jpg capture_file_format targa
Once the frames have been captured a third party application needs to be use to compile the frames into a movie format.
The layer system within CryEngine 2 helps in organizing assets into workable groups, and helps avoid accidentally manipulating unrelated assets.
By using the layer system in a production environment its also possible for multiple designers to be working on the same level and for the cinematic team to work on the same level at the same time as the level designers.
For each cinematic first create a new external layer.
Файл:Sandbox TrackViewRef image050.jpg
Once you have created new external layers for the required number of scenes, simple make sure you have the layer you want to work on selected, this insures new assets will only by placed on this layer.
Also by only having the layer you wish to work on editable, this is shown by the arrow, you can avoid accidentally adding entities to the incorrect layers, and disturbing previous work.
Another useful workflow tip is to rigorously name every asset in the cine layer with a cine_x prefix, this becomes invaluable during debugging as any problematic asset can then be traced to the specific layer and the designer responsible.
Now any entity that is now added to the level will automatically be added to the selected layer, when the level is saved, this layer will be also saved, it is then possible to work on this layer separately from someone working on the main level .cry file and later re import it into the main level for a latest version of the level.