This site is not endorsed by or affiliated with Crytek or Electronic Arts. Trademarks are the property of their respective owners. Game content copyright Crytek.

This is a rewrite of the original online sandbox 2 manual, which used to live on doc.crymod.com
Years ago it stopped working and this message has been there ever since:

The new docs.cryengine.com hosts the documentation for Cryengine 3 and 5 but the Cryengine 2 documentation is no longer available online from Crytek or anyone else as far as I know except for archive.org of course. I downloaded it back when it was still live.

In the process of creating the reloaded fan project I am going through this documentation and everything I can find on modding the original crysis game. Therefore I think it is useful to 'rewrite' this manual over time and make it accessible and as comprehensive as possible. I am posting the complete manual here on one single html page and I am going to fit in all information I can find that is useful, including asset creation and programming the game / mod setup and SDK etc.

This is an ongoing process starting with just writing down the original manual on one html page - formatting and linking inside of it etc will happen over time. Your help and input is appreciated in this effort - please mail me under roadie@game-reloaded.neptunian.org with any suggestions, praise and pointers to good documentation on the topic of Sandbox2 - Cryengine2
Thank you
Germany July 11th 2018

Sandbox 2 Manual

Copyright © 2008 Crytek GmbH, All rights reserved

Index

Installation of Sandbox

backtoIndex

Overview
This document is giving a short description of where to find and how to install the CryENGINE®2 Sandbox.
Installation

Location of the installer

On the Crysis game DVD there is a folder named "Sandbox2"
Within this folder, there is an Microsoft Installer package (msi), named CryEngine®2 Sandbox 2.msi

sandboxinstall

Running the Installer

Double click the CryEngine®2 Sandbox 2.msi file to open the first dialog of the installation process

sandboxinstall

Click Next to accept the license agreement.

sandboxinstall


Restoring CryENGINE®2 Default Settings

backtoIndex

Restoring of the system defaults
Open the Windows Registry Editor
Depending on the operating system and your StartUp Menu Settings you will find the necessary program shortcuts in different locations.
Windows XP and Windows Vista with Start Menu set to classic view:

Windows Vista with normal Start Menu

enter regedit in the popup box that appears

restoredefault

Editing the registry

In the Registry Editor, open the Search field (Edit -> Find), and enter:
HKEY_CURRENT_USER/Software/Crytek/Sandbox 2

restoredefault 2

Click on “find next”
When you find the folder, highlight it and press the delete button, or right click on it and select delete.
If you have followed this process correctly, your settings should be back to defaults.


Editor Interface Overview

backtoIndex

This document will give a brief overview on the most important aspects of the different sections of the editor interface. More specific information about certain interface elements can be found in the respective reference documents.

The Main Editor View

The main editor window by default contains various sub-windows which allow you to perform the majority of editing functions.

The Main Menu

The main menu at the top of the screen contains the menu options for the editor. It includes things from basic file save and load functions, to terrain editing, to display options and access to the more advanced functions of the editor. For more information check the Sandbox Main Menu reference documentation.

The Perspective Viewport Window

The perspective viewport window is the main window used to view your level. This is where a large majority of level design tasks will take place, such as object placement, terrain editing and in-editor playtesting. A brief tutorial on controlling the main viewport can be found here.

The Rollup Bar

The Rollup Bar is basically a quick menu for many kinds of functionality within the editor, stored in an easily accessible format. The rollup bar is split up into several tabs, containing object creation tools, terrain editing tools, display options and layer organization tools.

The Console

The console is a command line editor, allowing access to many advanced functions within the sandbox editor, including various debug and test modes. Further Information can be found here.

Status Bar

The status bar contains translation/rotation/scaling information for selected objects, editor interaction shortcuts and camera controls. Details on this can be found here.

The Toolbox

The toolbox can be customized to contain shortcuts to useful editor command lines and functionality.

Track View

Track View is a tool used to create uninterruptible sequences of events in-game, such as animations or cutscenes, within a specific timeframe. More information can be found in the Basic Trackview Tutorial.

Database View

The database view is an interface for the various libraries available for use within the editor. Libraries can be imported and exported from the database view, and various other functions can be performed from within each library. Library types included range from the entity archetype library, the vegetation library, the sound and music libraries and the particle effect library. More information on the Database View can be found here.

The Material Editor

Much like the tabs contained in the database view, this window contains a library of materials to be used ingame. Material libraries can be imported/exported and individual materials assigned to objects. The properties of these materials can also be altered here. Detailed information can be found in the Material Editor Reference document.

The Character Editor

The Character Editor tool allows the user to view character models and animations, create character setups and variation. It also contains a lot of animation/rig debugging options.

Flowgraph

Flowgraph is the powerful imbedded visual scripting language included with the sandbox editor. Alongside allowing access to these scripting functions. This window also includes various organizational and search functions.

Animation Graph

The animation graph is used to set up animation states and links between animations within the editor. Animation graph information can be found here.

The Vehicle Editor

The vehicle editor is a tool used to create, set up, tweak and balance vehicles from a model. More information can be found here

The Smart Object Editor

The smart object editor is used for the creation and logical setup of smart objects for use in the game engine. Smart objects are used to create logical interactions with the game world, to perform various functions, such as giving AI the ability to play animations upon interacting with these objects. More information can be found in the Introduction to smart objects.

The Facial Editor

The facial editor is a tool used for creating, previewing and editing facial animations. It includes tools to assist with mocap, morph targets and expressions. More information can be found in the Facial Editor document.

Time of Day

The time of day editor is a very in depth tool which can be used to control many aspects of the sky setup in your level, including sun position, sky color, fog settings, blending settings between different times, lighting values and much more.

The Dialog Editor

The dialog editor allows dialog to be placed into the game in a form usable with flowgraph, ready for localization and built to be sequenced with subtitles. More information found here.

Useful Links

And here is a compiled list of all external links in this document:


Interacting with windows and toolbars

backtoIndex

The View Tab

Firstly, lets have a look at the “View” tab. This tab allows you to turn on and off the various windows and toolbars you have access to.
If you close a window and want to open it again, you can do that here.
Lets open up a window. Go down to “Select Objects” and left click.

Scaling and Moving Windows

This will open up a window somewhere on your screen. Ignore the contents, lets just resize the window. Move the mouse to the edge of the window, so the cursor turns into double ended black arrow, click and hold the left mouse button and move the mouse. Now, lets move the window. Left click and hold down the button in the titlebar of the window, and drag the mouse.

Docking Toolbars to the side of the View Panel

You may have noticed that these buttons appeared as you moved the window around. Don’t panic, everything’s not as complex as it seems Lets “dock” the selection window to the left of the screen. Grab the window by its titlebar, and move it over to the left of the main view window, on to the docking button that will appear, and let go of the mouse button. Now, your window is docked! Now undock it, simply by grabbing the title-bar again and moving the selection window away (make sure you don’t accidentally re-dock it by moving it over a button). You may want to resize the window at this time.

Docking a Window as a Tab in another Window

This is a great space saver, especially if you only have one monitor. You may have noticed previously, when you move a window within another window, there’s a new central circular button.

docking button

This allows you to place the currently selected window as a tab within another window. Grab the selection window again, and move it into the flowgraph window, and on to the central “dock as tab” button. You will notice now that there are 2 tabs at the bottom of the window – Flowgraph and Select Objects

tabs statusbar

You can select each window by clicking on its appropriate tab. You can undock a window by grabbing its tab, and dragging it away.

Navigating the Rollup Bar

If the rollup bar isn’t already open, open it in the usual way, using the view tab. The rollup bar gives you access to many different functions of the editor. Here’s a brief overview on how to navigate round it. This section is covered in more detail elsewhere.

Navigating the Rollup Bar Tabs

Here’s what your rollup bar looks like.
There are 5 tabs at the top of the bar.
You can switch between tabs simply by left clicking on its icon.

Navigating within a Tab

Ok, go back to your Objects tab. Click the Entity button, and you’ll see something like the below, showing a list of all the entities available to you. We’ll go into this in more detail elsewhere.

Click one of the folders in the browser window, to open it up or close it

Tidying up the Rollup Bar

If your rollup bar becomes a little cluttered, or is too large to fit onscreen, there are a few ways to manage this. Firstly, you can collapse a section by clicking on its header, as shown on the left below. The result is on the right. Also, you can use the bar at the side to scroll up and down. Gab the bar and move it down, to get the result shown below.

Show/Hide helpers

Every object in the game has a bounding box, or an icon which shows where it is and what its function is. With hundreds of objects in your level, this can become confusing. To turn all the helpers in your level off go into Display Show/Hide Helpers.

Show Pivots

Using default control setup, pressing space down will show all the pivots for the objects in the scene. If you hold this down, you can also move your mouse over the objects and select them easily by the point that appears.

Navigating in the Perspective Viewport

backtoIndex

Viewport Movement

You can control your horizontal movement with the standard WSAD control system.

Hold RMB (right mouse button) and move the mouse to turn your view, when the mouse is within the window

Hold MMB (middle mouse button) and move the mouse to pan your view

Roll the MMB Wheel (middle mouse button wheel) to move your view forwards and backwards
Hold SHIFT to double the speed of your viewport movements

Viewport Movement Speed Control
The dialog box indicated is used to increase and decrease the movement speed of all movements you make in the main perspective viewport.


Object Placement and Modification

backtoIndex

sandhesten:
The two basic objects in Sandbox are: Brush - Static object. Cannot be manipulated in any way except if it has been set up to break by the artist who created the asset. Can not be used or added to flow graph. Examples: Rocks, concrete buildings. Cheap on performance. Entity - Anything in the game that needs to interact in some way. Can be added to and used in flow graphs. Examples: Triggers, AI dudes, vehicles. Adding a lot of entities can slow down performance. Geom entity is a very cheap entity, performance wise. It has a very limited set of properties and can only be used in a limited way in flow graph. An archetype entity is an entity that has its properties defined in the entity archetype library in the DataBase view. If you change a property of an entity in the Archetype library it is reflected in all archetypes of that type that are placed in all levels. This is good for consistency. You can make sure that a barrel for example has the same weight in all levels or a certain AI type has the same sight range all over the game. A prefab is a group of brushes and/or entities. You can for example place a hut and decorate it with props and place weapons inside and then make a prefab out of it. If this prefab is placed in several locations, throughout several levels even, and you choose to change something in the central prefab it will be reflected in all prefabs of this type. Again, like the Archetype entity, good for consistency.

This section will cover the basics of placing an object down in the editor, select and deselect it and move it around, as well as various other modifications you can perform on an object. It will also cover some other useful functions of the editor, to help arrange and manipulate your objects.

Placing a brush

Selecting move mode and follow terrain
Firstly, you need to do a little setup to do with how the object is placed into the level.
Select Move mode so you’re able to move the object. You can do this by clicking the button shown below. You should also select the “follow terrain” button, so the object will slide along the terrain when you drag it out.
Alternatively, Move Mode can be found in Edit > Editing mode > Move, and Follow Terrain can be found in Edit > Constrain > Constrain to Terrain/Geometry

Creating a brush

To start, we’re going to place a very simple object down, called a brush. To do this, open up the objects tab of your rollup bar and select the “brush” button.

Selecting your brush geometry

Next, you need to select the geometry of the object you want to place. Lets use a rock. Double click on the natural folder as below.

A single click on the subsequent folders, Rocks and then Vulkan_Rocks, will lead you to a point something like this.

Dragging a brush into the main viewport

Move your mouse on to the name of brush you want in the brush browser, click and hold the left mouse button on the brush, drag the mouse into the main editor view and release the mouse button.
In this case, you want to drag out vulcan_rock_a
And now, you should see something like this.
If you don’t see something like this, don’t worry. Go back to the previous step about “move mode” and “follow terrain”, and make sure move mode is turned on.
Then, follow the instructions below.
If you accidentally lost your object or deselected it, press Ctrl-Z to undo your last action.

Snapping an entity to the ground

When you are in “move mode” with an object selected, press Ctrl + Shift + Left mouse button to “snap” the pivot point of the entity to the ground where you click.

Deselecting and Selecting Objects

So, now we have an object in view, lets deselect it and then select it again. There are 2 easy ways of deselecting objects – press Escape, or click anywhere else in the view screen (be careful not to click on another object though). Deselect your object now using one of these methods.
To select an object, simply move your mouse over the object and press the left mouse button.

Selecting multiple objects

To select multiple objects, click and hold the left mouse button in the perspective view, drag a box around the objects you want to select, then release when all the objects required are inside the selection box.

Adding and Deselecting objects

Press Ctrl and click with the left mouse button to remove an object from your current selection.
Also, the same procedure will add an object to your current selection.

Modifying an object

The different object manipulation controls You can select different object control modes by clicking the appropriate icon, or pressing the 1 2 3 and 4 keys.
Alternatively, select the individual modes using the edit menu in the menu bar at the top of the screen.
Edit -> Editing mode -> Select Edit -> Editing mode -> Move Edit -> Editing mode -> Rotate Edit -> Editing mode -> Scale

Select & Move tool

Make sure you’re in move mode. If you’re not, select it.
Now, select your object, and you will see it has X, Y and Z selection bars, each corresponding to a different direction. The X bar is red, the Y bar is green and the Z bar is blue. The bar you previously had the mouse over will be yellow.

If you move your mouse on to one of the bars, click and hold down the left mouse button, you can drag it back and forth in the direction it’s pointing, along that axis.
You will notice between each bar, there is a square. Use this to drag along 2 different axis.

Select & Rotate tool

As with move, you can rotate your object using its control bars.
Edit -> Editing mode -> Rotate

Select & Scale tool

The scale tool allows you to increase the size of an object, along its different axis’.

Clone

The first thing you need to know after making your first object, is how to make more of them!
Simply select your object, press Ctrl-C, then move your mouse to where you want the copy of your object to be, then click the left mouse button.
You can also copy an object by going into the menu bar at the top of the screen.
Edit -> Clone (Ctrl+C, Ctrl+V)

Undo and Redo

At the top left of the editor, you’ll notice two icons with arrows inside them. These are undo and redo. Pressing undo will take back your previous editor action, and after you undo is performed, redo will perform the action you just undid.
Also accessed by: Edit Undo (Ctrl Z) Edit Redo

Advanced Object Manipulation

Axis restraints

You will see the icons in the image below at the top of the editor frame. Each of the icons “restrains” the object, to only move in the direction you select, when you drag the object. Clicking a different axis of the object will change the restraint. Shown below, the yellow highlight is the direction the object is restrained in. For example, the XY restraint will restrain the object to only move horizontally. Also accessed by: Edit -> Constrain -> Constrain to X Axis Edit -> Constrain -> Constrain to Y Axis Edit -> Constrain -> Constrain to Z Axis Edit -> Constrain -> Constrain to XY Plane

Snap to Terrain / Objects

The terrain snap and object/terrain snap make sure your objects move along the ground correctly. Terrain snap will only snap to the terrain itself. Object/Terrain snap will also move your objects along any other objects on the ground. Please note, this will not affect the rotation of your object at all, and it will snap the object to the floor at its axis point. Also accessed by: Edit -> Constrain -> Constrain to Terrain/Geometry

Snap to Grid

Click the button below once to turn snap to grid on. This will make sure any objects you move only move in distance “steps”. Also accessed by: Display -> Snap to Grid

The small arrow directly next to the main movement snap button will bring up a drop down menu, which can be used to select the size of the grid to use to align against. Click Setup Grid.
This is what you should see after clicking Setup grid.

Snap Angle

As for grid snap, angle snap will cause your objects to snap and only rotate by the predefined set amount.
Also accessed by: Display -> Snap Angle
Go to object and align to object
To use “go to selected object”, select the object you need, and click the button shown, and the perspective view window will center on the object you have selected.
To use “align selection”, select an object, press the align selection button, then click the destination object. All transforms (position, rotation, scale) will be copied from destination object to your initial selected object.
Also accessed by: Modify -> Goto Selection Modify -Y Align/Snap -> Align to Object
Object lock and object positional controls At the bottom of the screen, you’ll see several other controls.
Lock selection will make you unable to deselect the current object
The object position controls allow you to move an object to an exact position in the level, using the type in dialog boxes. Also, fine tuning an object’s position can be done using the up and down arrows to the right of each dialog box.
Also accessed by: Edit -> Lock Selection


How to create a new map

backtoIndex

sandhesten:
The best way to rename a level is to simply rename the folder and the .cry file. Then open up the level in Sandbox and do a File --> Export to Engine.

Is it possible to show text on the map? I would like to show place names or road names when you are zoomed out and high above the map? I hope it would kinda look like the names that are overlaid on Google Maps.
You could use the Comment entity for this. I don't remember the exact location of it but try either RollUpBar --> Entity --> Others or RollUpBar --> Misc.

The following walkthrough will show you the fastest way to create a new map.
The maps in the game Crysis are all based on real height-maps to get a realistic looking landscape.

Create a new map folder and file

In the File menu click New.
Enter a name for your level in the Level Name dialog box, then click OK.
When you click OK, the editor will create a new folder in your levels directory named after your map, containing all the necessary files. The most important file in that directory is the .cry file, which contains all the major information for the editor.

Adding terrain to your level

Generating Terrain
Now we have a new empty map and need some terrain to walk on, so, lets auto generate some.
To create some terrain click Edit Terrain from the Terrain menu.
Next click Generate Terrain from the Tools menu.
You can also access the Terrain window by clicking on the Terrain button, by default found in the main editing toolbar.
This will open the Generation window, where you can with the following parameters influence the appearance of the terrain:

The default settings should be fine, so click OK. After generation is completed, you should see something similar to this:
Now, close the Terrain window by clicking OK and you will see the changes in the 3D view.
The terrain is now shown in grey, which resembles the height of the terrain. The brighter the terrain is the higher it is. The blue water texture hides all terrain that is below sea level giving you a correct impression on the actual landmasses.
To get a first impression with a default texture applied, you need to regenerate the surface texture of the terrain.

Generating the surface texture on the terrain

Click Generate surface texture from the File menu.
The dialogue box below will appear - you don’t have to set anything, but you can select High Quality if you want (it takes longer but you get higher quality). Click OK and wait until the calculation is finished.
Your view should now look similar to this, showing you a first impression of your landscape.

Results

You are now already able to jump into the game mode by pressing CTRL+G, so you can run around on your new creation.
Things to experiment with:


How to Modify Terrain

backtoIndex

The following walkthrough will give you an overview how to modify terrain in Sandbox. Well modeled terrain is an important base for creating a good level. The goal in this tutorial is to pass on some basic knowledge about the terrain editing tools.

The Modify Terrain mode toolbar

In the RollupBar, select Modify from the menu shown below.
This will open the Brush Settings dialog.
There are three types of brushes that you can use to edit your terrain: Flatten, Smooth and Rise/Lower.

Important brush options

In the Brush Settings menu are several sliders to modify your brush.
The Outer Radius slider changes the size of the brush.
The Hardness slider changes the strength of the brush. A lower value will give a soft effect and higher value will make it stronger.
The Height slider modifies the height settings of applicable brushes.

Click the Modify button again or press ESC to stop editing terrain.

The Flatten brush

The Flatten brush will make any piece of terrain completely flat, at a predefined height.
To activate the Flatten brush you have to select the arrow next to the Brush Settings type selection tool.
Next, select the appropriate option, in this case Flatten.
And click the mouse button.
To flatten the terrain, first you need to select a height in the height control slider, within the Modify Terrain panel.

Now, click and hold the mouse mutton in the perspective viewport, move the mouse around. The terrain will be flattened wherever the brush is.

The Smooth brush

The Smooth brush makes sharp terrain smoother and softer. Activate the Smooth brush in the same menu as the Flatten brush.
In the perspective viewport, click and hold the mouse button on the terrain and then move the mouse around.

Rise/Lower brush

The Rise/Lower brush will allow you to increase or reduce the height of the terrain, to make natural terrain structures, like hills and mountains. Activate the Smooth brush in the same menu as the Flatten brush.
Click and hold the left mouse button in the perspective viewport, and move the mouse around. If you have set a positive height in the slider, the terrain will move up.
A negative number set in the height slider will move the terrain down.

TheResult

As you can see in the images below, with a little practice, it is possible to create realistic and interesting terrain. Creating a nice terrain setup is a good first step in the creation of a level, so its well worth taking the time to practice a little.


How to paint Terrain

backtoIndex

sandhesten:
If you open up any of the Crysis levels in Sandbox you will see that we try to limit the number of surface types as much as possible. Some levels don't even need all 14 surface types; Tank uses 11, Sphere uses 9.
If we can do it, you can too...

This document will give a short overview of how to create terrain layers and paint them on to the terrain. The creation of different terrain types works like the painting in layers in the common 2D graphic designing programs. For the painting of terrains it is necessary to use a few different components of the Sandbox2.

Preparing a terrain layer

Opening the terrain layer editor Click Texture from the Terrain menu.

Adding a new layer

The window shown below should open.
By clicking on the icon to the left of the red X a new layer will be created. By default the cursor will jump into that bar of the new layer so it can be named directly after creation. It is suggested to name the layers in a way that declares what it is used for.

Adding a material

After you create and name a new Layer, its settings will be shown in the dialog of the Static field next to the Layers overview. The LayerID will be set to -1 by default. This LayerID will be changed automatically when the Layer is used first time. It is generally not a good idea to change the LayerID by hand. Click the Edit Surface Type button again. Note: Immediately after creating a layer, some of the Terrain Layers Editor, including the Edit Surface type button, becomes unselectable. Select another layer and then select the previous one again to enable the inactive components.
Now, click Add in the Surface Types window, to create a new type and then click Rename and type an appropriate name.
Next, open the Material Editor.
Now, select a material from the terrain folder.
After choosing the desired material by highlighting it, close the Material Editor, and the previous window will show again.
Now, click the Pick Selected button and then OK. If you click only OK then the material you highlighted will not be saved.
Now you have created your surface type, you need to assign it to your Terrain Layer, by selecting it from the Surface Type drop-down list.

Adding a texture

Click the Load Texture button to the right of the image previewer.
A list of available textures will appear – select one and click Open.
Now click OK until you arrive back at the main perspective viewport, and you will have a complete terrain layer, ready for use.

Painting terrain

Access the layer painter under RollupBar > Terrain > Layer Painter.
After selecting this, a little way below the available materials can be found.
In the now available Brush Settings menu are two sliders to modify your brush.
The Radius slider changes the size of the brush


The Hardness slider changes the strength of the brush. A lower value will give a softer effect.
And a higher value makes it stronger.
Now, click and hold the mouse button in the perspective viewport and move the mouse around. The terrain will change the texture wherever the brush is.
The Filter option gives the ability to modify the basic color of the paintbrush.
Select the color tab in the Tool. The color selection box will be open.

Chose a new color in the main window and tweak the brightness to what ever you want.

Click OK. The Filter option will show the new selected color.
Now, click and hold the mouse button in the perspective viewport and move the mouse around. The terrain will change the texture with the new color wherever the brush is.

Result

As you can see, a well painted terrain can look very realistic. If you have a good vegetation setup and good brush placement, you can achieve incredible results.


How to Use the Vegetation Tool

backtoIndex

This part of the tutorial shows how to create a basic setup for vegetation categories, vegetation objects and how to place and modify them in a level
The best results are achieved by manually placing vegetation objects, as it gives you the most control. But by setting up interesting vegetation categories, you can create a good looking base, which will need only minimal reworking. To create nice looking presets, you can tweak the values we discuss in this tutorial.

Vegetation Setup

Switch to the Vegetation Tool
In the RollupBar, select the Terrain/Vegetation

Adding a Vegetation Category

Click the Add Category Button and type in an appropriate name. We will use “Forest” for this tutorial. Confirm the name by clicking the OK Button or by pressing ENTER.
This creates a new category called Forest, which will be available in the objects list.
Click on the name Forest to select it.
The square to the left of the name toggles the active state of the category. You can use it to activate objects/categories you want to use with the Paint Objects tool. At the moment, no objects were added and therefore it is not active. By clicking on the green triangle you can show and hide the vegetation objects stored inside the category.

Adding Vegetation Objects

Click the Add Vegetation Object button.
A file list will appear. Navigate to the Game/Objects/Natural/trees/palm_tree folder within your local build/game folder (in our case it is located in *J:/Game02/Game*). Select the file plam_tree_large_d.cgf. You will see a preview below the file list. Press the Open button or double-click to select it.
Have a look around the window above. It gives you a lot of information about the object you are about to place into the level. The vegetation object palm_tree_large_d will appear in the list, inside the Forest category.

Placing Vegetation objects:

Select the palm_tree_large_d in the Objects List. The text will be highlighted to indicate the object is selected and can be painted or manually placed

Manually placing single objects:

You can manually place selected objects by using SHIFT + click the mouse button in the perspective viewport. The selected object will be placed on the terrain, based on the position of the mouse cursor. The tree is selected, which is indicated by the green and blue ring around the tree.
Press ALT + click the mouse button and move the mouse to scale a selected vegetation object.
Moving the mouse and pressing right ALT + click rotates the vegetation object.

Painting with the Paint Object Tool

Now click the Paint Objects button and increase the Brush Radius by clicking on and moving the slider to the right (similar to the position indicated by the picture).
If you move the mouse into the perspective viewport, you will see the brush, indicated by a green circle. Just click and move the mouse around to paint some vegetation. You will see the palm trees being distributed on your landscape.
The distribution is very regular however you can adjust the options within the objects bar to give your vegetation brush some variety.
With CTRL + click you can erase vegetation objects. Try it on the trees you just painted.

Tweaking Vegetation Object Options

By selecting palm_tree_large_d in the Objects panel, the object options are shown in a list below. Now, lets have a look at the most important options and how they effect the appearance of your brush.

Size and SizeVar
First you need to decide how big your want your palm trees to be in your forest and how much size variation there should be between them. We used the variables Size and SizeVar to do this. Size allows you to scale your vegetation uniformly, whereas 1 represents 100 percent, 1.5 would be 150%. SizeVar is the size variation within a set of painted vegetation objects of one kind. This works on a per brushstroke basis. Keep Size at 1 and set SizeVar to 0.2 to get a nice variation.
The group on the left has no Size variation, the one on the right 0.2. As you can see, it already looks much better.

Random Rotation

To create a more natural look and distribution, you can set up a RandomRotation in the vegetation objects when you paint them. Have a look at the trunks of the palm trees and you will see the difference. This feature only works if you use the Paint Object Tool.

Bending

The Bending value controls the procedural bending deformation of the vegetation objects. It ranges from 0 to 1, 0 meaning no bending effect and 1 meaning the maximum effect. Try 0.8 to get a nice bending effect. This value works globally, for all vegetation objects of this type. It is hard to illustrate in a picture, so play with the value and check the movement of the leafs and the bending of the trunk to judge the effect.

Brightness

You can integrate a whole group of vegetation objects into different lighting conditions by adjusting the Brightness value. Its setting ranges from 0 to 1. 0, and will make the objects appear totally black at 0 and at the brightness initially selected by the artist at 1.
Adjust the value for the palmtrees to 0.8.

Density

To get a better distribution of your trees, you can adjust the Density for a single brush stroke. The density setting ranges from 0 to 100. This value represents the distance between each single vegetation object. Set the value for the Palm_tree_large_d to 10 and paint some trees. You will see the palm trees placed further apart.

Align to Terrain

In order to get a nicer distribution and more natural look to your vegetation objects when on steep hills and slopes, you can align the objects to terrain.
The picture below on the left shows a bush which has not been aligned to the terrain. You will notice a significant gap between the left lower edge of the bush and the terrain. The right picture shows a bush that has been aligned to the terrain. This example looks a lot better and more authentic after terrain alignment.



Use Terrain Color

This option is used to blend your grass with the underlying terrain coloration. You could also use this option on other objects, but it works best with grass. Feel free to experiment with this feature.
The left picture shows a grass object with UseTerrainColor turned off and the right one with it turned on.


This effect is especially valuable for disguising grass fading in the distance.

Creating a Vegetation brush preset

To conclude this tutorial we will add the bush object from the AlignToTerrain section and the grass object from the UseTerrainColor to the vegetation category. Setup your vegetation as shown in the images below.
Add two vegetation objects like you did for the palm tree.


Select your Forest Vegetation Category, adjust the Brush Radius, activate Paint Objects and start painting.
You should see a result that looks something like this
Now move the camera into the jungle, slightly over the ground to get a real feeling of the jungle you have created.
Feel free to play around with the options and create your own personal jungle. You don’t need to add many more vegetation objects to create a lot of variation. Use the same bush again and adjust its brightness, size and density to give some variation to the bushes. Do the same for the palm trees to get some color variation. For fine tuning, you can always place or erase single vegetation objects. Use the same brush to paint an area without trees, just by selecting the bush and grass object. The variations are almost endless. Most importantly have fun!
Note
For painting underwater vegetation, make sure to adjust the ElevationMin Value. Set it lower than the ocean, failsafe would be 0.


How to Create a Simple Voxel Object

backtoIndex

This tutorial will show you how to create an overhanging cliff and a cave using voxel technology.

What is Voxel Technology?

Voxel Technology allows you to create complex 3 dimensional organic meshes in the editor. It is exposed in the editor through the use of Voxel Objects, or “VO”.
Every Voxel Object(VO) has an internal 3D grid of voxels (usually 32x32x32 elements). Every element contains information such as if the unit is full or empty, what surface type is being used and what the base color is. This array is used as input for the mesh generator.
During editing the designer modifies an array of voxels and every change causes re-generation of mesh so the designer receives immediate visual feedback. VO can be used in both outdoor and indoor situations.

Example 1: Cliff with overhang

VO can be used together with your heightmap to improve the look of your terrain. It is possible to model entire terrain purely using VOs, but it is much more efficient in memory usage and rendering speed not to. Rather, it’s best to model most of the terrain with a heightmap, and then use VOs to add nice features to it.

Setting up the voxel area

So, let’s create a cliff like the above in a level. Let's say we already have a hill which looks like the next image.
To create a seamless integration between your VO and your heightmap, you need to align the VO to the hightmap’s grid sectors in the X and Y position. The simplest way to do this is to activate Snap to grid before placing the VO. The size of the grid should be set to 64 meters, which is the size of a terrain sector.

It is also useful to turn on the visual display of terrain sectors grid by typing e_terrain_bboxes 1 into the console. This will cause blue bounding boxes depicting the terrain sectors to appear in the perspective viewport.
Now, go to the RollupBar and select Misc and then VoxelObject, and place a new VO into your level.

Initially, your VO will be empty and you will only see its empty red box helper object.

Link to terrain

Now, we need to make the VO render the terrain surface instead of the heightmap engine. Select the VO and activate the LinkToTerrain checkbox in the VoxelObject parameters. Visually, there should be no difference apart from the blinking of your currently selected VO.

Technical information: the LinkToTerrain option does not copy your heightmap data into the voxel array. It just enables the usage of the heightmap during VO mesh generation. This way, you can still use the heightmap editor and layer painter in your voxelized area. Copying of heightmap data into VO is also possible, and we will cover this in the next example.

Editing the voxels

In the RollupBar, go to Terrain Voxel Painter, and in Brush Settings, set the type to Create. Now, start adding overhanging geometry to the top edge of the cliff by following these steps:
Click to create new geometry.
Resize your geometry by adjusting the Radius slider.
Using the Align Plane functions is good for controlling the geometry you create. First click Setup position, move and rotate the plane where you want to, then click Align to plane. Now, paint your voxel on the plane.
Use the Brush Setting Type Blur to remove sharp edges.

Example 2: A cave

Let's say we want to make a cave in the same small hill.
Firstly, place a VO over the desired area, as you did previously. Since we want to go under terrain surface we need to tell the game’s physics engine that we want to have a hole here.
In the RollupBar, go to Terrain and then Holes and make a hole in the area where you want to make the entrance to your cave. Please note this is only a change in your heightmap, and not the VO.
Here comes the difference from the previous example. LinkToTerrain option will not allow us to create a hole under the terrain, it only allows you to add features on top. Instead of using LinkToTerrain, we will use copy heightmap data. This way we will get full control over this area using the Voxel Painter tool.

Select VO and press Copy Terrain into Voxel button in the VO properties. The hole in the heightmap we painted earlier will be not visible anymore – the VO has covered over the original (hole-less) terrain sector.
Now we can start making the cave. In the RollupBar, open Terrain and then Voxel Painter, select brush type Subtract. Make a cave by keeping click holding while moving on the area where the hole should be. Again, using the Align to plane function here can be useful.

Changing the material of an voxel object

In Brush Settings, select Material from the Type dropdown box, then select one of the materials in the surface types box. Now you can paint on the voxel area by clicking the mouse button.

In the same way as cliff materials are used for usual terrain painting, materials that are painted on voxels should have 3 submaterials, one for each of the xyz axis.
So as a base let’s use the following material:
Open the material editor and select materials/voxel/rock_mine.

Make a new layer in the Terrain Layers Editor window.
Click Edit Surface Types.

Make a new Type

Enter the Material Editor and select you material

Close the Material Editor and click on Pick Selected

Now you can select the new voxel material in the surface types list of the voxel tool.
Result
As you can see, with practice, you can create great results, by making voxel additions to existing terrain, creating holes and caves, or complete stand alone voxel levels.


How to Use Essential Road Tool Functions

backtoIndex

sandhesten:
It is not possible to link the beginning of a road to its end. If you really need a circular road, then use two roads with the same size and texture and line them up so they overlap nicely.

This tutorial shows you how to build a road and then drive on it with a vehicle. Firstly, we will setup the road geometry and later assign a material.
Have a look at the terrain modification tutorial to get the basic landscape done before you start using the road tool.

Placing a vehicle

The first step you need to do is to get the scale of the road right by placing a reference object. To do this we simply place a vehicle:
Go to the RollupBar click Objects and then Entity and place a vehicle from the Vehicles folder.

Drag the vehicle on the map where you would like the road to start. The exact position doesn’t matter. You can move the vehicle wherever you want it to be. Now you can see much better how big your mountains and terrain bumps are.

Creating a road

Now we are ready to create a road. Below the entities button is the miscellaneous objects button, which contains the road tool. Click on it to activate it.

The RollupBar now shows a new set of variables to customize your road.

Placing your road

Click on the terrain with the road tool active at the position where you want the road to start. This will be the first key point of your road. Click again to place more points on the landscape to define your road. To set the last point, double-click.
Even if your road looks a little strange and not suitable to drive on, don’t worry too much – you can easily tweak the road later on.
If you look closely at the road you will see that the default texture is always projected on the surface below the geometry that defines the road. Thus the road doesn’t need to perfectly align on top of the terrain. The road segments between the key points try to smooth the road bends to create a more realistic look.
You have a road with a default texture place on the surface, but the surface itself is still far from drivable. To change this click the button “Align Height Map” in the road tool properties:

This will change the terrain and align it exactly to the geometry of the road tool. The terrain next to the road will also be changed applicably.

Modifying a road

After you have placed your road, it can easily be modified. Click on the Edit button in the Road Parameters box (if the button should be disabled please de-select the road and select it again).

You are now able to control every key point on the road, changing the X, Y or Z position separately, X and Y together or move the key point on top of the terrain. For this choose one of the modes with the X, Y, Z or XY Lock on Axis buttons in the task bar.

Now click on a key point of the road and drag the point to its new position. Choosing the Lock on Z Axis mode enables you to change the height of this key point to manually smooth the road if the particular section is too steep to drive on.
With the Align Height Map button and by modifying the key points, you can place the road exactly where you want it to be.

Changing the texture on the road

Up to now the road still has the default texture on it. To change this, open the material editor through the pull down menu.

Inside the material editor open the Materials folder and then the Terrain folder followed by the Road folder. Here you will find a list of available road materials.
MATERIALS/TERRAIN/ROADS/*.mtl
Select the road_concrete_driven_on material.
To apply this material to the road entity we just created click the Assign material to Selection button in the material editor.

As you notice you can apply the same material to several road objects at the same time if you select more than one road object.
Note: if you can’t see the texture on the road make sure you have both the check boxes Roads and Decals turned on in the Render Settings (you can find the settings in the RollupBar)

Changing the road parameters will allow you to make it look even better:

*MTL*:This shows which material is currently assigned to your road. Click on the button to get to the material editor where you can change texture or select another material.
Minimal Spec: Used for setting in which hardware configuration the entity is rendered or not, not recommend to be changed for road tool, as road should be rendered on all specs.

BorderWidth Only used for the Align Height Map function, this will make a smooth edge on the terrain geometry if the BorderWidth value is higher than the Width value.
StepSize A smaller StepSize will increase the polycount used for the road surface, so for roads with smooth corners you want to use a smaller size than the default 4.
ViewDistRadio Specifies how far the road entity will be rendered.
TileLength The length of the Road Texture. Tweak this in combination with StepSize to avoid stretched textures.
SortPriority This setting can be used if you want to have a specific road drawn above another road.

Result

Press CTRL+G to enter game mode, then enter your vehicle (by pressing the F key next to the door) and press F1 to enter third person view. Now, you will be able to easily see if your road is too wide or narrow for your car.


How to Use Essential River Tool Functions

backtoIndex

Overview

This tutorial shows you how to build a river with the Sandbox2 editor. After you learned how to modify dimensions of the river we go into detail about assigning the correct material so it looks realistic.

Also, if you want, have a look at the particle tutorial to learn how to add particle effects to your level, with particles you can enhance your river, by placing foam particle entities to make the effect of flowing water even more real.

Preparing the terrain for the river

Placing a river entity

Enter the objects section of the RollupBar click Misc and then *River. Now you can draw the river in the perspective viewport.

First click on the terrain will create the first point.
Second click will create the middle point of the river.
Double-clicking a third time will complete the river.
Do not worry about parts of the river disappearing in the terrain, we will adjust that later.
Later you can adjust the shape, add more points/remove points by clicking the Edit button in the Shape Editing section.

To build the river bed set the width of the river to 20 and press the Align Height Map button.


This adjusts the height of the terrain to the river shape and height – a very handy tool to shape terrain for other purposes, too, and can also be done with the Road tool.

Forming the bed of the river

Now set the width of the river to 10. With the river shape selected move the entire shape a little bit down by clicking on the yellow Y axis helper object line, holding the left mouse button and moving the mouse towards you.
Next, press again the Align Height Map button again.
The river will always be a flat plane that, by default, hovers in the air. Rotate it to make it flow downhill.
Also, to make the river look like it is flowing along the terrain, it’s a nice idea to adjust the terrain beside the river. See the terrain editing tutorial on how to do this.
To make a 10 meter wide river blend with the terrain, simply set its width to 20 or 40 this will make the river wide enough so no gaps with the surrounding terrain will be visible.

Making the river look nice

Assigning a material

Assign a material to the river (for example Materials/Ocean/river_village) using the material editor
Select the material and assign it with the top left button in the material editor.

Other river parameters

In the river parameters you can adjust how the material tiles. Also, you may notice the speed parameter of the river can be adjusted here. This is only the speed at which physicalized objects will float down the river, and doesn’t affect the look of the river itself.

Example river parameters

Below is a nice example setup of parameters you can use. You can just copy them into the River Params box.

Result

Once you have everything setup the river should flow gently. To enhance the look of the river obviously the ground material needs to be painted with an appropriate texture and vegetation added.a
Some things to experiment with:
To make the river flow down from a mountain to the ocean, the river shape needs to be rotated (only use small Z values like 0.5 or 1).


How to Set Up a Zero G Level

backtoIndex

Overview

The following walkthrough gives you an overview how to setup a zero gravity level.

Adding gravity volumes

You need to add one of the gravity entities to your level in order to eliminate the gravity.
Simply drag the GravityBox into your level.

Then setup the dimensions of the box to cover the gameplay area in which you want to have zero gravity.
You can set any gravity value you like (by default without the gravity box a level has -9.81 z gravity, meaning an object drops down at 9.81 meters per second)

AreaBezierVolume

The area Bezier volume entity can be used to create tunnels through which players get pushed. Place a GravityVolume Object (from the Misc sub-menu) into the level and create the sections of the gravity tunnel by clicking, double-click to finish creating.
Then adjust the radius and the gravity, 10 is a good value for pushing the player forward.

Adding particle effects like: Alien_Environment.tunnel_wind.light_tunnel_wind will enhance the feeling that there is gravity in the tunnel

Result

Now you can build zero g maps.
Hint: use a planet texture as the moon and set the night sky to maximum star intensity, then you can simulate nice space environments.


How to Create Simple Structures with Solids

backtoIndex

Overview

The following walkthrough gives you an overview how to use the solid tool in the Sandbox editor.
The solid tool is used to create simple structures and objects, or placeholders for future art assets. In this example we show a simple bridge. Solids can be exported in a 3D Studio MAX readable format, and can be used as a guide for creating the final asset.

Placing a solid in your level

To create a solid, activate Follow Terrain, this will cause the points of the solid to follow the ground when you're creating it.
Next, go to the RollupBar and click the Solid button in the Object section.

Click and hold the mouse button in the perspective viewport, then drag the mouse around. You will drag out a flat box.
Releasing the mouse button will allow you to give the box height, along the Z axis.
A final click will exit solid creation mode.

Modifying a solid

To enter the Editing Mode for a solid you have to first select a solid.
Select your solid and activate Editing Mode found within the Solid Parameters pane in the RollupBar.

Your solid should change to a flat colored shape.

Editing vertices

There are several ways to change the shape of the solid.
To change one or more points in the geometry use the Vertex tool.

Click the Vertex tool in the Selection Type pane.

Click the point which you want to move. Holding the CTRL key enables the option to select several points.



To change the position of the verticles, use the movement gizmo that appears once you select one.

Editing polygons

To change faces and polygons in the geometry use the Polygon tool.

Click the Polygon tool in the Selection Type pane.

Click the point in the center of the polygon which has to be modified.
To change the position of the polygon, select the movement gizmo in the perspective viewport to the new place.
You can also assign a material to your solid. Assigning materials is covered elsewhere.

Export solids to a 3D Studio MAX readable file (OBJ)

To export solids follow these instructions:
Select the solid in the perspective viewport, to select a group of solids hold the CTRL key and select each solid you need.
Open the File menu and click Export Selected Geometry to .OBJ.
Save the file to a safe place on you PC.
Load the File in 3D Studio MAX. It is important to disable the Rotate model flag in the OBJ Importer from 3D Studio MAX.

Also, please refer to the tutorial relating to exporting objects from 3D Studio MAX, to help you get your completed object in-game.

Result

Solids are a great way to get your ideas into your level without worrying about creating actual detailed geometry. Efficiently using them to produce layouts and initial drafts will give you a good idea of how the final product may work, but in a fraction of the time.


How to Set Up the Basic Game Logic

backtoIndex

Overview

The following walkthrough gives you an overview how to setup a simple mission, defining a place where the level starts, one objective and a load next level trigger.
The more non-linear your mission objectives are, the more time you need to spend testing them, so we recommend for starters to make a linear gameplay path: 1st objective complete triggers 2nd objective, triggers mission end.

Adding a Spawn Point

From the Objects/Entity section of the RollupBar drag from the Others folder the SpawnPoint entity to a point in the perspective viewport.

Triggering Events

Proximity Triggers

You can use Triggers to activate various actions in the editor. Here, we will go over 2 main ones – ProximityTriggers and AreaTriggers. You can drag to the perspective Triggers in the usual way in the RollupBar.

Placing an Area Trigger

An AreaTrigger is split into 2 parts, the area and the Trigger. The Trigger is placed in the usual way.

Next create a Shape using the Area tool (found in the RollupBar in the Objects Type sub-menu) by clicking at 4 different spots and double-clicking to close the shape. Assign the AreaTrigger to the Shape using the Pick function while you have the Shape selected.

Adding logic to Triggers

Creating a Flow Graph

To define what a Trigger should do, a Flow Graph needs to be created. Select your Trigger, then click on the Create button in the Flow Graph section of the Entity properties.
Specify a group name for your Flow Graph. It is good practice to organize your level in layers, then give your Flow Graph a name which contains the layer it mainly affects.

Adding an Entity to your Flow Graph

In the Flow Graph window right mouse button click(right-click) the empty field in the middle.
Select Add Selected Entity from right-click menu.
Make sure the ProximityTrigger Node can be seen, by zooming in with the mouse wheel or by setting Fit Graph To View.
The ProximityTrigger Node has on the left side the input events and on the right side the output events.

Adding a Mission Objective

Drag the MissionObjective entity to a place in the level where the player should go to.

Open up the Flow Graph you created previously and then select your MissionObjective Entity in the perspective view.
Now, add the MissionObjective to the Flow Graph by right-clicking in the Flow Graph's main window and selecting Add Selected Entity.

Connecting entities together in Flow Graph

sandhesten:
Some of the advanced or work in progress nodes are hidden by default. To get them back do the following: In the flow graph window: View --> Components --> tick all.
You can replace the Math:Random and Time:Delay nodes with a Time:RandomDelay node.

Now, move your MissionObjective object next to the ProximityTrigger by clicking and dragging the object frame.
Once it is it in place, click on the Enter port in your ProximityTrigger, hold the mouse button down, and drag the mouse to the Activate port in your MissionObjective.
The Mission Objective has several other input and outputs:
Activate: 0 means objective is not activated and 1 mean it is activated.
Completed: Marks an objective in the PDA as completed
Deactivate: Removes an objective from the PDA
Failed: Marks an objective in the PDA as failed
SilentActive: Activates an objective without marking it on the PDA
SilentDeactivate: Deactivates an objective without marking it on the PDA

Loading a new mission

Once the player has finished his objective, let's load the next level (obviously you could trigger another objective after the first one, but for our test, lets load the next level).

  1. Place another ProximityTrigger and create another Flow Graph on it.
  2. Add the MissionObjective node to this Flow Graph.
  3. Connect the Enter out port of your ProximityTrigger with the Completed in port of the MissionObjective.
  4. Now, add a Mission/EndLevelNew node.
  5. Connect the Completed out port to the trigger port of the EndLevelNew node.
  6. Select the EndLevelNew node and specify the name of the level that should be loaded in the Inputs field.

Result

When the player walks into the trigger the next mission is loaded. Note: This only works in real game mode - the Editor will not load the next level.
You will get a warning in the console instead: [Warning] CCryAction: Suppressing loading of next level 'levelname' in Editor!


How to Set Up a Simple AI in Flow Graph

backtoIndex

sandhesten:
Here are come of the guidelines we use: We put friendlies into groups 1-100. Enemies go from 1000-9999. We usually refer to our encounters as action bubbles. Enemies in action bubble 1 will have 1000-1999, enemies in action bubble 2 will have 2000-2999 etc. These are just guidelines though. Other numbers will probably work, but sticking to these guidelines should be safe. Remember that AI group tactics only works with members of the same groupID and type (flanker, cover, camper). Also, the alertness level is per groupID. If one guy gets alerted, the whole group gets alerted.

Overview

The Flowgraph can be used to visually script almost everything. In this tutorial we will just focus on making an AI character walk to a point.

Making the AI walk to a point

Preparation

Place an AI Grunt Entity (RollupBar/Objects tab/Entity/AI/) in your level.
Place a TagPoint (RollupBar/Objects tab/AI/) in the level. Place it roughly 10 meters away from the AI Grunt as this is the point the AI will walk to.
Place a ProximityTrigger (RollupBar/Objects tab/Entity/Triggers/) in the level.

Setting up the Flow Graph

Select your ProximityTrigger, then click on the Create button in the Flow Graph section of the Entity properties.
Specify a group in which the Flow Graph will be saved in.

In the Flow Graph window right-click on the field in the middle:
Click Add Selected Entity from the pull down menu.
Make sure the ProximityTrigger Node can be seen, by zooming in with the mouse wheel or by setting Fit Graph to View:
On the left side of the ProximityTrigger Flow Node there are Input events and on the right side Output events. We will be using the Enter Output event on the right of the Node, so that when the player enters the Trigger, it will start the Flow Node and trigger the action.

Adding an AIGoto Node

Now let's add a Node that will make an AI Entity go to a point when the Flow Graph is triggered. Right-click on the grey background of the Flow Graph and select the AIGoto Node (in the AI sub-menu).

Add also add an EntityPos Node (in the Entity sub-menu):


Connecting the Nodes

Keep the mouse button held down while dragging the line from the blue arrow of the Enter out port of the Proximity trigger to the Sync port of the AIGoto Node.
Do the same for the pos out port of the EntityPos Node to the pos port of the AIGoto node.

Now we need to tell the system which Entity should be used.
Keep the Flow Graph window open and select the AI Grunt we placed at the beginning in the perspective view.
Now right-click on the AIGoto Node and click Assign Selected Entity.


Do the same for the TagPoint we placed at the beginning on the EntityPos Node. The finished Flow Graph should look like this:


Result

The AI will walk to the TagPoint once the player walks into the Trigger, assuming the AI can't see the player (which would cause the AI to break all Flow Graph actions and enter combat mode. Type in ai_IgnorePlayer 1 in the console to avoid this, if it's an issue)
As an alternative you can make the AI immediately walk to the point by connecting a Misc/Start Node:


Making a vehicle drive to a point

Instead of making an AI character walk to a point you can also let a vehicle drive to a point, but first you need to add a driver to the vehicle with the vehicle -> Enter Node (Hint: Use the fast option to make the character enter the vehicle without entering animation). To get the vehicle id number use the Entity ->EntityID Node...
The vehicle will only drive to the point when a driver is inside so make sure you trigger the vehicle to go to the position after the driver has entered the vehicle:


How to Set Up an AI with More Advanced Behaviour

backtoIndex

sandhesten:
The ReinforcementSpot will just make the AI run there when he is alerted and play the specified animation. Anything that you want to happen afterwards will have to be set up in flow graph. Right click on any of the ReinforcementSpots in the demo level and open it´s flow graph. There you can see some examples of reinforcement.

Overview

This tutorial will show you how to place enemies into the level and tell them where they can walk and hide. By default they will shoot at the player on sight.

sandhesten:
the guy shoots now but he isnt hitting the alien at all

The tank is trying to shoot at the pivot point of the alien, that is why he isn´t hitting it. Try selecting the alien, you will see that the pivot point probably is below the body of the alien. Try doing the following: -Add an Entity:EntityPos node and assign the alien to it. -Connect the pos port to the top input port on a Vec3:AddVec3 node (I am not at Sandbox right now, so the name of this node might be a bit different). -In the properties of the bottom port of the Vec3:AddVec3 node you can now offset the shoot at point. You have x, y, z. You probably want to offset it by 8 meters or something on the z axis so type in 0,0,8. -Connect the Vec3:AddVec3 to the position input on the AI:AIShootat node. -Test it. -Tweak the value in the Vec3:AddVec3 node until the tank actually hits the alien.

The look of the AI characters, their weapon handling, how far they can see and hear, advanced behaviors such as group tactics, conversation with squad mates, use of vehicles and interactions with smart objects is described in other tutorials and the reference library.

Adding an enemy to your level

Placing an AI character into your level

Drag the AI Grunt Entity from the Objects section of the RollupBar into the perspective viewport.

Giving your AI a weapon

...cking on the ... button next to the EquipmentPack text field will open the EquipmentPacks dialog window. Selecting and clicking OK will give the character the weapons contained within. For more info on how to setup the EquipmentPacks read the EquipmentPack Tutorial.

Important: It's currently required to click on the Reload Script button (located below the entity properties) once in order to have the grunt start using the selected equipment pack.

Enemy Archetypes

All AI characters in Crysis are placed as Archetype objects, meaning that the parameters only need to be setup once and than can be used across levels. To see the parameters they are using, simple press the Entity Archetype box (in the following screenshot the CAMPER/CAMP.Light_Rifle text)

Generating AI Navigation

Even on a flat terrain, make sure to generate new AI navigation at least once after creating the map and also after any modification to the terrain.

The AI navigation can be generated by clicking on the Generate All Navigation item of the AI menu.

Testing the results

Go into game mode (CTRL+G) and approach the AI, if configured correctly the AI will shoot the player when he sees or hears him.

Setting up navigation

Introduction

To make your AI function correctly in your level, you need to set up various types of navigation.
Typing ai_DebugDraw=79 in the Console will show you if a triangulation is already setup, this means the AI will be able to find its way from one point to another without bumping into obstacles.

sandhesten:
You need flight navigation in your level for the helicopter to work properly. The helicopter can follow a path drawn by the designer without flight navigation since it doesn´t need to generate the path itself, but to roam freely it needs a flight navigation area defined. To add flight navigation to your level do the following: Add a AINavigationModifier (RollUpBar --> AI button) around the area where you want the helicopter to be able to go. Select nav type Flight. Then generate flight navigation. Also make sure you use the HeliAggressive archetype for the helicopter. Finally make sure that the AIBehavior is set to HeliAggressiveIdle in the properties of the helicopter in the RollUpBar.

Vegetation

AI will automatically walk around Vegetation objects if set up correctly.
If you want them to hide behind a tree, you just need to set the Hideable flag in the Vegetation properties.

Next, adjust the AIRadius of the Vegetation so the AI knows how big the Vegetation object is.

AI will automatically walk around physicalized entities such as vehicles.

Cliffs and big solid objects

Typing ai_debugdraw 85 in the Console will display all areas that are too steep to climb (red) and areas that may cause sliding when you try to walk on them (green).
Now we need to surround all such areas carefully with ForbiddenAreas (see section below).

Forbidden Areas

This is poor wording on our part. There are 2 things called "forbidden area" in Sandbox. One is just a shape that tells the AI "DON´T GO HERE" (RollUpBar --> AI Button --> ForbiddenArea). The other is an entity connected to an AreaShape which is the kill message for when the player goes out of bounds. Try doing the following: -View --> Open View Pane --> Select Objects. -Sort by Type. -Find and select the forbiddenarea entity and in its properties you can untick "Enabled". Alternatively just delete it. -In the Island map I think I renamed the forbiddenarea entity to GamePlayBoundary.

You need to surround each internal waypoint region with a ForbiddenArea, this way the AI will not try to walk through walls and other objects.
Click on AI/ForbiddenArea and create a shape around the area you want to make impassable (for example the external walls of a building). Select ForbiddenArea from the menu as shown below.

Once your ForbiddenArea is created and your level triangulated, it will not be possible for the AI to walk through the walls.

Setting up waypoint regions in internal areas

To make the AI go through doors and navigate inside the building you need to add a Waypoint Region. You need to extend one section of this Waypoint Region outside of the forbidden area, as an entryway for the AI, as below.
The 3 things you need to setup a Waypoint Region are:

You need to surround each waypoint region with an AI Navigation Modifier "Human Waypoint". (The blue shape).
Click on AI/AINavigationModifier and create an area shape of that type.

By default the NavType is set to "Human Waypoint" so no need to modify anything.
Place AI/AIpoints inside your area. You will see they turn blue once they are in a valid area.

At the place where AI should be able to enter and exit the area change the type of the AIPoint to Entry/Exit (a door symbol will be displayed instead of the blue ball.

One part of the AINavigation modifier area should be outside the forbidden area shape (red line) so the AI can reach the point.
To generate the connection between all points select the AINavigationModifier shape you placed and set Auto-Dynamic in the Waypoint Connection Parameters.
And finally click on one of the points and press the Regen Links Button:
All Points should now be connected like this and the AI will be able to navigate inside the area and enter/exit it at the points where you set the specific entry and exit points.
See the section below on how ForbiddenAreas and Waypoints should be setup in terms of placement.

Flight Navigation

You need to surround every area where you want something to fly with an AI Navigation Modifier shape called Flight. You also need to give this area a height.
Water Navigation
You need to surround every area where you want something to navigate on water (i.e. boats) with an AI Navigation Modifier shape called Water.

Paths and Roads

Create an AIPath with the Road box ticked, and vehicles will automatically have a strong preference to use the road/path. AI can also be made to follow the path using the AIFollowPath flowgraph node

External Hide Points

To make AI hide at specific spots you have to place AIAnchor (outside of waypoint areas).
Place an AI/AIAnchor next to any solid object. Now, notice the two red bars in front of the hide point, which indicates if the AI can use a crouch/hide animation, or a left/right strafe animation. The red line on the front of a hide point shows that there is left an right enough space the strafe left and right. Make sure the Green Area is not blocked by anything, so that the AI can actually use it.

AIPoint Type Hide Points in Nav Areas

The same concept for AIAnchors applies to the AIPoint Hide Points. So, change one waypoint within a nav area to a Hide Point, by changing the Type in the AIPoint Properties.

How to setup AI correctly - Advanced tips

Forbidden Areas

Here the forbidden area is placed too far away from the actual object.

Instead place them closer the the edges of the objects. This avoids that the AI might slip in the gaps. Now the AI navigates way better around these objects.

Do not place two forbidden areas so close to each other. Even if the AI can‘t fit through, the navigation will still trace a path in between.

Instead delete one forbidden area. Make one big forbidden area which contains both objects.

Do not place objects close on the edge of a forbidden area. Otherwise the AI circles around the hide objects and can slip in the forbidden area.

Place the hide objects either inside the forbidden area or outside of the forbidden area. Make sure that if the AI circles around the hide object it doesn‘t slip in the forbidden area.


Large open sided structures should not have one big forbidden area around them.

Rather, place smaller forbidden areas around them.

Hide Anchors

The AI hides at the hide anchor if an enemy is the cone. The more AI guys you have the more hide anchors you have to place. Do not place hide anchors for just one direction. Place them for all possible directions.
Place hide anchors at the sides of an object not only at the edges. Sides provide better cover than edges.
For thin objects place hide anchors close to the edges so the AI can leave their positions quickly. Do not forget to place them on both sides pointing at each other.
Place hide anchors only at position where the AI has real cover. The front and the back of e.g. a car provide less cover. The middle provides better cover.
Normaly edges of a house provide less cover. First place hide anchors close to the edge pointing directly in the direction. Then place hide anchors with 45° rotation slightly away from the edge.
If you do not have enough hide anchors for many AI guys you can increase the hide anchors. The basic hide anchors are most important. Then you can increase the number hide anchors with the 45° ones.
If you have long objects do not place hide anchors in the middle, otherwise the AI has to move to far to change position. Only if there is other cover in the area can place them in the middle.

Waypoints

For two rooms it is enough to place these two waypoints. From every corner of the rooms the AI can reach the closest waypoint. The link gives the AI the possibility to switch rooms.
Place waypoints at the edges of objects. The AI will have no problems going around and never gets stuck.
The AI in this example is at the wall and is looking for the closest waypoint. Accidently the closest waypoint is behind an obstacle. In the new engine the AI would still find the correct one but it costs more performance. Instead place the waypoints with the same distance next to thin objects.
Take care when you link waypoints. The links should never go through or go very close to physical objects.
Avoid waypoints that are to close to links. If two AI gyus start moving they might collide because the links are running to close next to each other.
Avoid such crossing links at object corners. AI might run into each other at intersections.
You can easily solve this by adding a new waypoint at the edge (You should have a waypoint at the edge anyway).
If you have alternative routes think how it would look like if you would walk exactly along the lines. Sometimes it is better to use more waypoints to simulate a more natural movement like the right example.
If you have a room first place all waypoints at all edges of objects. Only do this with objects you can‘t walk over.
Then you look for waypoints which are to close to each other. If they are close together use one waypoint instead of two for cleaner navigation and less chance for the AI to get stuck.
After the waypoints place the hide points, follow the general rules from the hideanchors.
Hidepoints are also part of the navigation, merge hidepoints and waypoints if they are too close to each other.
If all navigation points are placed, start linking them.
This waypoint in the middle may not provide perfect movement but it is better then AI getting stuck.
The red lines show bad links: either the links go through/close to geometry, or they are too close other links. It is okay if the AI first has to take 1-2m step(s) before walking in the right direction. That is better than AI getting stuck.

Result

Having all this setup properly the AI will be able to walk to any point and fight against the player. The better you place the waypoints, hide points the more realistic and challenging it will be for the player to fight against the AI.


How to set up Equipment Packs

backtoIndex

Overview

This tutorial will show you how to give weapons and equipment items to AI entities and to the player. You will learn how to carry the inventory of the player from one mission to another, as well as giving the player individual items.

Weapons and Equipment

Editing Equipment packs

Open the Equipment Pack window using in the Mission menu.

Select one of the Equipment Packs using the drop-down menu.

Or create a new pack by clicking on the Add button
Add Weapons and Equipment items to the Equipment list using the < or > buttons.
Enemies can be set up to have unlimited ammo so you don’t need to specify the amount of bullets.

Editing enemy equipment packs

You can also access the equipment pack editor by clicking EquipmentPack in the properties of a character with a weapon.

Changing player Equipment packs

The flowgraph equipment packs from the last mission can be reused by setting these flowgraph nodes: (Note: to test a mission, or to give the player a bunch of weapons at level start use the ADDEQUIPPACK node and connect it to the start node.)

Giving the player individual weapons and items

To give the player individual weapons and items, the Inventory flow graph nodes should be used. Right click in the flow graph window:
AddItem: Adds a item/weapon to the players inventory
HasItem: Checks if the player has a specific item
ItemSelected: Checks if the player has selected a specific item
RemoveAllItems: Removes all items from the players inventory
RemoveItem: Removes a specific item from the players inventory
SelectItem: Selects a specific item in the players inventory if available
Use the Add Node/Misc/Start node to give the player a GaussRifle at level start:

Result

When the player starts the mission he has the GaussRifle right at the beginning:

Some things to experiment with

Play with your equipment packs to give the player an interesting setup at the start of your level, or to create a unique and varied feel to your enemy types. If you’re working with multiple level setups, it’s a good idea for testing to give the player appropriate weapons. However, when streaming between levels, it’s a good idea to make sure you don’t give your player new weapons for free, or to take any away.


How to Set Up a Mission Objective

backtoIndex

sandhesten:
Game tokens are little bits of information that can be accessed through flow graph while running the game. It is a bit too complex to fully explain here, something for a proper tutorial really. I´ll try to give a quick overview though: Game tokens can be created, modified and deleted in the DataBase view. For a start you should only need the flow graph nodes Mission:SetGameToken and Mission:CheckGameToken. Imagine the following scenario: Your mission is to assasinate a specific enemy. When you get back to base there is a reward for you, but only if you have assasinated him. If you have a created a game token called TargetAssasinated for example you can set it to "true" in flow graph with the Mission:SetGameToken node when that specific AI is dead. When you are back at base you can check the game token with the Mission:CheckGameToken node. If the value of the TargetAssasinated game token is "true" that means that the target was assasinated and the reward can be triggered (the player could be given a weapon with the Inventory:AddItem node for example). If the value of the game token is "false" something else could happen; maybe your superior tells you to come back when your mission is done.

Overview

In this document, we will show you how to set up an objective for use within a Crysis level. Please apply all game patches before running this tutorial.
This tutorial will show you how to set up custom objective text for your level. In this tutorial, we will assume basic knowledge of flowgraph and object placement.
This technique will only work after applying Crysis patch 2!

How to create custom objective text for your level

The Objectives.xml file

The file that will contain all the information for your objective is called Objectives.xml. This will need to be placed in the same folder as the .cry file for your level. Please note, these new objectives will not over-write existing objectives.
When you open up the file in a text editor, you will see lots of text. Don’t worry! we’ll break it up into useful chunks.
The example objectives.xml file used in this tutorial can be downloaded from here by right clicking and selecting "save as".

Setting up the file

The text in your file will look like this, but with many different level name tags.

  <Root>
   <Levelname>
    <Objective_01 Name="Mission Objective Title" Description="Mission Objective Description" />
   </Levelname>
 </Root>

At the start and end of the objectives file, you need to place <Root> and </Root> tags. Next, you need to create a tag for your level. If your level is called “Levelname”, the tags will be <Levelname> and </Levelname> .

Objective number

  <Root>
  <Levelname>
    <Objective_01 Name="Mission Objective Title" Description="Mission Objective Description" />
  </Levelname>
</Root>

Now, we will set up the objective and its text. Within the level tags, you’ll place another tag, containing a short reference number for the objective. For example, if it is the first objective in your level, open the tag with <Objective_01 .
Please note, if you want multiple objectives in your level, just clone this entire line, with a second objective line, as shown below:

  <Root>
  <Levelname>
     <Objective_01 Name="Mission Objective Title" Description="Mission Objective Description" />
     <Objective_02 Name="Mission Objective Title" Description="Mission Objective Description" />
  </Levelname>
</Root>

Objective Name

  <Root>
  <Levelname>
    <Objective_01 Name="Mission Objective Title" Description="Mission Objective Description" />
  </Levelname>
</Root>

Next, we need to add Name for your objective. After your <Objective_01 , add Name="Mission Objective Title" , where Mission Objective Title is the name of your objective – “Lower Control Rods”, in the below example. You may notice that objectives have @ at the start in the existing Objectives.xml. Do not include these in your objectives, as they are only used for text localization.

Objective Description

  <Root>
  <Levelname>
    <Objective_01 Name="Mission Objective Title" Description="Mission Objective Description" />
  </Levelname>
</Root>

Now we need to create the description of the objective. The description is the longer text under the name of the objective. Replace Mission Objective Description with the required text. To finish off, close the tag with />

Mission Objective Entity

Placing the Mission Objective Entity

Now you have your XML file set up, lets get it into game. Place an Entity/MissionObjective in your level.

Now, go into Entity Properties and type in the name of your objective in the following format, to the box shown in the image below.
Levelname.Objective_Number
For example, if I needed to use Objective_03 in my level called Test, I would type this.
Test.Objective_03
/////Bugged. The above is to replace the fact the below doesnt work. For Michael Smith.
More details on setting up a mission objective can be found here.

Mission Goals

What is a Mission Goal

A mission goal is the piece of text above the objectives section, as shown below. You should give a summary of what you want to achieve overall in your level.

Triggering a Mission Goal

You need to set up an objective in exactly the same way as before, but to trigger it, we need to trigger a flowgraph node. Place a Hud/Objectives node into your level, set its properties to the objective you want, and trigger the SetGoal input port.


How to Place Decals in the Editor

backtoIndex

Overview

The following walkthrough gives you an overview how to setup and place decal in the Editor Tool, how to assign a material and the different projection types you can assign to your decal.

Placing a Decal in the Level

Selecting the Decal Entity

To place a decal in the game, you have to first activate Follow Terrain, then go into the Misc Object Type library located in the RollupBar and select Decal.

Placing a Decal in the Level

Select the decal by clicking the mouse button, and then move the mouse into the perspective viewport. The Follow Terrain tool that was previously selected will snap the new object to the terrain as you move it around.
Click to place the decal in its current position. You can then move/rotate/scale the decal by using the Editing Mode commands located in the Edit menu or on the EditingMode ToolBar.

Setting up the decal material

A decal material has to be marked with the Decal flag in the Shader Generation Parameters in the material options, as shown below.
First open the Materials folder and then the Decals folder in the Material Editor. All decals in here are correctly set up for use on decals.

Once you have selected a material click the Assign Material to Selection button.

Decal Projection Types

Decals have 4 different projection types, numbered 0 to 3. To change this, select the decal and change the value in the Projection type line, shown below.

Projection Type 0
The decal will be displayed in the exact same position in space as where you placed the center of the object.
Projection Type 1strong>
The decal will be projected onto the geometry of an object in the level. It will be projected along the opposite direction to the blue Z axis.
Projection Type 2
The decal will be projected directly on to the terrain of your level.
Projection Type 3
This projection type is a combination of type 2 and 3, and will be displayed on both the terrain and objects.

Manual placement of decals on objects or the terrain

Select the decal entity, activate Reorientate and use Mouse shortcuts to place the decal:

  Hold down ALT and click the mouse button  scale the decal along the local x/y-axis
  Hold down CTRL+ALT and click the mouse button  rotate the decal around the local z-axis

This will speed up placement enormously

Result

Good placement of decals can bring your level to life. They can also be used to create seamless transitions between many different objects.


How to Place your Team Logo as a Decal on a Wall

backtoIndex

Overview

This quick tutorial covers one aspect of the Decal tool. You will learn how to place a picture on a plain wall.
This can be used to display your team logo, graffiti pictures or direction arrows.

Preparation

Load a level with buildings which have flat walls, or place an appropriate object in your level.

Placing a Decal in the Level

Selecting the decal entity

To place a decal in the game, you have to first activate Follow Terrain, then go into the Misc Object Type library located in the RollupBar and select Decal.

Placing a Decal in the Level

Select the decal by clicking the mouse button, and then move the mouse into the perspective viewport. The follow terrain tool that was previously selected will snap the new object to the terrain as you move it around.
Click the mouse button to place down the decal in its current position. You can then move/rotate/scale the decal using the usual methods.
Set the ProjectionType for the decal to 0.

Assigning the decal material

If you want to create your own material with your own textures, please refer to the material editor reference documentation. If you place the .mtl file and the texture within the Game folder of your CryENGINE® installation, it will work locally on your computer. You would need to set up a MOD with the respective folders associated to be able to transfer the assets to other computers. For this tutorial, we keep it simple and use an existing decal.
Note!
A Decal Material has to be marked with the Decal Flag in the Shader Generation Parameters in the material options, as shown below.
Open the Material Editor and choose an appropriate material from the Material Library.
Go to Materials/Decals/Numbers, choose number*1* and apply it to the decal entity you just created.

Project it onto the object

Select the decal entity, activate Reorientate and use Mouse shortcuts to place the decal:

  Hold down ALT and click the mouse button  scale the decal along the local x/y-axis
  Hold down CTRL+ALT and click the mouse button  rotate the decal around the local z-axis

Result

You can easily "tag" buildings with your own team colors and logos.


How to Create a Particle Effect

backtoIndex

Overview

In this tutorial you will learn the basic functions of the particle system, and more specifically, how to create a fire effect.
In preparation for the tutorial, start the Sandbox2 editor and open any level.

Prepare a new particle library

What is a particle library?

Most data in the CryENGINE®2 is handled and stored in libraries. The particle effect libraries are stored in your game folder, under Game/Libs/Particles.
To create a particle effect, you start with preparing a new particle library.

Opening Database View

Open Database View found in the Open View Pane submenu of the View menu.
The Database View will appear.
Before you create a particle you need to choose a library in which to place it. The best way to do this is to create our own library first.

Adding a new library

In Database View, within the tabs at the top of the window, you will see the tab Particles. This is where all particle libraries are found.

The default library called Level should be active. You can create as many particle libraries as you need. They will each be saved as a separate file in your game folder.
Select the Particles tab and press Add Library, to create a new library.

In the New Library Name window, enter the name for your library as "MyTutorials", as shown below.

Adding a new particle Effect to your library

Click the Add New Item button to add a new particle effect. Every effect will be organized in groups. As you have no groups yet you have to create a new group too.

In the New Particle Name window create a Group as “MyFire” and a particle named “Fire1”

The new particle will appear on your particle list. Now, you’re ready to work on it!

Click File/Save to save your progress.

Preparing your particle effect

You will need to prepare your textures before you start making new effects. However, this tutorial will use pre-prepared textures and focuses on the different texture types.
The default location to save textures for particle is the folder Game\Textures\Sprites.

Setting up a sprite texture

Make sure the particle Fire1 is currently selected.

In the Appearance tab (located next to the particle browser list), click on the open folder icon next to the texture input box.
Now select in Game\Textures\Sprites the texture called fire_ball6.dds. The path of the texture will appear in the Texture input box. You can check the texture when you hover the mouse cursor over the input box.
To align the particle direction to the sprite’s movement direction turn on the Orient To Velocity switch.

The next step is about the life time of the particle. To create a continuous fire, click on the Continuous switch within the Emitter section of the particle properties.

To have each particle raise higher set the Particle Life Time to 3, and to have more than one particle appear at any time set the Count (of visible particles at the same time) to 10.

Keep the other values at their default (Emitter Life Time 0, Spawn Delay 0, Pulse Period *0*). Select in the Movement pane the parameter Speed and set it to 3 to speed up the particle.

Placing the particle effect into a level

To place your effect in the level, you need to drag the effect from the particle browser list into the level. But, before you do this, activate the Select and Move tool on the editor toolbar and turn on Follow Terrain and Snap to Objects to make the placement easier.

Now drag and drop the “Fire1” particle effect into the level.
You can see your particle spawning from the emitter continuously. But right now it still looks far from being a real fire. The next step is to tweak more parameters in the Particle editor and improve the appearance.
Note:
You can use the Goto Selected Object button to align the camera position to be just in front of the emitter.

Save your scene once more before go to next step.

Creating a more realistic look

To get a more “firelike” look, you will need to tweak a few more parameters within the particle.
We will take a look at:

Tweaking how the sprites spawn

Go to the Emitter pane in left top of the parameter lists. If the Emitter Life Time is set to 0, particles are spawning infinitely until the emitter is disabled or deleted.
Set Particle Life Time to 1. Your particle should change its look as shown below.
The parameter Count controls how many particles are alive in the scene at any time. If its set to 10, at the time particle number 11 is spawned, particle number 1 will disappear.
Particle life time controls the life time for each particle. If it’s set to 3, particles die 3 seconds after they were spawned.

Adding randomness

Up until now, all particles were spawned exactly in the same way – this doesn’t look natural. To add some randomness click on the little + button in front of the Particle Life Time parameter to open its additional parameters.

Set the Particle Life Time Var Random to 0.4.
Your particle will start to look a little more irregular now. The Var Random parameter exists for almost all parameters. The randomness is measured from 0 to 1, (meaning 0% to 100%).
If the Particle Life Time is set as 10 (sec), and the Var Random value is set to 1, the particle life time is randomized to be between 0 to 20 sec(+/- 100%). If Var Random is set to 0.3, the particle life time is randomized to between 7 and 13 seconds (+/- 30%).
For now though, keep the settings as shown.
Don’t forget to save your level from time to time.

The lighting tab

Go to the Lighting pane and add the following settings:
Set Diffuse Lighting to 0.
Set Diffuse Backlighting to 0.
Set Emissive Lighting to 3.
Set Emissive HDR Dynamic to 3.
Your Particle will start to glow as shown:
Diffuse Lighting is the most basic lighting parameter for sprites. It controls how much the sprite is influenced by any dynamic or ambient light in the level. Usually, you have to set any appropriate value for this (like 0.7). But in this case of a fire which can't actually be lit, you should set this value to 0. Diffuse Backlighting is a simple parameter to add some brightness to the particle (often called 'Ambient' or 'Incandescence' in common 3D software). By increasing this value, you can make a more translucent appearance. Oppositely, by decreasing this value, you create a more solid looking particle.
Emissive Lighting and Emissive HDR Dynamic are different from the other lighting parameters. They control emissive lights on the effect, e.g. light that is created by the particle. Usually, these parameters are used if the particle is self-illuminating (like fire, sparks, explosions). Emissive HDR Dynamic works only when HDR is turned on, i.e. Config Spec is set as high or highest.

Tweaking the sprite alpha curve

Now, change the lifespan curve to add a natural transparent look to the fire. Open the additional parameters of the Alpha parameter in the Lighting pane. A particle’s Alpha value controls how transparent it is. Double-click on the green line in Var Particle Life to create a key point (red point) on the line like this.

Double-click at the left top edge of the green line to create a second point and drag this to the bottom of the graph.

Double-click at the right top edge of the curve to create a third point and drag this to the bottom of the graph.

The Var Particle Life curve controls the alpha value of the sprite independent on the texture’s alpha. Longitudinal represents the alpha value, transversal the particle life time.
In this case the particle will appear with 0 alpha value (invisible), then increase to 100% alpha value at 25% of its life time, then fade out and disappear again at the end of its life time.
Note:
You can add or delete more key points by double-clicking them, and move key points by dragging them in both dimensions.

Tweaking the sprite scaling and stretch parameters

Enter the Size pane and set the parameter Size to 1.3, then open the additional parameters and set the Size Var Random to 0.4.
Adjust the Size Var Particle Life curve to match the graph below.

Next, add a little stretch effect to the sprite. Set Stretch to 0.2, set Stretch Var Particle Life curve as below.

Stretch will stretch your sprite. A default value of 0 means the sprite is not stretched at all, e.g. a perfect square shape. In this case the particle is stretched up to 0.2 at the start of its life and back to perfect square shaped at the end.
Now your particle looks already more like real fire, but with some more tweaking you can get it even closer.

Tweaking the Movement and Air Resistance of the particle

Movement of particles is also very important to add realism to the effect. In this section you will tweak the particle movement parameters.
Access the Movement tab and set the Speed to 3 and Var Random to 0.4. You'll find the Var Random as usual hidden behind the little + button. The Speed value controls the speed of the particle. It controls speed along the direction of the Emit Angle, which you will tweak later.

Note:
Remember that adding some random value to parameters is effective to get a more realistic effect in most cases.
Air Resistance is simulating the denseness of air or any medium the particle is situated. In a dense medium like water energy of motion is consumed faster because the water has a higher resistance as air. Oppositely in space particles never loose their velocity.
Set the Air Resistance to 0.2 and the Air Resistance Var Random to 0.4.

Note:
Particles with air resistance are also affected by the environmental forces in the level, like wind, turbulence, or global wind. Thus, if you set high values for air resistance your particles will be affected strongly by wind forces in your level, maybe so much that you won’t see any particles. To avoid this, you can try low values (like 0) to the air resistance first to watch the effect.

Tweaking the Angles tab

Let's go to the Angles pane and tweak a bit more.
Set Emit Angle to 20 and Emit Angle Var Random to 1.

The particle’s default direction is exactly along the Z axis of the emitter. The changes above mean that the particle emits at a 20 degree angle around the Z axis, and get a random direction within -20 to 20 degree. If you don’t set a Random value other than 0 the particles will always get an exact -20 or 20 degree direction from the Z axis, consequently the whole shape of the effect will look like an umbrella upside down.

Set the Random Angles and Random Rotation Rate as below :

These parameters control the rotation of each sprite. The left column refers to the X axis, center column to Y, and right column to Z.
In this case the particle has a possible 180 degree rotation value on the Z axis when they spawn, and a maximum of 30 degrees random rotation on the Z axis while they are live.
For sprite particles like this fire, the X and Y axis are not affected at all, because sprites are 2D objects – they have no X and Y axis. The particle system also supports imported 3D objects too, which can be used as particles where all 3 axes are supported.

Soft Particles

When you get closer to the effect and check the area where the particle is intersecting with the terrain surface you can see a significant edge at the bottom of the sprite.
To avoid this edge access the Appearance pane and turn on the Soft Particle switch.

Now the edge has disappeared and the fire looks even more realistic than before.
This ends the first tutorial about particles. You now know how to create a simple 2D particle and are able to tweak its basic parameters.
Continue with the second tutorial on particles to learn more about adding further detail.

How to add more details to a Particle Effect

Overview

After creating simple 2D particles this tutorials focuses on adding more details to existing particles. To get started load your fire particle from the 1st part to follow the walkthrough below.

Adding more Particles to the effect

Adding child particles

Every particle can have child nodes, and these can be triggered by the parent effect. First make sure the particle Fire1, which you created in the previous particle tutorial, is selected in the particle editor.

Now click on the Add Sub Effect button to make a child node.

Right-click the child node and rename it to "Spark1".

Setting up Sparks

Select Spark1, then go into the Appearance pane, and turn on Orient To Velocity, set the Texture to spark_stretched_mono.dds and set the Blend Type to Additive.
In the additional parameters of Texture Tiling, set Tiles X and Tiles Y to 2 and Variant Count to 4.
Note:
You may have right-click your entity and click Reload Script in order to see visual effect.

Using a random frame in an animated particle

This sprite is made to be used as an animated texture. To create an animated texture yourself, prepare a tiled texture like the one shown. The animation frame order starts at the top left corner, continues to the right, and ends at bottom right tile.

The resolution of each tile must follow the general rule of texture creation in the CryEngine2, i.e. it has to be a multiplier of 16.
In this case, you set the Variant Count instead of the Anim Frames Count, so, on spawn, the sprite texture will be randomly picked from one of the 4 tiles.

Spawning your sparks

Go to Emitter pane and turn on the Continuous switch, set Count to 30, set Particle Life Time to 0.5 and set Particle Life Time Var Random to 0.5.

Go to the Lighting pane and set Diffuse Lighting and Diffuse Backlighting to 0, set Emissive Lighting and Emissive HDR Dynamic to 3 and set Alpha Var Particle Life curve as shown.

Interpolation types in particle graphs

Next, select the end point of the curve, then put the mouse cursor in to the graph area and press the SPACE key. This will change the point’s interpolation type to linear.

Adding color to your particle

At the moment, this texture has no color so let's add some. Open the advance properties of the Color pane.

Double-click the left edge of the Color Var Particle Life bar...

…and the color selector will pop up as below.

Select a bright orange color then press OK.
Double-click the right edge of Color Var Particle Life bar. Make a new point and set it to dark orange. The Var Particle Life bar should look as shown below.

Altering the size of your sparks

Now, go to the Size pane and set it up as shown:

Go to the Spawning pane and set Random Offset X and Y to 0.5.

Spawning/Random Offset boxes adds a random offset to the spawning point of the particle from the emitter’s axis.
Next, turn on the Second Generation switch. This makes sure spawned particles are triggered by the parent particle. Every time Fire1 spawns 1 sprite, Spark1 triggers, to spawn up to a maximum 30 sprites.
When second generation is turned on, the Inherit Velocity value will affect the Second Generation particles movement. This is the percentage of velocity that a child particle inherits from the parent particle at emission time. Try increasing this value, and see how it affects the movement of your particles, and save it if you like it.
Be sure to save your scene before go to next step.

Tweaking the particle's movement behavior

Go to the Angles pane and set Emit Angle to 45, Emit Angle Var Random to 1 and Rotation Rate Z to 20.

Go to the Movement pane and type in the settings indicated below:
This time, you set a negative value for Gravity Scale. This means particles will not fall to the ground, but rather fall to the sky.
Turbulence Size, and Turbulence Speed adds simple turbulence movement to particle. The Turbulence Size value controls the amount of turbulence the particle is exposed too, and Turbulence Speed controls the speed of the particle moving along the turbulence path. Play with higher or lower values of these parameters to get a good understanding of how these values work.

Testing your particle in different times of day

Open the Time Of Day window from View/Open View Pane/Time Of Day.
Turn on the Force sky update switch and drag the slide bar to around 22:30 as shown below:

The scene will now become dark, so you can check out how your effect looks at night time.

From this image, it seems like the particle is glowing too strongly at night. To counter this, decrease Emissive Lighting, Emissive HDRDynamic and Alpha value.
You should always test your particle by switching between day time and night time and tweaking values, to make sure it looks good at all times.

Making your fire look more realistic

Setting up an animated texture

To make the fire appear even more realistic, you can change it to an animated texture.
Change the Fire1 settings to as shown below. Use the texture textures/sprites/fire/large_animated1.dds.

Also, be sure to set the position as shown below:

Adding smoke to your fire

Select Fire1, create a child and rename it Smoke1.
Setup Smoke1 as below. Use the texture textures/sprites/smoke_white_tiled2.dds.
Now, repeat the earlier steps:
In the Emitter pane, turn on Continuous and change the Count to an appropriate value.
In the Lighting pane, set up the Alpha value and Var Particle Life curve.
In the Angles pane, set up Rotation Randomization.
Also, remember to Reload Scripts on your selected particle, should you not see changes.

Adding a glow around the base of your fire

Select Fire1, create a child and rename it Base1. This will be a particle that will spawn around the base of your fire, and as such, should not raise up. Set the movement speed to a very low value to reflect this:

Setup Base1 as below. Use the texture textures/sprites/radialfire2.dds.
In the Emitter pane, turn on Continuous, change the Count to an appropriate value.
In the Lighting pane, set up the Alpha value and Var Particle Life curve. Also, tweak Emissive Lighting and Emissive HDRDynamic if you would like to.
In the Angles pane, adjust the Random Rotation Rate.
Also, remember to Reload Scripts.

Useful Information

Loading and using other libraries

Click the Load Library button at left top of the Database View.

A browser window will open, from which you can select a different library.
You can switch between libraries by selecting them from the library drop-down menu.

Copying and pasting particle attributes

You can copy and paste between libraries by right-clicking within the pane and selecting either Copy Category or Copy All.
You can Paste using the same menu.

Applying a material to a particle

You can apply materials to the particle. For example, if you select a refractive material, it will apply refraction to your particle.
Clicking the Browse Material button will open the Material Editor. Select a material from there, then go back to your particle in the database view. Now, click Assign Material.


How to Set Up a Frozen Level

backtoIndex

Overview

The following walkthrough gives you an overview of how to build a frozen level.
You can also open level ice.cry from the original Crysis levels as a base to build your frozen level, this way you don’t need to import all the frozen materials and settings described in this document.

Setting correct lighting for frozen scenes

Open the Time of Day view pane (View/Open View Pane/Time Of Day) and using the Import From File task located on the left of the pane, import this time of day settings (frozen.tod) or set sun, fog and sky color settings to about 243,000,000, 188,000,000 and 115,000,000 respectively as shown in the following screenshot:

Doing so will give your level a good base lighting avoiding over brightening.

Freezing Vegetation

Set the Layer Frozen Property to True in the Vegetation parameters (located in the Terrain section of the *RollupBar*):

Freezing Objects

Select any Object or Prefab and in the Material Layers section of the RollupBar set the Frozen property to True.

Adding frozen roads

Assign one of the frozen materials to your road entity (for example materials/terrain/roads/road_concrete_with_stripes_frozen.mtl)

Choosing frozen ground materials

Open the Terrain Layer Editor (Terrain/Texture...) and import this terrain layers file: frozen_terrain_layers.lay (*File/Import Layers...*).

Then you have some basic frozen colors and detail materials to paint onto your terrain.
You can also manually set them by clicking (while in the Terrain Layers Editor) the Edit Surface Types button and then Add to add a new Surface Type. Rename this if you want and then click the Material Editor button while your new Surface Type is selected and browse to the desired _frozen material in the Materials/terrain folder.

Or in the Materials/terrain/frozen folder:

Adding snow particle system

Add a Particle system with this effect snow.snow.heavy_snow_sheets (click here for the Particle tutorial) to your level. Change the CountScale if you want to have more snow flakes…

Adding a frosty sound environment

Drag an AmbientVolume Sound Entity (RollupBar/Objects/Entity/Sound/) into your level and add this name to the name property field: Sounds/environment:amb_natural_no_battle:amb_ice_hill

Create a Shape (Objects/Area/) and attach the AmbientVolume Entity by clicking the Pick button on the shape parameters and then selecting the already placed ambient volume entity.

Result

When doing all these steps you should get a nice looking frozen level:


How to Set Up an Instant Action Multiplayer Level

backtoIndex

Overview

The following walkthrough gives you an overview how to setup an InstantAction multiplayer level.
You can also open one of the original Crysis levels in the Levels/Multiplayer/IA folder and use it as a base. This way you don’t need to import all the entities described in this document.

Spawn Points

Drag some SpawnPoint entities into your level and rotate them so when player spawn they will have a clear view of their surrounding.

Pickups

Drag weapon and ammo pickups from the Entities/Item list into your level:

In the items properties you need to set:

For the initial setup you can choose default weapon configuration such as:

You can find predefined ammo pickups in your DataBase View when loading pickups_mp.xml

Placing Spectator Points

Drag and drop the spectator point entity from the multiplayer entities to important areas of your level.
Rotate it so it the helper human body looks at key game play locations.

Blocking players from leaving the game area

You can build a wall of solids around your gameplay area to block players from leaving. Make sure you assign the materials/special/collision_proxy_nomaterialset material to the solid so it’s only rendered in the editor and not in game mode:
To see them in game mode, use this command: e_debug_draw 1

Placing ForbiddenAreas (killzones)

Create an Area Shape where you don’t want the player to walk around:
Then drag a Multiplayer/ForbiddenArea entity in your level:
Select the shape and click the Pick button and select the ForbiddenArea entity:
Depending on the delay (in seconds) you set in the ForbiddenArea entity the player will lose healthpoints (set in DamagePerSecond) once he walks into the area:

MiniMap

Place the MiniMap helper into the section of which you want to take a screenshot from:
Click on the blue square and move it to the center of your level, then select Use New Mini Map Area:
Adjust the camera height so it covers the complete area where you want the screenshot to be taken from, select a 2048 pixel resolution, then hit Generate MiniMap

In your Crysis/Game/Screenshots/Map folder two files will be created: 0000.tga (the screenshot) and 0000.xml (the coordinates).
Let’s rename the 0000.xml to Training.xml (the name of your new level)
The xml always must have the same name as your level folder!

Then copy it over to your level directory:

Now edit the xml in notepad by adding the metadata and game rules section (don’t change the startX to mapRadius section as the editor has already created this for you):

  <MetaData>
  <MiniMap Filename="00000.TGA" startX="698.318481" startY="554.986023" endX="1522.318481" endY="1378.986084" mapRadius="50" />
  <Gamerules MP1="InstantAction"/>
  <LoadingScreens screen1="training_Loading.dds" />
  <HeaderText text="training" />
  <DescriptionText text="This is a test map" />
  <Display Name="training" />

Description of the tags, used in the xml file

MiniMap Filename
name of the screenshot which will be used for the minimap (has to be inside the same folder as the xml)
startX/startY/endX/endY
coordinates (always use the automatic generated coordinates)
mapRadius
visible radius of the radar
Gamerules
use PowerStruggle or InstantAction
LoadingScreens
name of your loading screen
HeaderTextstrong>
name of the map of the loading screen
DescriptionText
map description in the loading screen (Use the unicode to make a line break)
DisplayName
name of the map in your server creation menu

When you play the game you should see the new MiniMap by pressing TAB key:

Result

When you have done all these steps you should able to select your new multiplayer level (name TRAINING) from the list. You can share the level with others simply by giving them the level folder, so that they can join your game if they have the same version of the level.


How to Set Up a PowerStruggle Multiplayer Level.

backtoIndex

Overview

The following walkthrough gives you an overview how to set up a PowerStruggle multiplayer level. You can also open one of the PowerStruggle maps from the original Crysis levels as a base to build your own PowerStruggle level, this way you don’t need to import all the buildings and other multiplayer objects described in this document.
After you have created the basic layout, save your level in the folder Levels/Multiplayer/PS.
When the new multiplayer level is for example called “Training” then the folder structure should look like this: …/Crysis/Game/ Levels/Multiplayer/PS/Training.
Remember to always export to engine in order to see the changes you have done in real game mode:

Placing necessary buildings

For the PowerStruggle game mode you need at least the following buildings in your level:

To place them, open the DataBase View (View/Open View Plane/) , select the Prefabs Library tab and load Buildings_mp.xml.
Then drag the buildings into your level:

As you know from playing the game, several buildings are needed in order to buy vehicles...

Placing Spectator Points

Drag the SpectatorPoint entities (RollupBar/Objects/Entity/Multiplayer/) to important areas of your level.

Rotate it so the helper human body looks at key gameplay locations.

Blocking players from leaving the game area

You can build a wall of solids (click here for the Solid tutorial) around your gameplay area to block players from leaving. Make sure you assign the materials/special/collision_proxy_nomaterialset material to the solid so it is only rendered in the editor and not in game mode:
To see them in game mode, type this this command: e_debug_draw 1 into the console.

Placing ForbiddenAreas (killzones)

Create a Shape (RollupBar/Objects/Area/) where you do not want the player to walk around by click placing the boundaries and double-clicking to finish:
Then drag a ForbiddenArea entity (RollupBar/Entity/Multiplayer/) into your level:
Select the shape and click the Pick button and select the ForbiddenArea entity:
Depending on the delay (in seconds) you set in the ForbiddenArea entity the player will lose health points (set in DamagePerSecond) once he walks into the area:

MiniMap

Select Mini Map (RollupBar/Terrain/) and click the section of the terrain where you want to take a screenshot from:
Click on the blue square and move it to the center of your level, then click Use New Mini Map Area:
Adjust the camera height so it covers the complete area where you want the screenshot to be taken from, select a 2048 pixel resolution, then hit Generate MiniMap
In your Crysis/Game/Screenshots/Map folder two files will be created: 0000.tga (the screenshot) and 0000.xml (the coordinates).
Rename the 0000.xml file to Training.xml (the name of your new level). The xml always must have the same name as your level folder!

Then copy them over to your level directory:

  <MetaData>
  <MiniMap Filename="00000.TGA" startX="698.318481" startY="554.986023" endX="1522.318481" endY="1378.986084" mapRadius="50" />
  <Gamerules MP1="PowerStruggle"/>
  <LoadingScreens screen1="training_Loading.dds" />
  <HeaderText text="training" />
  <DescriptionText text="This is a test map" />
  <Display Name="training" />

Description of the tags, used in the xml file

MiniMap Filename
name of the screenshot which will be used for the minimap (has to be inside the same folder as the xml)
startX/startY/endX/endY
coordinates (always use the automatic generated coordinates)
mapRadius
visible radius of the radar
Gamerules
use PowerStruggle or InstantAction
LoadingScreens
name of your loading screen
HeaderTextstrong>
name of the map of the loading screen
DescriptionText
map description in the loading screen (Use the unicode to make a line break)
DisplayName
name of the map in your server creation menu

When you play the game you should see the new Mini Map by pressing the TAB key:

Result

When you have done all these steps you should able to select your new multiplayer level (called TRAINING) from the list. You can share the level with others simply by giving them the level folder, so that they can join your game if they have the same version of the level.


How to Export your Level and Play it in Pure Game Mode

backtoIndex

Overview

The following walkthrough gives you an overview how to export your level so you can manually load and play it in in Crysis' game mode (not in Sandbox game mode).

Running your level in pure game mode

Export to engine

Select Export to engine from the File menu.
This will write the level data into the level.pak file that is read by the engine in pure game mode.

Generating AI navigation

Select Generate Triangulation from the AI menu.

This will write the AI triangulation data into the level.pak file, which can be read by the game in pure game mode. Without this information they AI can most likely not navigate through the level.

Generating level surface Texture

Click Generate surface texture in the File menu.
This will write the painted ground textures to the terraintexture.pak.
For final quality use 16386x16386, high quality, calculate terrain sky accessibility. For testing the default 4096x4096 is fine.

Loading the level in pure game mode

Start Crysis.exe

Press the button left next to the number 1 button of your keyboard to bring up the console:
Type in con_restricted 0 to unlock the console.
Type in map "yourlevelname" (without the "").

Pressing ENTER will load the level.

Result

Once the map is loaded you can play your level in pure game mode.


How to get your Multiplayer Map Listed In-game

backtoIndex

Overview

The following walkthrough shows you how to get your level listed in the multiplayer level selection window.

Procedure

After you have created your level, save it in the folder Levels/Multiplayer/"Levelname", replacing “levelname” with the name of the level. If your level is called “Training” for example, then the folder should look like this:

Editing the xml file

In the level folder there should be a .xml file with the same name as the level:

Edit the xml in a text editor, filling in the details below.
Note:
The line beginning with “ <MetaData> <Gamerules MP1="PowerStruggle" /> [DELETE LINE IF LEVEL IS INSTANT ACTION] <Gamerules MP1="InstantAction" MP2="TeamAction" /> [DELETE LINE IF LEVEL IS PS] <LoadingScreens screen1="training_Loading.dds" /> <HeaderText text="training" /> <DescriptionText text="Here you can describe the objectives of the map" /> <Display Name="training" />

Result

Finally, your level should show up in the multiplayer level selection list, as shown below. You can share the level with others simply by giving them the level folder, so that they can join your game if they have the same version of the level.
Powerstuggle maps:
Instant action maps:


How to set up a Mod in Sandbox2

backtoIndex

Overview

In this document you will learn how to correctly set up your mod so you can work with it independently from the core Crysis installation. In addition this document includes a description how to prepare your mod for distribution and get it working for the Crysis Mod Loader that is implemented into Crysis since patch 1.2.

Working with Mods

Getting started

The first step in creating a new modification for Crysis is to open a file browser (Windows Explorer for example) and find where Crysis is installed. There you'll have to create a subfolder called "Mods", in which you need to create your mod folder. For example, if your Mod is named “mymod”, create a new folder with that name. The path should look something like this:
root directory of your Crysis Game \Mods\mymod

Here is a full list of how the folder structure inside your mod should look like:


root directory of your Crysis Game \Mods\MYMOD\Bin32

root directory of your Crysis Game \Mods\MYMOD\Code (C++ source)

root directory of your Crysis Game \Mods\MYMOD\Game\

root directory of your Crysis Game \Mods\MYMOD\Game\Animations

root directory of your Crysis Game \Mods\MYMOD\Game\Entities

root directory of your Crysis Game \Mods\MYMOD\Game\Fonts

root directory of your Crysis Game \Mods\MYMOD\Game\Levels

root directory of your Crysis Game \Mods\MYMOD\Game\Levels\Multiplayer\

root directory of your Crysis Game \Mods\MYMOD\Game\Localized

root directory of your Crysis Game \Mods\MYMOD\Game\Libs

root directory of your Crysis Game \Mods\MYMOD\Game\Materials

root directory of your Crysis Game \Mods\MYMOD\Game\Music

root directory of your Crysis Game \Mods\MYMOD\Game\Objects

root directory of your Crysis Game \Mods\MYMOD\Game\Prefabs

root directory of your Crysis Game \Mods\MYMOD\Game\Scripts

root directory of your Crysis Game \Mods\MYMOD\Game\Shaders

root directory of your Crysis Game \Mods\MYMOD\Game\Sounds

root directory of your Crysis Game \Mods\MYMOD\Game\Textures

Loading a Mod in the Editor

To load your Mod in the Sandbox Editor, you need to run the Editor.exe with a command line parameter. Be sure you have the editor installed properly, and then follow the steps below:

  1. Go to your Crysis root directory and enter either the “Bin32” or “Bin64” folder depending on your installation.
  2. Right click on the Editor.exe and create a shortcut of it on the Desktop.
  3. Go to your Desktop where the Editor shortcut should be located.
  4. Right click on this short cut Properties enhance the target line with the command “-mod mymod” (without “”)

The target line should look like this:

The Editor will then load up with your mod files (such as new assets), or the default game files if no other files exist.

Loading a Mod in Crysis

The following you will find an alternative method of loading a mod in Crysis if you do not want to use the Mod Loader that is embedded ingame. To launch Crysis directly with having a mod loaded, you need to run the Crysis.exe with a command line parameter.

  1. Go to your Desktop where a Crysis shortcut should be located.
  2. Right click on this short cut > Properties > enhance the target line with the command “-mod mymod” (without “”)

The target line should look like this:

The game will then launch by having your mod loaded as well. You can deactivate it ingame via the Mod Loader if you wish so.

Preparing a Mod for distribution

Re-Packing your Mod

In order to optimize your modification for the distribution it is always good to pack the folders inside your mod in order to minimize the size and to keep everything easily structured for the community.
This is a list of which folders should be put into one new .pak file:

Animations.pak
Animations
GameData.pak
Entities
Fonts
Libs
Materials
Prefabs
Scripts
Music.pak
Music
Objects.pak
Objects
Shaders.pak
Shaders
Sounds.pak
Sounds
Textures.pak
Textures

Before you start creating such a .pak file be sure to have a ZIP or RAR program (such as WinZip, 7Zip or WinRar) installed. To create such a .pak file please follow these steps:

  1. Go to your mod folder that is located inside root directory of your Crysis Game \Mods\
  2. Enter the “game” folder and select some folders you want to put into a .pak file.
  3. Right click on one of the folders and select “add to archive...”.
  4. Define the name of the file (e.g. GameData or Objects) and use the normal .zip compression. ( note: other compressions won’t work properly!)
  5. Replace the .zip ending by .pak and create the archive.

List Mod in the ingame Mod Loader

To have your mod being listed ingame in the mod loading menu you need to prepare a specific .xml file that needs to be stored in the following directory:

root directory of your Crysis Game \Mods\mymod 

The file is called “info.xml” and includes the following content.

<?xml version="1.0" encoding="utf-8"?>
<Mod Name="<yourmod>" Version="<0.0>"  Screenshot="<jpg file>" Description="<description>" url="<URL>"/>

The following is a description of what kind of information can be put into this file:

Mod Name
put in the name of your mod
Version
0.0 (add the version number of your mod)
Screenshot
image for the mod loader menu
Description
description of the mod
url
URL of your mod/mod team

It is recommended to always implement a small banner of your mod that is getting displayed automatically when selecting your mod ingame via the Mod Loader. It helps the community to identify your mod easier and also looks nice and more professional.
To add an image place a screenshot with the maximum size of 512x384 in your mod folder and add the full name of it to the Screenshot description inside the “info.xml” file.


Advanced Tutorials


How to setup weather effects

backtoIndex

Overview

The following walkthrough gives you an overview how to setup these weather effects:

  1. Clouds
  2. Rain
  3. Snow
  4. Lightning
  5. Wind
  6. Fog
  7. Earthquakes
  8. Tornados

Cloud Types

There are 3 types of cloud entities that can be placed:

3D Clouds (simple shading)

Drag and drop a cloud entity into the level:

Place it at above 1000 meter (z value = 1000)
Click the select file button ()

in the cloud file property field of the cloud entity to select one of the cloud objects in the game/libs/clouds folder:

Open the material editor and assign one of the cloud materials (in materials/clouds folder) to you cloud if you don’t like the default baseclouds material:

Scale it with the scale tool:

Cloud Movement To make the clouds move, set the automove property to TRUE and set a fade distance to 100 to make them fade in when they reach the edge of the box in which they are moving. Then you need to define how big the box (spaceloopbox) should be in which they are moving from one end to the other. Finally you need to set a speed at which they should be moving. For normal clouds you can use 5 as speed value and for storm clouds about 15. Experiment a bit but remember if you want to select a cloud its wise to turn off automove, otherwise you might not see the cloud you have selected.

Clouds Volumes (best shading)

Drag and drop a volume entity into your level to place a cloud with nice shading.

Follow the steps explained in the 3D Clouds section above to change look, movement and shading of the volume object cloud.
The difference to the normal 3d cloud is that volume object clouds will have correct self shadowing and can be rotated:

Do not place too many of the volume object clouds as they affect the performance.
Note: If you assign a new material go sure that it has the correct shader applied. For volume clouds you have to assign the “volumeobject” shader under material settings.

Cloud Planes

Drag and drop the distance cloud entity to your level:

Scale it with the scale tool to about 100, then assign one of the distancecloud materials (all materials with Distanceclouds shader in materials/clouds folder can be used):
Distance clouds are 2D so they should be placed far away or above so that the player does not see that they are flat:
Cloud Shadows : Clouds don’t cast realtime shadows but there can be a (moveable) texture used that is casted on the entire level creating the illusion that clouds cast shadows: Use the default cloud shadow texture (textures/clouds/cloud_pattern.dds), adjust it in photoshop (paint white color at the areas where you don't want to have shadows)

Set the Cloud Shadow Speed to 0.001 for fast moving clouds and 0.0005 for normal clouds.

Rain

Drag and drop the particle effect entity into your level:

Add this particle effect to your rain area: rain.rain.space_loop
To assign this particle effect to your particle source you need to put the name of the effect you want use into the particle slot. Just copy rain.rain.space_loop and paste it into the slot Adjust the count scale to get more rain drops.
To limit the effect to a certain area of your level simply make a shape and use the pick tool of the shape to select your particle system that should be activated and deactivated if the player crosses the border of the shape:

Snow

Drag and drop the particle effect entity into your level:

To add this particle effect copy the name ( snow.snow.heavy_snow_sheets) and paste it into the particle slot. Adjust the count scale to get more snow flakes rendered.
To limit the effect to a certain area of your level simply make a shape and use the pick tool of the shape to select your particle system that should be activated and deactivated if the player crosses the border of the shape:

Lightning

Add the lightning entity to your level

Activate it and change parameters like delay (in seconds) to get the right type of lightning

Wind

The global wind speed can bed adjusted by entering numbers (values in Beaufort Scale) into the environment settings wind vector field. (positive y values means how fast wind moves to north, negative y south, postive x east, negative x west):

For each wind area create a shape and attach the wind entity to this shape. For a wind speed of 3 meters/second enter this settings:

Fog

The global fog of the level can be adjusted in the time of day dialog:

For fog in certain areas you have to place the fog volume entity into your level:
Then adjust the size to cover the area where you want to have dense fog:

Adjust density and colours to the values you like. Use fog volumes to simulate fog below rainclouds:
Without fog volumes rain clouds will look wrong:

Earthquakes

Drag and drop the shake entity into your level (its invisible so don’t worry)

Set up the shake amount and radius in the properties: Enable the shake entity by adding it to a flowgraph:

Tornadoes

On the tornado properties you can change the wander speed to make it move faster around:

Result

As you have learned it possible to build almost every weather effect within the sandbox editor.


Basic Trackview Tutorial

backtoIndex

Overview

The following tutorial will show you the steps for setting up a basic cinematic scene in CryENGINE® 2

Table of Content

Creating a new Track view sequence

Getting Started

  1. Create a new layer in the layers panel, call the new layer “cinematic”
  2. To create a new scene first open up the “trackview” panel View > Open View Panel > Track View.

Once Track view is open click on the Add Sequence icon.

Name the sequence “example” then click OK.

Once you have created your new scene it is time to setup the properties for this specific scene, click on the Edit Sequence icon

With the Sequence Properties** window open, check the following boxes:

Check Disable Hud, this disable the default players hud, Disable Player** hides the player during the scene, 16:9 enables the black bar effect, and Non_Skippable** means that if the player presses space to skip the scene it will continue to play, the EndTime has been adjusted also for a scene of 15 seconds in length.
The first element to add to the scene is a Scene Node. This enables us to switch cameras.

However as no camera has been added to the level a camera can not be selected. Next we need to add a camera, in the select camera and place one into the level.



The camera entity in the Sandbox 2 editor.

Next we want to select the scene to use this camera, Double click in the time line at frame 0 to add a key, once a key has been added right click on the key to bring up the Key Properties, click the drop down box and select the newly added “Camera1 ”

Next we want to add the camera to the Track view so we are able to animate the camera moving,
Select the camera to add it to the scene track in the Track view, Select the camera and click the Add Selected Node** icon in the Track view.

The camera should now appear in the Track view as below.

Next we need to ad an object of interest to the scene, for the camera to focus on.
In this example we will add a human character with a simple walk animation.
For characters in cinematics an AnimObject is used, this is used as apposed to an Ai Entity for performance reasons and also as an AnimObject dosnt have AI, the AI system won’t be conflicting/fighting with the Track view system.

Select the AnimObject under the RollupBar and left drag it into the view port,
With the AnimObject selected, click in the Entity Properties** in the roll up bar, we are going to replace the default rectangular object with a human character, select the Model field and click on the folder icon.

Next we need to select a character for use with the scene. For this scene we will use the player’s Nanosuit.
Browse for the file under objects/characters/human/us/nanosuit

Next we will add the character to the Track view, select the AnimObject and in the Track view click the Add Selected Node.

The Track view should now look like the image below.

With the AnimObject added, next we want to add an animation track to animate the character, right click on the entity, select Add Track > Animation1


Next we will select an animation for the character. Double click at frame 0 to add a key in the animation track, then right click on the key to bring up the Key Properties, then click the drop down box and scroll down to select the animation “relaxed_walk_nw_forward_slow_01 ” also click the boxes Loop Animation** to make the animation loop forever, and also Root not move so the animation does not offset and pop back after playing


Key framing in Track View

The next step is to key frame the character as he walks across the ground, currently as the character walks he is sliding on a spot.
First make sure the character is selected and the Track view slider is set to frame 0, once selected click the Record button in the Trackview editor.


In the perspective view, move the character to the desired starting position at frame 0, this will record the position and add a positional key for the character, next drag the time slider in the Track view to the final frame at 15 seconds, you should notice a key appearing at frame zero, now at frame 15 with the record button still depressed move the character to the desired end position.
If you now scrub through the scene with the time slider the character should now appear to be walking between two points, adjust the end position to get a natural looking walk.

Animating the camera

With the character now walking along we want to have the camera following him and panning around as he walks.
To look through the perspective of the new camera right click on perspective to bring down a menu for the view port configuration, then select Camera > Camera1, you will now be looking through the new Camera1.


At first the camera is locked and can not be manipulated like a standard perspective viewport, to unlock the camera first uncheck the Lock Camera Movement.


As a built in safety measure to stop the user accidentally moving the camera thinking it’s the perspective window, the button in the Track view must also be depressed.
We are now ready to animate the camera, set the time slider to frame 0 and make sure you have the camera selected and the button depressed in the Track view, with the viewport set to, move the viewport as desired to frame the shot,
Next drag the time slider in the Track view to 5 seconds and position the camera as desired, continue this process at times 10 seconds and 15 seconds.
Uncheck the record button to avoid accidentally animating the camera, if you now scrub the time slider in the Track view back and forth you should see the camera animating along the new path and the character walking along.
Next we want to set the camera back to the default perspective, right click on Camera1 and select Default Camera.


We should see an overview of the scene with splines depicting the path of the camera and character.


Playing the scene

If we simply drop into game “crtl+g” the scene will not play by default, we first have to set up logic using the Flow Graph editor.
First we need to add an Entity to contain the Flow Graph, it is possible to contain the Flow Graph within the AnimObject character, however having a specific entity is safer as it generally will be harder to delete by accident, for this setup we usually use an AreaTrigger.


Select the AreaTrigger and drag it into the view port, rename “cine_example_FG” next we need to create the flow graph, click on the CreateStyle icon under Flow Graph.


A window called Enter Group Name for the Flow Graph will pop up, call it “cinematics” this is useful to contain all your flow graphs that are related to cinematics.

With the AreaTrigger selected click on the Open button to start working on the Flow Graph for the scene.


The Flow Graph editor will now open, make sure that you have your newly created flow graph selected to start working on it.


For this tutorial we simple want the scene to start as soon as the player drops into game, for this functionality we will add a Misc>Start node.
Right click on the grey area to add a new node and select the Start node, this will trigger as soon as the player drops into game.


Next we need the start node to trigger the sequence to play, by adding a Animations:PlaySequence node.


With the two nodes added we need to connect them to setup the logic, simply click and hold on the blue arrow port and drag it into the green StartTrigger input port.


Next we need to select which Sequence to play, double click on the Animations:PlaySequence node, in the Inputs settings on the right, click on the three dots to open the Select Sequence** pop up, select the sequence that you have created “” and click ok.
This is what the current flow graph should look like.

Testing the scene

If you now drop into game “ctrl+g” the scene should play automatically on start.

Post scene setup

In this scene we are creating the illusion that the character in the scene is the player, thus after the scene has finished we want to hide the AnimObject character, we can do this in the Track view. Open the Track view and select the AnimObject character entity, in the event track double click to add a key frame at 15 seconds, right click on the key frame to bring up the Key Properties , under the Fire Event: drop down box select Hide.

This will hide the character when the scene gets to the last frame, however if you scrub over the scene in the Track view the character will now disappear, thus we need to add an Unhide event at frame 0, again double click in the event track to add a key frame, right click on the key frame to bring up the Key Properties, under the Fire Event drop down box select Unhide.

Now the character will unhide and hide accordingly.
To complete the illusion we need to make the player start/continue from where the actor finished in the scene. Currently the player will start from where they dropped into game which creates a break the illusion.

First we need to get the end position of the AnimObject character, scrub the timeline in the track view to 15 seconds, next we need to reference this point,
A useful object to use is an AI TagPoint as it is hidden in game mode, select the tag point and place near the character, rename “cine_character_endpoint”

To get perfect alignment to the character we will use the Align Selection tool select the tag point and then click the align selection icon then click on the character, this should move the tag point to the correct position.
Next we need to add logic in the flow graph to the player to this position after the scene, open the flow graph editor and select the flow graph, right click on the grey area to add a new node Entity:BeamEntity.

The Entity we want to be beaming is the player, add the node Game:LocalPlayer
Last we need to add a node which references the position of the AI TagPoint where the player ends, add the node Entiy:EntityPos.
With these new nodes added connect the flow graph as shown below by linking the output to inputs, to assign the tag point to the Entity:EntityPos node, select the AI TagPoint in the viewport, then right click on the Entity:EntityPos flow graph node and select Assign Selected Entity.
Now when the scene has completed the player will be located at the position of the tag point.

Adding Screen FX

For this scene we will fade in from black at start and then fade out again to black at the end and finally fade in from black once the player has control.

Open the flow graph editor and select the flow graph you have been working on, right click to add a new CrysisFX>ScreenFader node.
Select the new CrysisFX>ScreenFader node and in the inputs setting adjust the fade in and fade out times to 4.

Next duplicate the CrysisFX>ScreenFader node by right clicking on it and clicking copy, then right click on the grey area and click paste, do this twice so there are a total of three ScreenFader nodes.
Next we need to add a new AreaTrigger to trigger the fade out logic in the flow graph from the Track view.

Add a new AreaTrigger into the viewport and rename “cine_FadeOut_DT” DT is for Dummy Trigger which is used to send events from the track view to the flow graph.
Next add the cine_FadeOut_DT to the track view by clicking the Add Selected Node** icon.

Under the event track for the cine_FadeOut_DT add a key frame at 11 seconds. right click on the key frame to bring up the Key Properties and under Fire Event: set to Leave.

Next open the flow graph editor, right click on the grey space and select Add Selected Entity. This will add the AreaTrigger to the flow graph. With all the nodes now added to the flow graph, it is now time to link the logic together, setup the flow graph as pictured below, Simply click and drag the output from a node to the corresponding node input to make a connection.


Facial Editor Tutorial

backtoIndex

Overview

This Document explains the process of setting up a head in the Facial Editor for Animation.

Basic Head Setup

The Facial Editor View

Open the Editor. Go to View/Open View Pane/Facial Editor.

Facial Editor

You can arrange the different views which are part of the main editor window by grabbing them on their main bar, and dragging them out of the main window.

(above you can see the setup we are using in production).

Loading the Head Character

From the main tool-bar of the Facial Editor select Character/Load

In the file dialog select the file “Game/Objects/Characters/human_male/head.chr”.

You need to have the SDK Assets installed to access this character or other files referenced in this tutorial

This loads your head character into the Facial Editor.

Effectors Sliders

In the “Effectors Sliders” view three morphs are showing up. They are called “Brow_lowerer“, “Jaw_pusher” and “jaw_dropper_01”.

Creating the Expression Library

In the following step we are going to create an Expression Library for the head.

This is where all the basic morph targets could be mixed together to create more complex expressions, like different moods (i.e. sad, happy, angry), or phonemes to use for lipsynch-animation.

Expression Explorer

First create a new folder where the expressions get stored. Right-click the “root”-folder and chose “New Folder”.

Enter the desired name in the text-box that opens and hit “OK”.
Right-click the newly created folder, and select New Expression.

Type in “example expression” and confirm the dialog by hitting the “OK”-button.

This creates an empty “Expression-Container” where all morph targets and their influence to the resulting expression get stored.

Go to the “Effects Sliders” view, and move the weight slider of any morph you want to add to the expression to an appropriate value. The result is visible in the Preview window.

Once satisfied, right-click on the new expression in the “Expression Explorer” view, select “initialize from sliders” and confirm the following dialog by selecting “Yes”.

This adds the morphs which have a value set other than zero to the “example expression” node.

On the right side of the Expression Explorer view, a linear curve is created for each of the morphs which have been added to the expression while initializing it. The displayed weight curves visualize how strong each morph contributes to the resulting shape of the character.

The purple line represents the “zero” value when the expression is animated in the sequence view later on, going up to “+1” for full influence on the right side or “-1” to the left.

Once you are done with creating all the different expressions you need for your character, save the expression library by going to Expression Library/Save As in the Facial Editors main tool-bar. Call it “head.fxl”, and save it to this folder:
“Game/Objects/Characters/human_male/”

To load the right expression library automatically next time you use this character, a cal file is used to point to the correct library-file for the head.

Create a new empty txt-file, add this line:

”$facelib = objects/characters/human_male/head.fxl“

save it as “head.cal” to this folder:

“Game/Objects/Characters/human_male/”

Next time the character is loaded it will automatically use the expression library which is specified in the cal-file.
The cal-file always needs to be named like the head.chr, and needs to stay in the same folder.

The Sequence View

The “Sequence View” is where you add your expressions or morphs from the “Expression Explorer” to animate them. Right-click the root-folder (which is there by default) and select “New Folder” from the menu. In the dialog that opens enter “animated expressions” and confirm it.

Highlight the “example_expression” in the “Expression Library” view by left-clicking it. Then right-click on the “animated expression” folder in the sequence-view, and chose the “Add Selected Expression”-command.

This adds the highlighted expression from the “Expression Library” to the “Sequence View”.

Now you can start animating the expressions you added by placing keys on its curve, either by double-clicking it, or by using the “R”-shortcut, which places a key at the time-slider’s current position.

To save the animation, go to Sequence/Save As in the main toolbar of the Facial Editor.

Conclusion

This concludes the basic requirements to set up a head for facial animation. To be able to re-use already done expression libraries, or joystick-files and sequences, it is advisable to keep the naming convention for the morphs the same for all your head characters.

Bone Controls

The Facial Editor also supports bone-driven animations to animate bones from the characters hierarchy inside the Editor.

In the “Expression Explorer”, right-click a folder and select “New Bone Control”. Enter “eye_left_horizontal” in the dialog and confirm it.

When the bone control is highlighted, you can see its options on the right side of the “Expression Explorer” view.

Open the drop down-list beside “Attachment/Bone” and select the “eye_left_bone”.

In the position and rotation settings below you can define a position offset for an attachment and the axis and its limits about which the expression can rotate the bone.

Enter 30 for the “Rotation Angle” in the right box, which stands for the Z-Axis. This gives the eye-control an overall range of 60 degrees. 30 degrees when the expressions value is at “+1”, and -30 degrees when it is at “-1”.


How to create minimaps

backtoIndex

Overview

The following walkthrough gives you an overview on how to create minimaps using the CryENGINE® editor and Photoshop.

Creating a minimap

Getting started

To start off doing minimaps you will have to edit the MapScreenshotSettings.xml with Notepad , the xml file is located in the \Editor folder.

A lot of these settings can be tweaked to create the most desirable result, also make sure to create a backup copy of the original MapscreenshotSettings.xml .

<<b></b>settings>

<<b></b>e_fog value="1" />

<e_shadows value="0" />

<<b></b>r_PostProcessEffects value="0" />

<<b></b>r_HDRRendering value="0" />

<<b></b>e_detail_materials value="1" />

<<b></b>e_gsm_range_step value="20" />

<<b></b>e_gsm_lod_num value="3" />

<<b></b>e_gsm_range value="20" />

<<b></b>e_gsm_cache value="0" />

<<b></b>e_detail_materials_view_dist_z value="256" />

<<b></b>e_vegetation_sprites_distance_ratio value="4" />

<<b></b>e_shadows_cast_view_dist_ratio value="1" />

<<b></b>r_EyeAdaptationFactor value="0" />

<<b></b>r_EyeAdaptationBase value="1" />

<<b></b>r_HDRRendering value="1" />

<<b></b>e_lod_ratio value="4" />

<<b></b>e_clouds value="0" />

<<b></b>e_water_ocean value="1" />

<<b></b>e_particles value="0" />

<<b></b>e_view_dist_ratio value="800" />

<<b></b>e_hw_occlusion_culling_water value="0" />

<<b></b>/settings>

Step.1
First open up the desired level in the Editor that you want create a minimap for.

Step.2
Next we’ll open up the minimap function; this is located in the RollupBar , in the Terrain pane.

Now when pressing the minimap button, a green bounding box, and a smaller blue “selection” box will appear on the terrain, this is sometimes at the 0,0,0 map coordinates.

To move the minimap bounding box, click and hold the right mouse button and move the blue “selection” box to the spot where you want to create your minimap.

Step.3
After you have moved the box, press the “ Use New Mini Map Area ”button to update the minimap bounding box to its new location. The green bounding box shows the area that will be made into a minimap image, adjusting the camera height will therefore change the size of it.

To change the Camera Height , put the preferred height into the input box and press “ Use New Mini Map Area ”.

Adjusting the Resolution in the minimap properties will increase the size of the minimap image that the Editor generates, for example choosing a resolution of 2048 will give you a minimap image of 2048x2048 pixels.

Step.4
Before going to step.5 , make sure that the minimap bounding box is actually bigger than the actual play area of your map, so that when a player stands on the border of your map he doesn’t get cut off on the HUD radar. This is an important step and rule to keep in mind when creating minimaps, to prevent having to redo your minimap.

Step.5
Now, when you’re all set and have selected your Camera Height , Resolution and area, be sure to select hexadecimal or even numbers for the Camera Height , if you know that you will add more detail to the minimap later on, i.e 256, 512, 1024, 2048 etc. You can now go ahead and press the Generate MiniMap button.
A quick succession of images will flash in the upper left corner, showing that the editor is creating your minimap; this can take a few minutes depending on the Camera Height , Resolution and MapScreenshotSettings.xml .
(Note though that you should only choose to use very large resolutions i.e. 8192 or 16384, if you are running the editor on a very high spec system with a minimum of 8 GB of ram)
After the editor has finished, your minimap should be placed in \Game\ScreenShots\Map along with the .XML file
The xml provides the engine with the map coordinates so that the player position is correctly displayed on the minimap.

Preparing your minimap

Step.1
In Photoshop open up the minimap image file that was just created. To make sure that your minimap will display correctly in the game you will need to desaturate your image and tweak its “levels”.

Step.2
To desaturate your minimap image go to Image>Adjustments>Desaturate, this will essentially make your minimap black & white.

Step.3
Now we’ll need to adjust the levels, as a color overlay will be applied on top of the final image, you will need to have some outstanding black and white’s and clear grey tones, the better the levels are adjusted the more details players will be able to recognize. Try to avoid creating completely black areas.

To start off, go to Image>Adjustments>Levels, this will open up the “levels” output box.

By adjusting the input levels you can create a well contrasted image.

Step.4
Now Go to File>Save As, this will open up the save as window, under formats choose the crytifplugin

Go ahead and press save now as this will start the crytifplugin , which has a wide range of settings and options – but we only need to use a few.

Step.5
First, change the Preset option from its default (diffuse_highQ) to Minimap .

Step.6
Next go to the Advanced pane and check to make sure that “Auto Optimize file” is unchecked.

You can now go ahead and press OK , crytifplugin will now go ahead and create a .TIF file – don’t worry about the end file size. The Resource Compiler will automatically create a .dds file for the target platform, specified in its settings.

IMPORTANT you do not need the Cry Tif plugin for Photoshop to create a minimap.

Just use the .dds plugin from Nvidia to export the minimaps as DXT1 from Photoshop.

Step.7
The minimap is now ready to be used, select the .TIF file and the xml file that was created when you made your minimap and copy both files to your map folder. If you already have an xml file located in your map folder, you can merely open it with notepad .

Inside the xml file you will need to edit the numbers in the first line that shows the startX , startY , endX and endY , exchange the numbers here with the numbers located in your minimap xml file.

Make sure that the MiniMap Filename points to the filename of your new minimap .dds image file.

Instead of putting in .TIF as the file definition you will need to put in .dds instead (the one the Resource Compiler will create from the TIF, or you manually created via the NVIDIA plugin).

(Note if there is no numbers located in the xml file, just copy the whole line from your minimap xml file.)

The minimap is now visible in your map.

Adding detail to your minimap

This process will require you to create several smaller pieces of your minimap and then later putting them together using Photoshop.

This is mostly a process you will have to do if your pc is not able to handle the creation of high resolution minimaps.

Before starting, make sure that you’ve got the NVIDIA Texture Tools installed in Photoshop. (http://developer.nvidia.com/object/dds_utilities_legacy.html)

Step.1
Now using Photoshop, open up your minimap .DDS file, the NVIDIA tools will recognize it and open up this property window, here you can just press OK .

With the minimap opened you can see here on this example below that the quality at 100% is not the best. We’ll change that.

Step.2
Go back to the Editor, and select the minimap function. For higher quality it’s enough to change Camera Height and keep the resolution to the original minimap, this is important otherwise you will run into issues with image sizes not matching.

You will also need to change the lines listed here below, in the MapScreenshotSettings.xml , these settings will raise the quality and amount of objects visible. After you’ve edited the MapScreenshotSettings.xml you can go ahead and press Generate MiniMap , this will again create a minimap image file and an xml file, the xml file you can safely delete as there’s no need for it.

Step.3
Now go back to Photoshop and open up the minimap file the editor just created. Select the whole image by going to Select>All and select copy under Edit>Copy.

Go to your minimap that you want to add detail to, under Edit>Paste and place in the copied image.

Step.4
After you’ve done all that its time to resize the image you just pasted onto the minimap. This is where the calculator will come in handy for you, i.e. if your minimap was created with a Camera Height of 512 for example; you preferably generate the smaller minimaps in increments such as 256 or 128 etc.

If you for example generate smaller minimaps with 128, that’ll need to be divided by 512 to calculate the scaling percentage (128/512 = 0.25, which equals to 25% scaling.)

Step.5 When you’ve successfully scaled your minimap piece to its correct size, you’ll need to move it to its correct position on the original minimap, remember to double check if it really fits correctly. Repeat steps 2 to 5 as many times as you want to ensure that your minimap has a high level of quality.

And that’s it; with a little bit of extra work you will have a very high quality minimap.


How to create a Full Screen Effect with Flow Graph

backtoIndex

Basics

It is possible to use the flowgraph functionality to create full screen effects. This document is aimed to explain the nodes and functions to making these effects.

Show Additional Nodes

By default, the nodes for effect can not be seen in Flow Graph. To see them, go to the Flow Graph menu View/Components/WorkInProgress and check it on.

Add New Node

To add a new node on Flow Graph , Right Click any space in the main window, then go to Add Node , then select the node you want.

Delete Nodes

To delete nodes, select nodes and then press delete.

Connect Nodes

To connect or disconnect nodes, drag and drop the arrows among the nodes.

Copy and Paste

You can copy and paste multiple nodes at once by select nodes and right click/copy, paste.

Nodes for Effects

Camera Nodes

Found in Add Node > Camera . These nodes can make camera effects. ViewShake Generate random shake animation of the camera. It is effective to connect with explosive effects.

  1. Trigger: Triggers effect.
  2. Restrict: Select a condition for the ViewShake. This can be set to ‘None’ for no condition, ‘NoVehicle’ if the shake should be applied only if the player is not in a vehicle, or ‘VehicleOnly’ if the effect should be applied only if the player is inside a vehicle.
  3. View: Selects camera to apply effect. Can be ‘FirstPerson’ for the Player, of ‘Current’ if you want to apply a ViewShake for a trackview sequence for example.
  4. GroundOnly: When it’s on, only apply the shake when the player is standing on the ground.
  5. Angle: Controls the angle of the camera shake movement.
  6. Shift: Controls the shift distance of the camera shake movement.
  7. Duration: Controls duration from start to end of the effect.
  8. Frequency: Controls frequency of the shake movement.
  9. Randomness: Controls the randomness of the shake movement.

CrysisFX nodes

[Deprecated - use Image nodes instead]

Image nodes

This can be found in Add Node/Image . Image nodes are used to expose post process effects that can be used for gameplay or cutscenes purposes.

Important note: Multiple nodes can be used at same time to mix their results for different effects, but be aware that each of these nodes adds an extra rendering pass over the screen, so make sure to limit amount of nodes usage at same time to a reasonable amount. Most gpu expensive effects are marked with an *expensive note on them on this document.

ColorCorrection Sets the final image color changes for gameplay/cutscenes. For final image color grading use the “Time of Day” controls instead.

  1. Enabled: Enables / Disables node.
  2. Cyan: Controls Cyan value of the whole screen
  3. Magenta: Controls Magenta value of the whole screen.
  4. Yellow: Controls Yellow value of the whole screen.
  5. Luminance: Controls the Luminance of the whole screen.
  6. Brightness: Controls the Brightness of the whole screen
  7. Contrast: Controls the Contrast of the whole screen
  8. Saturation: Controls the Saturation of the whole screen
  9. Hue: Controls the Hue of the whole screen.
  10. DepthOfField (*expensive) Simulates camera depth of field.
  11. Enabled: Enables / Disables node.
  12. EnableDof: Enables / Disables effect.
  13. FocusDistance: Controls focus distance of the camera.
  14. FocusRange: Controls focus range of the camera.
  15. BlurAmount: Controls intensity of the blur Effect.

FilterBlur Applies blur filter to screen.

  1. Enabled: Enables / Disables node.
  2. Type: Selects type of the filter (only 1 type supported at the moment).
  3. Amount: Controls intensity of the effect. 0 disables

FilterRadialBlur Applies radial blur effect to screen.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables
  3. ScreenPosX,y: Screen space position of radial center.
  4. BlurringRadius: Radial distance attenuation.

FilterGrain Applies grain filter to screen.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables

FilterSharpen Applies an unsharp mask to the whole screen.

  1. Enabled: Enables / Disables node.
  2. Type: Selects type of the filter (only 1 type at the moment.
  3. Amount: Controls intensity of the effect. 1 disables, values below 1 blur screen, above 1 sharpens screen

DirectionalBlur Applies directional blur effect to the whole screen. Can be used for example for hit effects. Depends on motion blur, if it is enabled.

  1. Enabled: Enables / Disables node.
  2. Direction: Controls direction vector.

ChromaShift Applies chroma dispersion (multiple RBG sampling instead of single sample) effect to the whole screen.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables

EffectWaterDroplets Game specific effect, applies water flowing over the screen. This was made to be used when camera comes out of a water volume and is usually done automatically by the game engine.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables

EffectWaterFlow Another game specific effect, applies water flowing through screen. This was made to be used when camera is receiving any kind of water flow (e.g.: sprinkles, waterfalls). Should be used subtly.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables

AlienInterference (*expensive) Specially designed to generate alien noise/interference effect, when the player gets close to a specific source.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables

DistantRain (*expensive) Game specific effect, renders multiple volumetric layers at distance. Should be used in conjunction with some rain particles as a mean to decrease amount of particles required.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables
  3. Speed: Controls rain shift speed.
  4. DistanceScale: Set how far rain layers are
  5. Color: Set rain layers color multiplier

EffectBloodSplats Game specific effect, renders blood splats onscreen.

  1. Enabled: Enables / Disables node.
  2. Type: Selects type of blood splat. 0 is human, 1 is alien
  3. Amount: Controls intensity of the effect. 0 disables
  4. Spawn: Enable when wanting to spawn blood (but disable after spawning).

EffectCondensation Game specific effect, simulates condensation on screen.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables
  3. CenterAmount: Control the visibility amount of effect at the center of the screen.

EffectFrost Game specific effect, simulates frost accumulation on screen.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables
  3. CenterAmount: Control the visibility amount of effect at the center of the screen.

RainDrops Game specific effect, simulates rain drops falling on screen.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables
  3. SpawnTypeDistance: Time between another drop spawning.
  4. Size: Rain drop size.
  5. SizeVariation: Rain drop size variation.

VolumetricScattering (*expensive) Game specific effect, simulates nearby volumetric foggy environment.

  1. Enabled: Enables / Disables node.
  2. Amount: Controls intensity of the effect. 0 disables
  3. Tiling: Sets effect tile amount.
  4. Speed: Sets effect animation speed.
  5. Color: Color multiplier.
  6. Type: only one type supported at the moment.

MaterialFX nodes

To implement full screen effect to the particle effect, its flow graph has to use these nodes. Found in Add Node/MaterialFX.

HUDstartFX

Decline the start of the full screen effect to the engine.

Input Port

  1. Start: Triggered automatically by the MaterialEffects systems.

Output Ports

  1. Started: Triggered when the effect is started.
  2. Distance: Distance to player.
  3. Param1-4: Custom float parameters which can be set in the XML description of the effect.

HUDEndFX

Decline (Declare? ...) the end of the full screen effect to the engine.

  1. Trigger: Trigger this port when the effect is finished. This MUST be done to notify that the effect can be re-used again.

Implement full screen effect to the game To implement a full screen effect into the game, you have to save Flow Graph and call it in game.

  1. Make an Effect’s Flow Graph.
  2. Make a HUDstartFX and HUDendFX node.
  3. Make a Delay node ( Add Node/Time/Delay ).
  4. Set the Delay value to minimum required duration to involve whole duration of the effect Flow Graph.
  5. Connect the Started of the HUDstartFX to every starting point of every effect node, and the In port of the tweaked Delay node.
  6. Connect the Out of Delay node to the Trigger of the HUDendFX node.
  7. Save the Flow Graph in Libs/MaterialEffects/Flowgraphs .
  8. If you use full screen effect as an impact effect of the bullet or explosion, implement saved xml file’s name to /Effect/FlowGraph/name line of the appropriate effect, in Libs/MaterialEffects/FXLibs/bulletimpacts.xml . This xml authorizes the required elements of the effect, such as particle effect, sound, bullet decal.

Examples

To actually make full screen effect Flow Graph, you have to use some more general nodes. Here are some examples.

Adjust timing, animate value

This is an example Flow Graph of the impact effect of nuclear weapon.

  1. Use a HUDstartFX and a HUDendFX node, connected to a Delay node, so the effect lasts the whole duration of the Flow Graph.
  2. Use a Delay node just previous of the every effect nodes. This node is often used to adjust each node’s activation timing.
  3. Use a Float node ( Add Node/Interpol/Float ) to animate some values of Color Correction . It can set Time , StartValue and EndValue . When it gets input, it interpolates value between StartValue to EndValue in the duration of Time , and then gives output value to the next node. This is useful way to make animated values.
  4. Some nodes getting same output value from the same node. Usually, output value can connect to multiple inputs. This is the good point to decrease amount number of the nodes.

Fade in textures on screen

This is an example Flow Graph of the dirt effect on the screen, when player was near to explosion.

  1. Use a RandomSelect node ( Add Node/Logic/RandomSelect ) to randomly pick a texture from the three available.
  2. Use a ScreenFader node to fade in each texture. This node was originally designed for fade out whole screen. Using this method, you can pop up textures, and then fade them out after few seconds.
  3. Pop up texture: When gets input, ScreenFader node starts fade out whole screen and starts display texture, in duration of FadeOutTime . In this case, FadeOutTime is set to 0, so the texture pops up immediately.
  4. Delay the fade in: FadeIn is delayed 4 second by the Delay node, so texture remains on the screen for the while. 4 seconds later, whole screen starts fade in, in duration of the FadeInTime value. Then it seems texture is fading out in 3 seconds duration.
  5. Use an Any node ( Add Node/Logic/Any ), to gather the output textures and pick up the one to display.

Small Alien Setup

backtoIndex

Overview

This document will cover correct practices for setting up Alien AI for the game Crysis. In this tutorial, I have assumed basic skills with flowgraph and basic knowledge of editor functionality, such as how to place objects and create area shapes.

Index

Troopers

Types of trooper

Place troopers in the usual way from the Archetype Library.

Trooper_MOAC
A trooper that fires ice shards.
Trooper_MOAC_hangar
A Trooper_MOAC with some behavioral tweaks for internal situations
Trooper_MOAR
A trooper that fires an ice beam.
Trooper_MOAR_hangar
A Trooper_MOAR with some behavioral tweaks for internal situations
Trooper_Sphere_CarChase
Not used
Trooper unresponsive
Used for situations where the trooper should not react to the player (for example cutscenes).

Smart Object Types

TrooperDoorway01
Allows the trooper to enter a doorway
TrooperDoubleBounceLeft
Allows the trooper to bounce between two walls
TrooperHangOnCeiling
Allows the trooper to hang on to the ceiling.
TrooperHangOnCeiling5
Allows the trooper to hang on to the ceiling at 5m.
TrooperHut3m
Allows the trooper to jump from the ground to a 3m high platform. The platform must have an associated nav area setup.
TrooperHut5m
Allows the trooper to jump from the ground to a 5m high platform. The platform must have an associated nav area setup.
TrooperJump12mLong
Allows the trooper to jump a gap of 12m.
TrooperJump6mLong
Allows the trooper to jump a gap of 6m.
TrooperJumpOff
Allows the trooper to jump off cliffs.
TrooperJumpOff10m
Allows the trooper to jump off cliffs away from the edge.
TrooperJumpOff2m
Allows the trooper to jump off cliffs close to the edge.
TrooperNavSingleBounceWall
Allows the trooper to bounce off a wall. Used for navigation only.
TrooperSingleBounceWall
Allows the trooper to bounce off a single wall. The trooper can stop and fire along the wall while on the wall, so make sure you point the smart object in an appropriate direction
TrooperSmallRock1
_5m Allows the trooper to jump and hang on to a flat horizontal surface and behave like a turret, firing continuous, precise streams of ice shards at the enemy.
TrooperVaultLTV
Allows the trooper to vault over an LTV
TrooperVaultOverFenceHigh
Allows the trooper to vault over a high fence.
TrooperVaultOverFenceHighLong
Allows the trooper to vault over a high fence. Start and end point are further from the fence.
TrooperVaultOverFenceLow
Allows the trooper to vault over a low fence.
TrooperVaultOverFenceLowLong
Allows the trooper to vault over a low fence. Start and end point are further from the fence.
TrooperDoorway5m
Not used
TrooperHut1_5m – not used
Not used

Correct Smart Object Setup

Navigation smart objects are used to get from one place to another. These have entry/exit points. For navigation smart objects to function correctly, they need to be set up correctly. A red link on a navigation smart object means it will not function correctly.


Correct


Wrong

All circular points on the smart object should remain clear of obstruction.

Any objects used for alignment should remain flat to a visual surface, adjacent to the circular points. The above is for a “bounce off walls” smart object – the guide object is flat to the wall, while the guide spots remain clear.

For example, a door smart object should remain aligned to the doorframe.

Jump spot smart objects

This is NOT a navigation smart object. The trooper can access this point from anywhere close, by jumping to it.

Smart objects with box alignment spots should be aligned so their most important face is aligned to the appropriate visuals.

For example, the below is a trooper jump point. The trooper will land on top of the smart object, and therefore the top of the object should be aligned to the solid upper face of the target visual object.

Notes:

If multiple jump spots exist on the same surface, the trooper will select the closest one, and ignore the others. That means, if you surround one jump spot on all sides with others, the first will never be used.

Consider using multiple height layers when setting up an area for troopers, and prevent their firing lines overlapping.

Also worthy of noting. This smart object has no entry and exit point, so it will not be used for navigation, only as an attack point. * *

Bounce off walls smart objects

The bounce on wall smart object can also be used by a trooper as a spot to land and fire at the player. So, when placing these, consider that the trooper will be faced in a certain direction, and therefore aim the trooper in a direction dangerous to the player.

Jump to ceiling smart object

Jump to ceiling smart objects should be aligned as shown. The entry spot is aligned to the floor, and the hanging spot aligned to the ceiling.

Vault LTV smart object

The same applies for objects with a more complex boundary on an object. The below shows a “vault over LTV” smart object. It should be aligned to the important faces of the target object. For ease of use in this case, the smart object can be aligned directly to the Crysis LTV and rotated into position.


Nav area setup

Nav area setup for troopers is pretty much the same as human AI setup in nav areas. However, they don’t use AI point hide points, they can go on roofs, and they can enter/exit nav areas using smart objects.

As normal, carefully place a nav area with a height on your desired area, as shown above. The settings should something like as below.

Next, place some normal Human Waypoint AI points on the area, and regenerate links.

Now, correctly place down some appropriate entry/exit smart objects – in the overview picture previously, we use TrooperHut3m smart objects.

Scouts

Types of scout

Scout_MOAC
A scout that fires ice shards.
Scout_MOAC_Ascension
A scout that fires ice shards. Used in VTOL based levels.
Scout_MOAC_High_Health
A scout that fires ice shards. Increased health in the archetype
Scout_MOAC_Warrior
A scout that fires ice shards. Used in the endgame Warrior fight.
Scout_MOAR
A scout that fires an ice beam.
Scout_MOAR_Invul_to_AI
A scout that fires an ice beam and is invulnerable to other AI fire.
Scout_Unresponsive
A scout that does not repond to external influences.
Scout_Unresponsive_MOAC
A scout that fires ice shards. Does not repond to external influences.
Scout_Unresponsive_SO
...?

Flight navigation setup

Firstly, place an AINavigationModifier in your level, around the area in which you want your scouts to fly.

Next, set up the area correctly, using the parameters below.

Next, regenerate the flight navigation in your level, and your scouts should be able to fly around.

Grabbing, moving and dropping troopers

A scout can carry up to 4 troopers at a time. These troopers and their scout must be placed in the level as preparation.

Firstly, the scout needs to be setup so it doesn’t get distracted while it is grabbing the troopers. Use the below node.

Next, the scout needs to grab the troopers. The scout must grab troopers one at a time. Therefore, link the succeed outport of the node to the Sync input of the next AIGrabObject node, so they are triggered sequentially. A single grab flownode setup should be as below – the scout assigned to the grab node and the trooper EntityId fed into the objectId port.

Note: The scout grabbing troopers should be done out of visible range of the player.

After the scout has the troopers, you need to send it along a path. So, first, you need to create a path. Use the AIpath object, found in the rollup bar/AI. Make sure your path is in the air, and its route nice and clear.

Next, assign the scout and path to an AIFollowPathSpeedStance node, and trigger it once the last trooper has been picked up.

Next, we need to drop the troopers. Create a ProximityTrigger, and place it across your path where you want the scout to start to let go.

Set up your trigger to activate when the scout enters, by assigning it in the “OnlySelectedEntity” field.

Now, you need to use this trigger to activate the following flowgraph. It will make the scout drop all objects, scream and revert to normal behavior.

Hunter

Nav area setup

Firstly, place down a nav area around where you want your hunter to walk.

Next, set up the area as below.

Important flow-nodes

Below are some important flownodes for the hunter.


To make the hunter walk to a point, assign this node, with the destination tagpoint fed into the objectId port.


The hunter will grab the specified objectId with his leg upon triggering this node


Makes the hunter perform his scream move


Makes the hunter perform a sweep action across the floor in front of him with his ice beam.


Causes the hunter to grab the specified object with his mouth tendrils


Commands the hunter to fire for 5 seconds at the specified target.


Commands the hunter to enter the regeneration state


Working with Prefabs

backtoIndex

Overview

Prefabs are groups of objects which can be placed in your level as instances. An instance is an object which is an exact copy of every other object of the same type. When you edit one instance of an object, every other instance that exists in your game will change, either instantly or when the instance is reloaded.

Index

What are prefabs

A prefab is a predefined group of objects. Every time you place down a prefab, each instance is precisely the same in every way. Altering a prefab will make it change everywhere it has been placed. Any alterations need to be saved to the prefab library to ensure they are correctly propagated across your entire game.

An example of a prefab

The Prefabs Library

Open up the Database View by going to the main menu View > Open View Pane > Database View
Now, enter the Prefabs Library by left clicking its tab at the top of the window.

Creating a new Library

To create a new library, click the Add Library button…

…and type in a new library name.

Make sure you click the Save Library, once you’re done.

Loading a prefab library

Next, lets load up an existing prefab library. Go to the Load Library button.

Now, select a library, and press the open button. For the purposes of this tutorial, load buildings.xml

Now, you can go into the prefabs library and find Village_House_1. Left click, drag and drop the prefab into your level.

Creating a new prefab

Firstly, place the objects in your level that you wish to change into a prefab. Select all the objects you require

Next, go up to the Prefabs menu, and select Make From Selection

Now, fill in a Group and Name for your new prefab. The prefab will be created in your currently selected library.

Now your prefab has been created and is ready to use in your level.

Prefab Object Properties

Prefab Params

Merge Static Geometry
Not used

Prefab Parameters

Prefab Name
The name of the prefab, taken from the prefab library.
Object list
A list of all objects within the prefab, alongside their object type.
Subobject info
For the current object selected within the prefab:
Name: The name of the subobject
Class: The main of the subobject (The main class type - for example, entity, brush, ambient volume, light)
Type: The type of the subobject (The sub type - for example, destroyable object, constraint, AI grunt)
Update Prefab
Updates the selected prefab manually with any current edits.
Reload Prefab
Reloads the current prefab from the last saved version in the prefab library.
Pick and Attach
Allows you to add an new object to the selected prefab, by clicking on it.
Remove Object
Allows you to remove an object from the selected prefab. Select the object from the Objects List, then click the Remove Object button.
Extract Object
Extracts a clone of a single object from the prefab without altering or removing anything from the prefab object itself.
Extract All
Extracts all objects from the prefab without altering the prefab library.
Open
Opens the prefab group, allowing you to edit and manipulate objects within it.
Close
Closes the prefab, so internal objects cannot be individually edited


Demo Recording

backtoIndex

Time Demo Recording: Camera recording

This records player input / camera movement and plays it back. Some player actions such as vehicle movement are not supported.

You need to start and record in game mode (editor or pure game) after the level was already loaded. After each playback you get log printout like this (to console and also the file timedemo.log in the level directory for the level used):

TimeDemo Run 131 Finished. Play Time: 3.96s, Average FPS: 50.48 Min FPS: 0.63 at frame 117,
Max FPS: 69.84 at frame 189 Average Tri/Sec: 14037316, Tri/Frame: 278071 Recorded/Played Tris ratio: 0.99

Start Recording

Keybinding:
Ctrl + PrintScreen:
In the console:
record
or alternatively you can set the fixed timestep first and then record as follows:
demo_fixed_timestep 60 record

End Recording

Keybinding:
Ctrl + Break:
In the console:
stoprecording

Start Playback

Keybinding:
Shift + PrintScreen:
In the console:
demo

Stop Playback

Keybinding:
Ctrl + Break:
In the console:
stopdemo

related console variables

demo_ai
Enable/Disable AI during the demo
demo_savestats
Save level stats at the end of the loop
demo_max_frames
Max number of frames to save
demo_screenshot_frame
Make screenshot on specified frame during demo playback, If Negative then do screen shoot every N frame
demo_quit
Quit game after demo runs finished
demo_noinfo
Disable info display during demo playback
demo_scroll_pause
ScrollLock pauses demo play/record
demo_num_runs
Number of times to loop timedemo
demo_profile
Enable profiling
demo_file
Time Demo Filename

An alternative method: Demo recording using the network system

Note: This method is currently in an unknown state. It is not used for autotest and benchmarking.
The demo recorder serializes all game events like a network server and writes them to a specified output file.

Start Recording:

To start recording you load a map as usual but add "r" or "record" followed by the output file name in the command line:

example: map levelname r output.rec

All ingame actions and events, including your own player character, are recorded. The recorder is planned to work in singeplayer and multiplayer game modes.
To stop recording just quit the game.

Playback:

To play a recorded file use the "play" command followed by the file name:
play output.rec


Capturing Video and Audio

backtoIndex

Overview

This tutorial explains how to set up the editor (or game) to capture the video as single frames and audio (in stereo or 5.1 surround sound) in a wav file. This material can later be stitched together with any video editing software.

Preparations

The process of capturing video footage requires several commands to be typed into the console, in order to start both media streams. To speed up the process you can create configuration files that will execute all necessary commands at once. This way, you can start and stop the process quite quickly, however, there are some limitations you should be aware of.

To start the recording you need to set up a few things.

Video settings

Frame size

The height and width of the captured frames in the editor is exactly the size of your perspective window. You can easily resize the view size by rescaling the docked windows (like the rollup bar or the console). The size of the frame is displayed in the upper right corner of the perspective window. In the actual game you can change the resolution of the captured frames by changing the resolution in the options menu, or using the commands r_height and r_width.

We need to set two variables:

r_height N

r_width M

N stands for the frame height and M for the frame width in pixels. The game will automatically switch to the next possible size if the size entered is not available.

Frames per second

The captured frames are all full frames, also called progressive frames.

Define the amount of frames per second you need. A NTSC standard video is approximately 30 frames per seconds, which is a good compromise between quality and file size. A high quality video can have up to 60 frames per second – the difference in quality of higher values is barely noticeable, but will still take up a lot of file space. Motion will not look smooth with less than 24 fps (cinema standard).

Fixed_time_step

To force a fixed frame rate of a certain speed use the command Fixed_time_step N

Where N specifies time step, which is calculated as follows:

time step = 1 second / amount of frames

Example: 1 second / 30 frames = 0.033333333

0.0166666667 would be 60 frames per second. If you want to record a standard PAL speed video (25 fps), use a value of 0.04.

File format selection

The captured pictures can be of in several different file formats. A good choice for average quality is jpeg format, whereas tga or bmp are better for higher quality, and HDR for pictures in high dynamic range quality.

Capture_file_format

Use the console command

Capture_file_format N

Where N should be replaced with either jpg, bmp, tga or hdr.

File location

The recorded frames will be stored either in the default folder called “CaptureOutput” located in the root folder, or within a custom folder, defined using the following command: Capture_folder N

Where N should be replaced with the name of your folder (e.g. scene12_take1 )

Be aware that when you start a recording, the captured frames will be placed in the currently defined folder, overwriting any existing files with the same name!
For each new recording you should either create a new folder or move the existing files to another folder to avoid losing any work.

Starting and ending the recording

When everything is setup you can start the recording with the command

  Capture_frames N

Set N to 1 to start recording, and 0 to stop.

Audio settings

First of all, decide if you need the audio in stereo or 5.1 surround. You will need to change your audio settings in the Windows control panel. Go to “Sounds and Audio Devices” select the Volume tab, click the button “Advanced” and select your choice of output device.

Deactivating the sound system

After loading your level, you will need to deactivate the sound system before you can redirect the sound output to a file. To deactivate it use the command #Sound.DeactivateAudioDevice()

Now, the sound output will be redirected to root folder and saved as a wav file. The sound will not be running in realtime but linked precisely to the set time step. You won’t hear anything after activating the sound again, as long as you record it.

To write the sound use the command

s_OutputConfig N

N should be set to 3 to activate the non-realtime writing of the wav file or 0 to switch it back to the default setting (autodetection). The other settings of this command are not relevant and will be explained in another tutorial.

Reactivating the sound system

To reset the sound system use the following command

#Sound.ActivateAudioDevice()

Now a wav file will be created in the root folder of the game. The file will continue recording until the writing is deactivated with the following combination of commands:

#Sound.DeactivateAudioDevice()

s_OutputConfig 0

#Sound.ActivateAudioDevice()

Note: Although the whole sound system is reset using the above commands, some sounds won’t restart until they are correctly triggered again. This especially applies for looped sounds. To get the correct sounds to play, it is recommended to start the recording of video and sound first, and then enter any area that triggers your looped sounds for your recording.

Creating configuration files

To capture several recordings with the same setting, it may be convenient to set up a configuration file containing the parameters required for recording, to ensure all captured files are of the same format.

A setting config file could look like this:

sys_spec = 4

Fixed_time_step 0.0333333333

Capture_file_format jpg

Capture_folder myrecording

r_width 1280 r_height 800

The command sys_spec = 4 sets the game graphic settings to very high to get the bet look possible.

To speed up the process to start and stop the recording it’s convenient to create two configuration files, one to start and one to stop the video.

To start recording, you need a config file that looks something like this:

#Sound.DeactivateAudioDevice()

s_OutputConfig 3

#Sound.ActivateAudioDevice()

Capture_frames 1

To stop recording, you need a config file that looks something like this:

Capture_frames 0

#Sound.DeactivateAudioDevice()

s_OutputConfig 0

#Sound.ActivateAudioDevice()

Executing the config files

To activate the config file open the console and type

Exec N 

while N is the name of the config file.


Reference Section

backtoIndex


Boids

backtoREF-Index

What are the Boid Entities?

The Boid entities simulate living animal objects that can have group behaviours and obstacle avoidance. Their complex behaviour arises from the interaction of individual agents (Boid) with other agents and environment that they are moving in. The below image shows the different boid systems:

Boid Entity Properties

Count:
The Count number specifies how many individual objects will be spawned
Gravity at death:
Gravity acceleration that affects the body of the killed boid
Mass:
Mass of each individual boid
Model:
Geometry for the boid, can be a character (.CHR) or static geometry (.CGF)
Size:
Scales the size of the boid
SizeRandom
Random variation on the size of the boid, as multiplication of the*Size* parameter
AttractDistMax
Maximal distance at which one boid can see’s another boid. Boids that are too far away will not be interacted with.
AttractDistMin
Minimal distance that boids are comfortable to stay close to each other before the separation force is starting to affect them
EnableFlocking:
When enabled the rules of the emergent flocking behaviour will be calculated on the whole flock of boids
Factor Align:
Steer towards the average heading of local flockmates
Factor Cohesion:
Steer to move toward the average position of local flockmates
Factor Separation:
Steer to avoid crowding local flockmates, only when closer then*AttractDistMin*
Field of View Angle:
Field of vision of the boid to consider other boids as flockmates
Factor Avoid Land:
Force coefficient to divert boid from the land or water
Factor Height:
Controls the force that is applied to keep boids at the original height for the flock
Factor Origin:
Controls the force that attract boids to the origin point of the flock
Height Max:
Maximal height boids can fly to (Height above land)
Height Min:
Minimal height boid can fly at (Height above land)
Speed Max:
Maximal speed that boid can move with
Speed Min:
Minimal speed that boid can move with
Options/Activate:
When checked active boids are visible and move from the level start, alternatively boids can be activated at later stage with the activate event
Options/FollowPlayer:
When checked boids will only wrap around current player position, flock origin point becomes the player position. If boid fly`s too far away from the player, they will reappear at the opposite side.
Options/NoLanding:
Turns landing for birds flocks on/off
Options/ObstacleAvoidance:
Boids will sense the physical environment and be diverted from the physical obstacled. This option adds more heavier physical checks on the boids and should be used carefully only when really needed.
Options/Radius:
Maximual radius boid can move from the flock origin point
Options/VisibilityDist:
Maximal distance from which whole flock can be visible. If player camera is farer away from flock origin boids will not be simulated and rendered. Other Boid Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Doors

backtoREF-Index

What are the Door Entities?

The door entities are used for different types of doors. The door entities can be found in Rollup Bar > Entity > Doors

Advanced Door


Locked
Is the door locked or not
DestroyedSubObject:
Will the sub object part of the door remain
Health
Defines the health of the door
Mass
Defines the mass of the door
Model
Specifies the model of the door
ModelDestroyed
Specifies the model of the door once it is destroyed
ModelSubObject
Specifies the model of the sub-object of the door
SmartObjectClass
Specifies a smart object class for the door
UsePortal
Specifies if the door uses portals or not
Breakage
...
ExplodeImpulse
Specifies the push back of the explosion should the door explode
LifeTime
Specifies the lifetime of the object after it has been destroyed
SurfaceEffects
Specifies if surface effects will be used when the object is destroyed
Destruction
...
Damage
Specifies how much damage the object does when it explodes
Decal
Specifies the decal to use when the object is destroyed
Effect
Specifies an destruction effect
EffectScale
Specifies the scale of the effect
Explode
Creates an explosion effect that can kill people
Pressure
How much pressure does the object pleace on surrounding objects when it is destroyed
Radius
Specifies the radius of the explosion
Direction
Specifies the direction of the explosion in x/y/z
Limits
...
AutoCloseTime
Specifies how long the door will take to close
Damping
Specifies the damping on the door when it closes (how much it slows down when moving)
InitialAngle
Specifies the angle at which the door is initially set up
IsBreachable
Specifies if the door can be breached
MaxBend
Specifies how far the maximum that the door will bend
MaxForce
Specifies how much force can be applied
OpenFromBack
Specifies if the door opens from the back
OpenFromFront
Specifies if the door opens from the front
OpeningRange
Specifies how far the door opens
Speed
Specifies how fast the door opens
UseDistance
Specifies how far away the door can be used from
Sound
...
CloseSound
Specifies the sound used when the door is closed
LockedSound
Specifies the sound used when the door is locked
OpenSound
Specifies the sound used when the door is opened
Vulnerability
Bullet
Do bullets affect the door
Collision
Does the door have collision
DamageTreshold
Specifies the damage required to open the door
Explosion
Specifies if an explosion is to be used when the door is damaged
Melee
Specifies if the door can be meleed open
Other
Specifies if other damage can open the door

Anim Door

Activate Portal
Specifies if the door activates a portal
Locked
Specifies if the door is locked
Model
Specifies which model the door will use
NoFriendlyFire
Specifies if friendly fire affects the door
SmartObjectClass
Specifies the smart object class of the object
UseDistance
Specifies how far away the door can be used from
Animation
...
Anim_close
Specifies the animation to use when the door is closed
Anim_open
Specifies the animation to use when the door is opened
Physics
...
Density
Specifies the density of the door
Mass
Specifies the mass of the door
Physicalize
Specifies if the door is physicalised
PushableByPlayers
Specifies if the door can be pushed by players or not
RigidBody
Specifies if the door should use rigid body physics
Sounds
...
Close
Specifies the close sound
Open
Specifies the open sound

Door

Activate Portal
Specifies if the door activates a portal
Locked
Specifies if the door is locked
Model
Specifies which model the door will use
SmartObjectClass
Specifies the smart object class of the object
SquashPlayer
Specifies if the door can squash and damage/kill the player
UseDistance
Specifies how far away the door can be used from
Rotation
Acceleration
Specifies how fast the door will accelerate
Axis
Specifies about which axis the door will rotate
FrontAxis
Specifies the front axis of the door
Range
Specifies how far the door will rotate
RelativeToUser
Specifies if the door rotates in relation to the user
Speed
Specifies the rotation speed of the door
StopTime
Specifies how long the door takes to stop
Slide
Acceleration
Specifies how much the door accelerates when its sliding
Axis
Specifies the axis in which the door slides
Range
Specifies how far the door will slide
Speed
Specifies how fast the door slides
StopTime
Specifies how long the door takes to stop
Sounds
Range
Specifies how far the sound of the door can be heard from
Sound on Move
Specifies the sound to use when the door moves
Sound on Stop
Specifies the sound to use when the door stops
Sound on StopClosed
Specifies the sound to use when the door stops closed
Volume
Specifies the volume of the sound used

Other Door Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Elevator

backtoREF-Index

What is the elevator entity?

The elevator entity simulates a moving platform; the switch is used to control the elevator object The elevator entity can be found in Rollup Bar under Entity

Benefits

By using the elevator entity you can define an object as an elevator to give the player access to different floors within a building.

Entity Properties

Elevator

Automatic:
Turns the automatic function on/off
Destination Floor:
Specifies the destination floor
FloorCount:
Specifies the number of floors
FloorHeight:
Specifies the distance between floors
InitialFloor:
Specifies the floor to start on
Model:
Specifies the model to use
SmartObjectClass:
Specifies the smart object class of the object
Acceleration:
Specifies how fast the elevator accelerates
Axis:
Specifies the axis of the elevator to move
Speed:
Specifies the speed to move
StopTIme:
Specifies how long the lift takes to stop

Switch

Delay:
Specifies how long before the lift starts
Floor:
Specifies the floor
Model:
Specifies the model to use
SmartObjectClass:
Specifies the smart object class of the object
szUseMessage:
Specifies the message to show when used
SoundOnPress:
Specifies the sound to use when the object is pressed. Other Elevator Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Environment

backtoREF-Index

What are the Environment Entities?

The Environment Entities are used to create environmental effect such as tornados or earthquake effects within the level. The Environment Entities can be found in Rollup Bar under Entity

Entity Properties

Tornado

AttractionImpulse:
Specifies the attraction impulse.
CloudHeight:
Specifies the height of the cloud above the tornado
FunnelEffect:
Here a particle effect can be specified.
Radius:
The influence radius of the tornado.
SpinImpulse:
Specifies he spin speed that effects objects that are close to the tornado
UpImpulse:
Specifies the pushing up speed that effects objects that are close to the tornado
WanderSpeed:
The tornadoes moving speed can be specified here.

Shake

Radius:
Specifies the radius around the entity in which the shake effect should happen
Shake:
Specifies the amount of shaking Other Environment Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Items

backtoREF-Index

What are the item entities?

The item entities are weapon and equipment objects that the player or enemy can pickup and use. They are based on game scripts and in order to add more items, you need to write new scripts.

NOTE: The pictures below do only illustrate the default scripts in Crysis. Your list might look different, depending on your script changes.

The item entities can be found in RollupBar > Entity

Entity Properties

Item

HitPoints:
Specifies the hitpoints of the object
InitialSetup:
Specifies initial setup perameters
Mounted:
Specifies if a gun is mounted
Physics:
Specifies if physics is applied to the object
Pickable:
Specifies if the object can be picked up
SmartObjectClass:
Specifies the smart object type of the object
Useable:
Specifies if the object is usable
Respawn:
Specifies if the object will respawn once destroyed
Timer:
Specifies the time the object takes to respawn
Unique:
Specifies if the object is unique Other Item Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Ladders

backtoREF-Index

Overview

The ladder entity can be used to define an object as a ladder, the player can climb up and down. The collision is based on the bounding box of the object.

Ladder Properties

Entity Properties*DirectionAxis:
Specifies the direction of the ladder
Entity Properties*Model:
Specifies the model of the ladder
SmartObjectClass:
Specifies the smart object type of the object
UseDistance:
Specifies the distance at which the ladder can be used from Other Ladder Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Lights

backtoREF-Index

What are the light entities?

The light entities are dynamic real-time lights that can be used to light your scene. By using dynamic lights the level look much better than with the default ambient lighting. For indoor areas it is essential to place proper lighting as the sun light will not lit the interiors well.

NOTE: Due to the increased calculation time for dynamic lights, you need to carefully place them in your scene.

sandhesten:
As far as I know this is roughly how it works: CryEngine2 uses multiple passes for rendering. Every time you add a light, additional passes have to be rendered. This impacts performance. Other engines are more happy about high numbers of lights in a scene, but obviously have to do other trade-offs. This is just the lighting solution that suited Crysis best.

As a rule of thumb no more than 4 lights (including the sun) should be visible at any time. You can place more, yes, but performance will start to really suffer. Always use the Light entity, the others are legacy.

Try flying through the Crysis levels with r_displayinfo 1 and check the number of dynamic lights visible in different scenes. Also check how we work with the ViewDistRatio property to optimize scenes with multiple lights.

The lights entities can be found in Rollup Bar > Entity

IndirectLight

Entity Properties

Active:
Turns the entity on/off
Radius
Specifies how far from the source the light affects the surrounding
Color
Diffuse
The diffuse color of the light can be specified here
DiffuseMultiplier
To make the light brighter this diffuse multiplier can be used
HDRDynamic
Specifies how much brighter than the default 256,256,256 white the light is. (sunlight set in the time of day window is for example 3 times brighter)
Specular
Specifies the specular color
SpecularMultiplier
multiplies the specular color brighter, use to adjust brightness
Options
AffectThisAreaOnly
Set this parameter to false to make lights other visarea
CastShadow
Makes the light cast a shadow
FakeLight
Only uses corona effects but does not dynamically light the surroundings
RenderGeometry
Specifies an emitter object
UsedInRealTime
Specifies if the light is a realtime light or not
Projector
ProjectInAllDirs
Makes the light an omni light
ProjectorFov
Specifies the Angle on which the light texture is projected
Texture
Here a black and white texture can be specified that will be projected in the direction of the y axis of the light entity
RAM
IndirectColor
IndirectMulitplier
Style
CoronaDistIntensityFactor
Specifies how bright the corona effect is in the distance.
CoronaDistFactor
Specifies how big the corona effect is in the distance
CoronaScale
Specifies how big the corona effect is
LightStyle
Specifies the frequency at which the light is blinking

Light

Entity Properties

Active:
Turns the entity on/off
Radius
Specifies how far from the source the light affects the surrounding
Color
Diffuse
The diffuse color of the light can be specified here
DiffuseMultiplier
To make the light brighter this diffuse multiplier can be used
HDRDynamic
Specifies how much brighter than the default 256,256,256 white the light is. (sunlight set in the time of day window is for example 3 times brighter)
Specular
Specifies the specular color
SpecularMultiplier
multiplies the specular color brighter, use to adjust brightness
Options
AffectThisAreaOnly
Set this parameter to false to make lights other visarea
CastShadow
Makes the light cast a shadow
FakeLight
Only uses corona effects but does not dynamically light the surroundings
RenderGeometry
Specifies an emitter object
UsedInRealTime
Specifies if the light is a realtime light or not
Projector
ProjectInAllDirs
Makes the light an omni light
ProjectorFov
Specifies the Angle on which the light texture is projected
Texture
Here a black and white texture can be specified that will be projected in the direction of the y axis of the light entity
Style
CoronaDistIntensityFactor
Specifies how bright the corona effect is in the distance.
CoronaDistFactor
Specifies how big the corona effect is in the distance
CoronaScale
Specifies how big the corona effect is
LightStyle
Specifies the frequency at which the light is blinking

SimpleIndirectLight

Entity Properties

Active:
Turns the entity on/off
Radius
Specifies how far from the source the light affects the surrounding
Color
Color
The diffuse color of the light can be specified here
ColorMultiplier
To make the light brighter this diffuse multiplier can be used
HDRDynamic
Specifies how much brighter than the default 256,256,256 white the light is. (sunlight set in the time of day window is for example 3 times brighter)
SpecularPercentage
multiplies the specular color brighter, use to adjust brightness
Options
AffectThisAreaOnly
Set this parameter to false to make lights other visarea
CastShadow
Makes the light cast a shadow
Projector
ProjectInAllDirs
Makes the light an omni light
ProjectorFov
Specifies the Angle on which the light texture is projected
Texture
Here a black and white texture can be specified that will be projected in the direction of the y axis of the light entity
RAM
AffectSurroundingVISareas
Makes the light affect nearby visareas
IndirectMultiplier
Makes the light brighter or darker (0.5 means half as bright)
LightFallOff
Specifies how much the light intensity falls off the further it is away from the source
Radius
Sets how far away from the entity the light affects the surrounding
ReflectionStrength
Specifies how much the light bounces. Used to make areas brighter that are indirect light
ShadowSize
Specifies the quality of the shadow map
Style
CoronaDistIntensityFactor
Specifies how bright the corona effect is in the distance.
CoronaDistFactor
Specifies how big the corona effect is in the distance
CoronaScale
Specifies how big the corona effect is
LightStyle
Specifies the frequency at which the light is blinking

SimpleLight

Entity Properties

Active:
Turns the entity on/off
Radius
Specifies the radius (in meters) in which the light affects the surrounding
Color
Color
The diffuse color of the light can be specified here
ColorMultiplier
To make the light brighter this diffuse multiplier can be used
HDRDynamic
Specifies how much brighter than the default 256,256,256 white the light is. (sunlight set in the time of day window is for example 3 times brighter)
SpecularPercentage
multiplies the specular color brighter, use to adjust brightness
Options
AffectThisAreaOnly
Set this parameter to false to make lights other visarea
CastShadow
Makes the light cast a shadow
Projector
ProjectInAllDirs
Makes the light an omni light
ProjectorFov
Specifies the Angle on which the light texture is projected
Texture
Here a black and white texture can be specified that will be projected in the direction of the y axis of the light entity
Style
CoronaDistIntensityFactor
Specifies how bright the corona effect is in the distance.
CoronaDistFactor
Specifies how big the corona effect is in the distance
CoronaScale
Specifies how big the corona effect is
LightStyle
Specifies the frequency at which the light is blinking

Other Light Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Multiplayer

backtoREF-Index

What are the multiplayer entities?

The multi player entities are used to setup the game rules within a multi player level.

The multiplayer entities can be found in the Rollup Bar.

Benefits

The multiplayer entities such as HQ, BuyZone and Factory are essential for Powerstruggle game mode as they define the key gameplay areas.

Alien Energy Point

Capturable:
Specifies if the Energy Point can be captured or not.
CaptureAreaId:
Specifies the ID of the Areahape in which the player can capture the Energy Point.
CaptureIndex:
Defines the prestige awarded for capturing. 1 100, 2 and 3 250.
CaptureRequirement:
Specifies the number of players needed to capture.
CaptureTime:
Specifies the time in seconds to capture.
GeneratePower:
Specifies if the Energy Point generates power for the prototype factory or not.
Model:
Specifies the model, used for the Energy Site.
PowerIndex:
Specifies the rate at which energy is accumulated from the energy point. Values are 1,2 or 3 where 3 is the fastest generation rate and 1 is the slowest.
StatusSubMtlId:
Defines the sub material ID used to identify status of the points ownership.
teamName:
Specifies to which team the Energy Point belongs on game start (Team US black, Team NK tan, neutral = leave field free)

Buy Zone

BuyAreaId:
Specifies the ID of the Areashape in which the player can buy.
Enabled:
Specifies if the buyzone is enabled or not.
TeamName:
Specifies to which team the Buyzone belongs (Team US black, Team NK tan, neutral = leave field free)
buyOptions/Ammo:
Specifies if Ammo can be bought in this buyzone.
buyOptions/Equipment:
Specifies if Equipment can be bought in this buyzone.
buyOptions/Prototypes:
Specifies if Prototypes can be bought in this buyzone.
buyOptions/Vehicles:
Specifies if Vehicles can be bought in this buyzone.
buyOptions/Weapons:
Specifies if Weapons can be bought in this buyzone.

Factory


BasePowerLevel:
Not used
BuyAreaId:
Specifies the ID of the Areashape in which the player can buy.
Capturable:
Specifies if the factory is capturable or not.
CaptureAreaId:
Specifies the ID of the Areashape in which the player can capture the factory
CaptureIndex:
Defines the prestige awarded for capturing. 1 100, 2 and 3 250.
CaptureRequirement:
Specifies the number of players needed to capture the factory
CaptureTime:
Specifies the time needed to capture the factory.
GeneratePower:
Specifies if the factory generates power for the prototype factory or not.
Model:
Specifies the model used for the factory.
PowerIndex:
Not used
PowerStorage:
Not used
QueueSize:
Specifies the number of vehicles which can be stored while the garage is already in use.
ServiceAreaId:
Specifies the ID of the Areashape in which the player can buy ammo for his vehicle.
StatusSubMtlId:
Defines the sub material ID used to identify status of the points ownership.
szName:
Identifies the factory type. For example, war warfactory, prototype prototype factory.
teamName:
Specifies to which team the Factory belongs on game start (Team US black, Team NK tan, neutral = leave field free)
Vehicles:
Specifies the types of vehicles which can be bought in the factory.
buyOptions/Ammo:
Specifies if Ammo can be bought in this factory.
buyOptions/Equipment:
Specifies if Equipment can be bought in this factory.
buyOptions/Prototypes:
Specifies if Prototypes can be bought in this factory.
buyOptions/Vehicles:
Specifies if Vehicles can be bought in this factory.
buyOptions/Weapons:
Specifies if Weapons can be bought in this factory
Slot/AreaId:
Specifies the ID of the Areashape in which the player dies when the garage of this slot closes and a vehicle is produced.
Slot/CloseAnimation:
Specifies the path to the animation when the garage door closes.
Slot/Enabled:
Specifies if this slot of the garage is used or not.
Slot/OpenAnimation:
Specifies the path to the animation when the garage door opens.
Slot/SpawnHelperName:
Specifies the name of the spawnhelper where the vehicles spawn.
Slot/VehicleAreaId:
Specifies the ID of the Areashape wherethe factory checks if a garage is still in use. If a vehicle is inside this area, the garage won’t produce another vehicle until it’s free.
Sounds/Busy:
Specifies the path to the sound when a vehicle is in production.
Sounds/Idle:
Specifies the path to the sound when the factory is not producing anything.
Sounds/SlotClose:
Specifies the path to the sound when a garage closes.
Sounds/SlotOpen:
Specifies the path to the sound when a garage opens
Sounds/SlotReady:
Specifies the path to the sound when a vehicle production is done.
Sounds/SlotStart:
Specifies the path to the sound when a vehicle production starts.

Flag

Animationtemplate:
Specifies*???*
Model:
Specifies the model, used for this flag.
teamName:
Specifies to which team the Flag belongs (Team US black, Team NK tan, neutral = leave field free)

Forbidden Area

DamagePerSecond:
Specifies the amount of damage per second taken by the player when he is inside the forbidden area.
Delay:
Specifies the delay in seconds until the player takes damage inside the forbidden area.
Enabled:
Specifies if the forbidden area is enabled or not.
Reversed:
Specifies if the player takes damage inside or outside of the area (inside reversed false, outside reversed true).
ShowWarning:
Specifies if a warning message is displayed on the HUD when a player enters a forbidden area. (If a delay is set, there will be also a countdown in this message)
teamName:
Specifies to which team the ForbiddenArea belongs (Team US black, Team NK tan, neutral = leave field free) The opposite team will take damage when a teamname is set. If no teamname is set, every player will take damage.

HQ

DestroyedModel:
Specifies the model which is used when the HQ is destroyed.
Hitpoints:
Specifies the amount of damage the HQ can take before it’s destroyed. (Only TAC projectiles can damage the HQ)
hqType:
Specifies the type of the HQ shown in the tutorial mode. Following types are supported: bunker, submarine, carrier.
Model:
Specifies the model used for the not destroyed headquarter.
PerimeterAreaId:
Can be used to define the area ID of the shape which detects when an enemy is within range of the HQ.
teamName:
Specifies to which team the HQ belongs (Team US black, Team NK tan)
Explosion/Effect:
Defines the effect used when the HQ is destroyed
Explosion/EffectScale:
Defines the effect scale when the HQ is destroyed
Explosion/EffectDirection:
Defines the effect direction when the HQ is destroyed

Objective

this entity is not used

Perimeter

this entity is not used

Spawn Group

AdditionalEquipmentPack:
Specifies the equipment a player gets when he spawn in this Spawn Group.
BuyAreaId:
Specifies the ID of the Areashape in which the player can buy.
Capturable:
Specifies if the Spawn Group is capturable or not.
CaptureAreaId:
Specifies the ID of the Areashape where the player can capture the Spawn Group.
CaptureIndex:
Defines the prestige awarded for capturing. 1 100, 2 and 3 250.
CaptureRequirement:
Specifies the number of players needed to capture this Spawn Group.
CaptureTime:
Specifies the time in seconds needed to capture the Spawn Group.
Default:
Specifies if this Spawn Group is the default spawnpoint or not. Players would initially spawn there.
Enabled:
Specifies if this Spawn Group is enabled or not.
Model:
Specifies the model used for the Spawn Group.
StatusSubMtlId:
Defines the sub material ID used to identify status of the points ownership.
teamName:
Specifies to which team the Spawn Group belongs on game start (Team US black, Team NK tan, neutral = leave field free)
buyOptions/Ammo:
Specifies if Ammo can be bought in this Spawn Group.
buyOptions/Equipment:
Specifies if Equipment can be bought in this Spawn Group.
buyOptions/Prototypes:
Specifies if Prototypes can be bought in this Spawn Group.
buyOptions/Vehicles:
Specifies if Vehicles can be bought in this Spawn Group.
buyOptions/Weapons:
Specifies if Weapons can be bought in this Spawn Group.

Spectator Point

Enabled:
Specifies if the spectaor point is enabled or not

Team Random Sound Volume

Enabled:
Specifies
IgnoreCulling:
Specifies
IgnoreObstruction:
Specifies
LogBattleValue
Specifies
MaxWaitTime:
Specifies
MinWaitTime:
Specifies
RandomPosition:
Specifies
SensitiveToBattle:
Specifies
TeamSound/Name:
Specifies
TeamSound/teamName:
Specifies

Team Sound Spot

Enabled:
Specifies
IgnoreCulling:
Specifies
IgnoreObstruction:
Specifies
Once:
Specifies
Play:
Specifies
TeamSound/Name:
Specifies
TeamSound/teamName:
Specifies

Other Multiplayer Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Particle Effect

backtoREF-Index

What is the Particle Effect Entity?

The Particle Effect Entity is used to place Particle Effects that are setup in the particle editor in the level. It can be attached to any object using the link feature. Using the flowgraph particles can be turned on and off. Several entities such as the explosion and vehicle entity have already build-in particle spawning support so no need to place an extra effect. The particle effect entity can be found in aRollup Bar > Entity

Benefits

The particle effect can be used to place effects such as fire, waterfalls in the level.

Properties

Active:
turns the effect on or off
AttachForm:
Specifies where it should be attached
AttachType:
Specifies to which surface is the particles spawned from
CountPerUnit:
Max particle count number per surface type selected
CountScale:
Adjustable multiplier for the total amount of particles per emitter
Particle Effect:
Specifies which effect should be rendered. To avoid manually typing in the effect name use the ASSIGN TO SELECTED OBJECTS feature in the database view/particles tab by right clicking on a particle effect and selecting from the pulldown menu ASSIGN TO SELECTED OBJECTS

Prime:
Precalculates the position of particle from the emitter
PulsePeriod:
Specifies retrigger period for the effect
Scale:
Specifies the size of the effect
SmartObjectClass:
Specifies the smart object class
SpeedScale:
Multiplier for all particles in the emitter

Other Particle Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Cloud Entity

backtoREF-Index

What is the Cloud Entity?

The cloud entity allows you to place clouds in the level. The cloud definition files (.xml) are built with the cloud tool.

Benefits

Unlike skyboxes 3D clouds can be moving and the player can fly though them.

Properties

MTL:
Shows which material is currently assigned. Consider using a material from the folder Materials/clouds/ as a base and then modify it.
Minimal Spec:
Used for setting as to which hardware configuration the entity is rendered or not.
CloudFile:
Defines which cloud object should be displayed.
Scale:
Specifies how big the cloud should be.
AutoMove:
Defines if the cloud should move or not using the speed property (cloud can also be moved with the track view editor)
FadeDistance:
The Distance in meter when the cloud should fade in when moving from one side of the Space Loop Box to the other.
SpaceLoopBox:
Defines the box in which the cloud moves from one end to the outer (looping)
Speed:
Specifies the speed in x and y direction

Other Cloud Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Flash Entity Reference

backtoREF-Index

What is the Flash Entity?

The entity flashes the players screen, same as a flashbang effect the entire screen will be white for some seconds.

Benefits

Very bright explosions can be simulated.

Properties

*SkyLightAtten:*
Specifies how the Sky Light Attenuation.
SkyLightColor:
Specifies in which color the skybox will be lit by the lightning effect
SkyHighlightMultiplier:
Specifies how bright the skybox will be lit by the lightning effect
Sound:
Specifies a sound to play when triggered
FadeInTime:
Sets up the amount of time (in sec.) how long it takes to fade in the effect.
FadeOutTime:
Sets up the amount of time (in sec.) how long it takes to fade out the effect.
FadeDuration:
Sets up the amount of time (in sec.) fade in and out takes the effect.

Other Flash Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Fog Entity Reference

backtoREF-Index

What is the Fog Entity?

The fog entity is used to create a fog effect in a specific area.

Benefits

In indoor areas a subtle fog effect can be added to simulate a dusty area.

Properties

AtmosphereHeightModifier:
Specifies the height of the fog effect.
FadeTime:
Sets up the time in which the fog takes to fade in.
GlobalDenstiyModifier
Specifies the density of the fog

Other Fog Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Fog Volume Entity Reference

backtoREF-Index

What is the Fog Volume Entity

Fog volumes in CryEngine2 exhibit the properties of global volumetric fog with the added benefit of locality. Currently supported volume types are boxes and ellipsoids (including spheres as a special case).

Benefits

It is possible to define fog volumes that can be non-uniformly scaled along their major axes, rotated and have an arbitrary fall off direction (unlike global volumetric fog which defines the world space up-vector as its fall off direction).


An ellipsoid fog volume

Usage

Fog volumes are placed as entities. To place one open the RollupBar, select the New tab, Enity, Render then FogVolume in the tree view below. Drag the entity over into the render view to place it. You should be seeing a white spherical fog volume. If not please refer to the Trouble Shooting section.

Orientation Translation and Rotation

Translation and Rotation of a fog volume entity is performed via the move and rotate edit mode just like for any other object.

Do not use (Non-uniform) Scaling Scaling of a fog volume entity is done via entity properties. Please do NOT use the usual scaling edit mode to perform scaling of the fog volume entity! Non-uniform scaling is akward to do this way. Moreover, it'll distort the entity and produce incorrect rendering results.

Properties

Active
Check/uncheck this box to enable or disable this fog volume entity.
Size
The height/width/depth of the fog volume in world units (m). Non-uniform scaling is possible so height, width and depth don't have to be the same.
Color
The fog color.
UseGlobalFogColor
During rendering the Color property is ignored. Instead the current global (volumetric) fog color is used. Please refer to the global volumetric fog page for further information.
VolumeType
Specifies the volume type. The following types are currently supported... 0 - Ellipsoid 1 - Box The following properties control the appearance of fog: GlobalDensity This value controls the global desity of the fog. The higher the value the more dense the fog and the less you'll be able to see objects behind or inside the fog volume.
FallOffDirLong
This value controls the longitude of the world space fall off direction of the fog. 0° represents East, rotation is counter-clockwise.
FallOffDirLati
This value controls the latitude of the world space fall off direction of the fog. A value of 90° lets the fall off direction point upwards in world space (respectively, -90° let it point downwards). All values in-between create a direction along the specified longitude.

Modifying the fall off direction.
longitude 0°, latitude 90° (left) longitude 330°, latitude 45° (right)
FallOffScale
This value scales the density distribution along the fall off direction. Higher values will make the fog fall off more rapidly and generate thicker fog layers along the negative fall off direction.

Scale set to 0.5 and 2.0 (from left to right)
FallOffShift
This value controls how much to shift the fog density distribution along the fall off direction in world units (m). Positive values will move thicker fog layers along the fall off direction into the fog volume. Negative values will move thick layers along the negative fall off direction out of the fog volume.

Shift set to -1.0 and 2.0 (from left to right)
SoftEdges
This value specified a factor which is used to soften the edges of the fog volume when viewed from outside. A value of 0.0 produces hard edges. Increasing this value up to 1.0 will gradually soften the edges.

Please note that this property currently has no effect on fog volumes of type Box!

Other Fog Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Lightning Entity Reference

backtoREF-Index

What is the Lightning Entity?

Lightning entities simulates Lightning effects.

Benefits

It can be used to simulate lightning effects.

Properties

Active:
Turns the effect on or off
Distance:
Specifies how far away from point where the effect was placed the lighting effect should happen.
DistanceVariation:
Adds a random value to the distance, for example 20 means +-20% if the Distance is set to 100
RelativeToPlayer:
Sets the effect relative to the player so always with the same distance.
LightIntensity:
Specifies how bright the light should be.
LightRadius:
Within this radius objects will be lit
ParticleEffect:
Specifies the lightning bolt effect.
ParticleScale:
Sets up the scale of the lightning bolt effect.
ParticleVariation:
Sets up the scale variation of the lightning bolt effect.
SkyLightAtten:
Specifies the Sky Light Attenuation
SkyLightColor:
Specifies in which color the skybox will be lit by the lightning effect
SkyHighlightMultiplier:
Specifies how bright the skybox will be lit by the lightning effect
SkyHighlightVerticalOffset:
Specifies how bright the skybox will be at the zenith.
Sound:
Sets up a sound effect that should be played when the effect happens.
Delay:
Adds a delay to the sound effect.
DelayVariation:
Adds a random +- value to the delay value of the sound effect.
LightiningDuration:
Sets the time in sec. how long the effect should last.

Other Lightning Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


ViewDist Entity Reference

backtoREF-Index

What is the ViewDist Entity?

The ViewDistance Entity limits how far the player can see.

Benefits

To increase framerate in specific areas but not the entire level the viewdist entity can be used.

Properties

FadeTime:
Specifies the amount of time it takes to fade from the currenct viewdistance settings to the viewdist entities viewdistance settings.
*MaxViewDist:*
Sets up the View Distance in meters.

Other ViewDist Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Volume Object Entity

backtoREF-Index

What is the Volume Object Entity?

The Volume Object unlike the cloud object renders 3D Volume objects with correct shading (shadows on the darker parts)

Benefits

It can be used to place realistic cloud in the level, or building irregular fog areas with different heights.

Properties

VolumeObjectFile
Defines which cloud object should be displayed.
Scale
Specifies how big the cloud should be.
AutoMove
Defines if the cloud should move or not using the speed property (cloud can also be moved with the track view editor)
FadeDistance
The Distance in meter when the cloud should fade in when moving from one side of the Space Loop Box to the other.
SpaceLoopBox
Defines the box in which the cloud moves from one end to the outer (looping)
Speed
Specifies the speed in x and y direction

Other Volume Object Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Trigger Entity Reference

backtoREF-Index

What are the trigger entities?

The trigger entities are used to active events in a level. The triggers entities can be found in Rollup Bar > Entity

Benefits

The AICheckInBox trigger is used to check if an AI entity is inside a specific area.

The AreaTrigger is activated when the player enters an area.
The CinematicTrigger is used if the player looks at a certain spot.
The DelayTrigger is used to trigger things not at once but a bit later when the player enters or leaves an area.
The MultipleTrigger is used to execute an action when multiple conditions are triggered.
The ProximitryTrigger is used when certain entities enter a box.

AI CheckinBox

DimX
Specifies how big the trigger is (x-axis)
DimY
Specifies how big the trigger is (y-axis)
DimZ
Specifies how big the trigger is (z-axis)
Species
Specifies which species can activate the trigger.
TriggerOnce
Disables the trigger after it has been triggered once.

Other AI Check-in Box Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.

Area Trigger

First create an area shape then select with the PICK function the area trigger entity.


Enabled
Turns the entity on or off
InvehicleOnly
Sets up that the trigger can only be activated when player is inside vehicle.
OnlyLocalPlayer
Sets the trigger to be only triggerable by the local player entity.
OnlyPlayer
Sets the trigger to be only triggerable by players entities.
ScriptCommand
Executes a script command when the trigger has been activated
Species
Specifies which species can activate the trigger.
TriggerOnce
Disables the trigger after it has been triggered once.

Other Area Trigger Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.

Cinematic Trigger


CheckTimer If the player looks the trigger for the amount of time specified in this field (specified in seconds) then the trigger is activated.

Specifies how big the trigger is (x-axis)
DimY
Specifies how big the trigger is (y-axis)
DimZ
Specifies how big the trigger is (z-axis)
MaxDistance
Sets up the maximum distance the trigger can be away in order for it to get triggered when the player looks at it.
Min Distance
Sets up the minimum distance the trigger must be away in order for it to get triggered when the player looks at it.
MinVisibleTime
If the player looks the trigger for the amount of time specified in this field (specified in seconds) then the trigger is activated.
ScriptCommand
Executes a script command when the trigger has been activated
Sequence
Plays the trackview sequence with the name specified in here.
TriggerOnce
Disables the trigger after it has been triggered once.
ZoomMinimum
Sets up the zoom level at which the player must be in order to enable the trigger.

Other Cinematic Trigger Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.

DelayTrigger

Enabled
Turns the entity on or off
PlaySequence
Plays the trackview sequence with the name specified in here.
ReferenceName
Here a reference name for the trigger can be entered.
ScriptCommand
Executes a script command when the trigger has been activated
TriggerOnce
Disables the trigger after it has been triggered once.

Other Delay Trigger Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.

MultipleTrigger

Enabled
Turns the trigger on or off
NumInputs
Sets up how many inputs the trigger has.
PlaySequence
Plays the trackview sequence with the name specified in here.
ScriptCommand
Executes a script command when the trigger has been activated

Other MultipleTrigger Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.

ProximityTrigger

ActivateWithUseButton
Specifies if the trigger is activated by pressing use
DimX
Specifies how big the trigger is (x-axis)
DimY
Specifies how big the trigger is (y-axis)
DimZ
Specifies how big the trigger is (z-axis)
Enabled
Specifies if the trigger can be activated or not.
EnterDelay
Sets up a delay (in seconds) before the enter node of the trigger is activated.
ExitDelay
Sets up a delay (in seconds) before the exit node of the trigger is activated.
InvehicleOnly
Sets up that the trigger can only be activated when player is inside vehicle.
KillOnTrigger
Disables the trigger when it has been activated.
OnlyAI
Sets the trigger to be only triggerable by AI entities.
OnlyMyPlayer
Sets the trigger to be only triggerable by the my player entity.
OnlyOneEntity
Sets the trigger to be only triggerable by one entity (first one who triggers it has to leave it in order to be triggerable again)
OnlyPlayer
Sets the trigger to be only triggerable by player entities.
OnlySelectedEntity
Sets the trigger to be only triggerable by the entity with the name specified in this field.
OnlySpecialAI
Sets the trigger to be only triggerable by the special AI entities.
PlaySequence
Plays the trackview sequence with the name specified in here.
ReferenceName
Here a reference name for the trigger can be entered.
ScriptCommand
Executes a script command when the trigger has been activated
TextInstruction
Prints a text on the hud when the trigger has been activated.
TriggerOnce
Disables the trigger after it has been triggered once.

Other ProximityTrigger Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


Vehicle Entity Reference

backtoREF-Index

What are the vehicle entities?

There is a basic entity for each type of movement (land, sea, air) and they can be tweaked so any kind of driveable machine can be simulated.

The vehicle entities tool can be found in Rollup Bar > Misc

Benefits

The different vehicles will make any level more fun to play as there are now new ways to navigate available allowing different driving and use of vehicle weapons game play.

Properties

Vehicle specific parameters

Abandon
Specifies if the vehicle should explode after some time (used to avoid that too many abandoned vehicle waste cpu resources.
AbandonTimer
Specfies in seconds when the abandon feature should be executed.
Respawn
Respawns another vehicle after some time.
Timer
Specifies when the vehicle should be respawned.
Unique
Makes each vehicle entity unique.

AI specific parameters

AutoDisable:
If set to false – AI is never disabled, no matter how far it is from the player. Should be used for special cases - like patrols coming from far away, etc. Normaly, this should be true (default value)
Behaviour:
Sets the starting behaviour of the AI, behaviour “job_standidle” is the default one, and should be used most of the time, as designers can set certain actions for the AI using the flowgraph.

Perception

audioScale
Scaling audio perception of this AI
camoScale
“How well others see me”. Determines how visible this AI is. Scales visibility when other AI’s looking at this agent. For camouflaged agents this value should be less than 1. The more stealthy/camouflage this agent is, then smaller this value should be. 0.0 will make this AI invisible.
collisionReactionScale
Scales explosions radiuses for AI to receive "OnExposedToExplosion" = signal. Also affects distances for AI reaction on players action ( =PlayerStuntActions)
FOVPrimary
Normal field of view of this AI
FOVSecondary
“Peripheral” field of view of this AI
heatScale
Equivalent to camo scale, used with ThermalVision . “How well am I visible when enemy has ThermalVision”
minAlarmLevel
Value between 0..1 indicating the minimum alarm level. Default 0; in case AI needs to be highly alerted from the beginning, this should be set to some value.
persistence
This parameter controls how often targets can be switched, value corresponds to minimum amount of time the agent will hold acquired target before selecting another one. Default value is 0.
sightrange
How far this AI can see enemies
sightrangeVehicle
Same as sightrange but for targets of vehicle type.
stanceScale
Controls how the current height of the target affects visibility of this target. Height of target changes with stance change (prone/crouch/stand)
stuntReactionTimeOut
Controls how long the attention target have had to be invisible to make the player stunts effective again. Default value is 3 sec
ThermalVision
Flag indicating that the agent has thermal vision ability. If set to true – will be using heatScale of enemies when determining visibility
velBase
Movement related parameter. Current visibility priority value of the target gets multiplied by (velBase + velScale*CurrentVel^2). This allows creating AI agents able to see only moving targets, or only static targets, and all in between.
velScale
Movement related parameter, see velBase.

Other Vehicle Entity Parameters

Click here for the Miscellaneous Parameters reference guide, here for the Material Layers guide, here for the Miscellaneous Entity Parameters guide, here for the Entity Links guide and here for the Entity Events guide.


The Animation Graph Reference

backtoREF-Index

Overview

General Information

The function of the animation graph is to define the order in which animations can be played and the rules when and how some transition between different animations may happen. The animation graph is a directed graph in which each node represents an animation. Nodes of this graph are called animation graph states. Graph links between animation graph states define available transitions between animations. Links are unidirectional.

At any moment only one animation graph state can be active and that state is called current state. Usually this state is defining which animation is currently playing.

An additional functionality of the animation graph is to choose the most appropriate state to be the current one. The chosen state is called queried state. This decision is based on requests coming from outside as values assigned to animation graph inputs. Animation graph inputs are a set of values (maximum 32), each of which is defined by its unique name, type and range of values as well as some other properties. Various systems, like animated character, movement controller, game logic, vehicle system, item system, flow graph, smart objects and AI can set input values. Whenever the inputs change a different state can potentially be selected as the queried state. State selection works by comparing actual input values with selection criteria for states in the graph. Only states that are marked as selectable can be selected as the queried state.

Whenever the queried state is different from the graph's current state, the built in pathfinder will find the cheapest path from the current state to the queried state by following existing links between states. Then each state on that path will be traversed - the current state will change and pass through each of the states on its path to the queried state.

Using Animation Graph Files

Animation graph files are stored as .xml files in folder Game/Animations/graphs. By saving the file, its content is additionally preprocessed and stored in a binary format file with extension .ag. If this file is present in the same directory it will be used by the game instead of .xml file to reduce loading time. A significant difference in loading speed is noticeable for large animation graphs only.

Some characters need just one animation graph, but other need two – one for the full body animations and one for the upper body animations. Each character entity class can specify the animation graph files to be used with that character. There are two Lua table entries in the entity scripts that specify the animation graph .xml files:

AnimationGraph
defines the file name of the full body animation graph, and...
UpperBodyGraph
defines the upper body animation graph, or if the upper body graph is not needed it has to be set to nil or to an empty string.

This is an example script taken from Player.lua:

  Player =
{
  AnimationGraph = "PlayerFullBody.xml",
  UpperBodyGraph = "PlayerUpperBody.xml",
  ...
}

Main Components

The animation graph consists of four main components:

Inputs
set of values controllable from various external systems, used to place animation requests. Each input is defined by its unique name, type, range of values, etc.
States
odes of the graph. Each state represents the animation associated with it. Some states have no animation associated with them. These are called null states and serve to either play one randomly chosen animation (these are selectable null states) or to organize things by decreasing the number of links (these are non-selectable null states).
Links
efine the allowed transitions between states.
Views
sed only by GUI to present the states and links between them in some visual order that makes sense.

States

The nodes of the animation graph are called animation graph states.

Current State and Queried State

The active state is called current state, while the state towards which the current state transitions from one state to another by following the available links is called queried state. Queried state is chosen by comparing the selection criteria of all selectable states against the actual input values.

Animations

Animations in the animation graph are represented as states. One animation can be associated with one state (or less common but still possible, the same animation can be associated with multiple states). Whenever a transition from state A to a directly linked state B begins the animation of state B is added at the end of the animation queue. Transition ends when the animation starts playing, which depending on various setting for both states may happen immediately or may happen later. Even though the state A will be left its animation will remain in the queue until the blending to animation B is done.

States Types

Selectable
States which can be selected as queried states if their selection criteria matches actual input values more than any other selectable state.
Green rectangle
Non-selectable
States which cannot be explicitly requested by changing input values.
Yellow rectangle
Not Included in Game
Disabled states – states that are not included in game
Red rectangle
Null States
States without an animation associated with them.
Rectangle without an icon
Selectable Null States
Often used to randomly play multiple animations using force-follow links to multiple non-null non-selectable states
Green rectangle without an icon
Non-selectable Null States
Used to reduce the number of links and make the graph easier to understand and more readable.
Yellow rectangle without an icon

Animation Graph Nodes

Each state consists of several animation graph nodes. Each node has its own function defined by its type. Some node types control the animation queue, some control the physical proxy of the character entity, and some control the movement… Set of nodes used to build a state is defined by the selected template for that state and eventually by adding optional nodes (see Extra Properties in UI).

General Properties

State name string The state’s name – must be unique.
Parent state selection The state from which this state is inherited. It must be specified for all states (except for the state called Alive).
Pathfind Cost integer The cost of traversing through this state that pathfinder will use for finding the cheapest path from the current state to the queried state.
Allow selection boolean Is the state selectable? Selectable states will be evaluated while querying the graph to find the queried state by comparing current input values with state’s selection criteria.
Include in game boolean Is the state enabled? States ‘not included in game’ are ignored and do not exist while running the game same as if they would be removed. Links to and from them will be disabled as well, so no path can pass through such state.
Use template boolean This one should always be set to True... Hopefully it will be removed from the interface soon.
Can Mix boolean Controls mixing with upper body layer. This flag makes sense only in the full body animation graph of a character that uses also an upper body animation graph. If this state is the current state of the full body graph and Can Mix is set to True then the upper body animation graph will be allowed to leave its ‘nothing’ states. If this is set to False then the animation played in the full body layer will be flagged to blend out and hide the upper layers, and also the upper body graph will be not allowed to leave the ‘nothing’ states whilst this state is the current state of the full body graph.
Anim. Cont. View boolean Animation Controlled View - When set to True and played by the player in first person view the animation takes over the control of the camera until the animation is done.
Can be hurried? boolean When set to True and an AI controlled character get alerted (by being attacked or by seeing an enemy) while playing this animation then the animation can be skipped. All subsequent directly linked animation graph states on the path to the queried state can be skipped if they are also flagged as ‘Can be hurried’. This is useful for skipping some of the relaxed style animations in order to start playing combat style animations faster.
Skip in first person? boolean This has to be renamed to ‘Skip for players?’… When set to true the state will be valid for AI controlled characters only. For the player controlled characters it will be simply skipped if it is in the middle of the path and also while finding the queried state it will be ignored if it is a selectable state or a state reachable by following a link with force-follow.
Icon Snapshot Time float Almost useless. Hopefully it will be removed from the interface soon…

Inputs

Definition

For each animation graph there is a set of values controllable from various external systems used to place animation requests. These values are called animation graph inputs. Each input is defined by its unique name, type and range of values, etc.

Value Types

There are three value types available for the inputs: floats, integers and keyed values. The values for each input are limited to a certain range for inputs of type float, integer or to the list of defined keyed values for inputs of the type key. When setting a float or integer value which is out of range, the value will be clamped. Setting an undefined key value for keyed inputs will set the input to its default value if specified, or to special value <not set> when the default value is not specified.

Initial Values

Initially each input regardless of its type is set to a special value <not set>. Hopefully all inputs will be set by different program modules before the first update of the animation graph when the inputs get used to find the queried state. However, all inputs set to this special value will be ignored when looking for the queried state.

Input Priorities

When looking for the queried state the inputs are evaluated by their priority. Inputs with higher priority are evaluated before other inputs. The order of evaluation of inputs with equal priority is undefined.

Properties

This is the list of properties of the animation graph inputs:

Name string Input’s name – must be a unique name.
Signaled boolean If signaled is True the input’s value gets reset to its default value automatically after entering the queried state which selection criterion requires this input’s current value.
Default Value string The value which is set when attempting to set an undefined key value. Also this is the value which is ignored for guarded inputs when used for animation graph states selection criteria.
Guarded boolean If True then animation graph states that have used this input in their selection criteria will only be valid for passing through while pathfinding, if the current input value matches their selection criteria. However, states that have selection criteria set to match the input's default value, can be used while pathfinding even if the input is guarded and the current input value does not match the selection criteria.
Mixin Filter boolean Obsolete – do not use it…
Priority integer Input’s priority defines the order in which inputs get evaluated when looking for the queried state. Higher priority inputs are evaluated first.
Attach To Blend Weight string Obsolete – do not use it…
Blend Weight Move Speed integer Obsolete – do not use it…
Type selection Input’s type – (Integer, Float or Key).

In addition for the inputs of type integer and float there are properties to define the minimum and the maximum values. For the inputs of keyed type there is a list of available keys. Note that the default value for keyed inputs must be defined as one of the keys for that input.

List of Existing Inputs

In the current implementation of the engine, most of the animation graph inputs are generic and used by all character types. These inputs are controlled by different code modules. However, not all of these inputs are needed for each character type. In this case the inputs should not be defined in the animation graph for those characters. Setting a value for a non-existing input does not induce any error or warning. There are also a few character-specific inputs controlled by game-specific code.

This is the list of generic animation graph inputs:

Action key Used to play looping animations – controlled by various modules.
ActualMoveDir4LH key Actual horizontal local move direction – Idle not moving; Fwd forward; Bwd backward; Lft left; Rgt = right.
ActualMoveSpeed float Actual move speed.
ActualMoveSpeedLH float Actual horizontal local move speed.
ActualMoveSpeedLX float Actual X-component of the local move speed.
ActualMoveSpeedLY float Actual Y-component of the local move speed.
ActualMoveSpeedLZ float Actual Z-component of the local move speed.
ActualTurnSpeedLZ float Actual turning speed around local Z-axis.
Aiming float Is aiming turned on?
AnimPhase float Normalized time of currently playing animation.
Firing float Time elapsed while holding the fire trigger pressed.
Health integer Health of the character.
Item key Currently selected item.
PseudoSpeed float Moving style – 0 not moving; 0.4 walking; 1.0 running; 2.0 sprinting or running in speed mode; 3.0 = sprinting in speed mode.
RequestedMoveDir4LH key Requested horizontal local move direction – Idle not moving; Fwd forward; Bwd backward; Lft left; Rgt = right.
RequestedMoveSpeed float Requested move speed.
RequestedMoveSpeedLH float Requested horizontal local move speed.
RequestedMoveSpeedLX float Requested X-component of the local move speed.
RequestedMoveSpeedLY float Requested Y-component of the local move speed.
RequestedMoveSpeedLZ float Requested Z-component of the local move speed.
RequestedTurnSpeedLZ float Requested turning speed around local Z-axis.
Signal key Used to play one shot animations – controlled by various modules.
Stance key Body stance of the character.
UsingLookIK integer Is look IK turned on?
Vehicle key Vehicle type.
VehicleSeat integer Vehicle seat id.
waterLevel float Water level relative to character’s body.

Setting Input Values

Values of the animation graph inputs can be modified by any module of the engine, as well as from Lua scripts.

Using C++ code

A pointer to the character's IAnimationGraphState object (which is the interface to the dynamic part of the animation graph) will be needed and then one of these methods can be called on it:

bool SetInput( InputID, float, TAnimationGraphQueryID * pQueryID = 0 );
bool SetInput( InputID, int, TAnimationGraphQueryID * pQueryID = 0 );
bool SetInput( InputID, const char , TAnimationGraphQueryID pQueryID = 0 );

The first parameter is the ID of the input, the second is the value to be set on it (the value will be converted to match the type of the input). The third parameter is optional and used to obtain a query id – used in case of additional feedback about this operation is needed (e.g. when the animation matching that input value begins).

The return value will be true if the operation has succeeded.

Inputs can also be set by specifying their name instead of the ID, using this method:

template <class T>
inline bool SetInput( const char name, T value, TAnimationGraphQueryID pQueryID = 0 );

However, using the ID saves one string lookup. Therefore the preferred way to reference inputs is to store their IDs in variables, to be used later. Input names can be converted to input IDs using this method:

entity.actor:SetAnimationInput( name, value );

… where entity is the entity script table, name is the name of the input and value is the value to be set on it.

Selection Criteria

Definition

The selection criteria of an animation graph state are a set of rules (one rule per input) that define the valid values for each input to select a state as a queried state, if the state is a selectable one. On non-selectable states, the rules define which values of the guarded inputs are valid for the state to be available for the pathfinder and allow passing through it. Rules for non-guarded inputs are ignored. Having a no selection criterion for a guarded input makes the state available for the pathfinder regardless of current input value.

Rules

There is one rule for each input and for each state. Each rule can either be inherited from its parent state or defined in one of these three forms:

If no rule is defined for an input and there are no rules defined for the input in any of the parent states, the system acts equal to having a rule which validates any value for the input.

Finding the Queried State

The state which the animation graph tends to reach is called the queried state. Finding that state is a complex process which happens in several steps:

Step 1: Creating the List of Available States

The animation graph performs a database-like query over all selectable states by comparing current input values with the selection criteria of each state. The goal is to create the list of available states whose selection criteria match best with the current input values. Note that inputs, for which the value is set to its initial special value <not set> will be ignored during this process. The process begins with the highest priority input first – all selectable states whose selection criterion is matching the current value of that input are stored in the list of available states. If there are no states in the list, the process stops with an error. If there is only one state in the list, the process is over – there is no need to further narrow the list since there is only one state in it. Then the value of the second highest priority input is evaluated against all states from the list of available states. States whose selection criterion on that input does not match the current input value are removed from the list. If there is still more than one state left in the list, the process of removing states from the list continues with the next input in order of their priority. The process stops, if there is only one state left or if after some iteration, there are no states left in the list of available states. In the latter case the last iteration will be rolled back and the process stops, with the list of available states before processing the last input, even if there is more than one state left in the list.

Step 2: Selecting the Queried State

If there is only one state in the list of available states, it is being selected as the queried state. Otherwise, since all the remaining states are equally suitable to be selected, one of them will randomly be chosen to be the queried state. There is one exception – if there is more than one available state and some of the states are locomotion states, the queried state will be selected to be one of the available states. In this case the selection is not on a random base, but on a more complex selection method which works by comparing the motion capabilities of each of the available locomotion states and the predicted movement for that animated character. The animation whose capabilities match the most with the prediction, will be selected as the queried state. Obviously to use the benefits of this method, the animation graph needs to be set up in a certain way – all locomotion states need to be equally selectable. The easiest way to achieve this is to set the selection criteria to be exactly the same for all of the locomotion states. Note that locomotion states can only play LMG animations which are tagged with an additional information to logically describe the animations they play, so the animation graph can distinguish eight different types of LMG's: walk, run, idle step, idle turn, idle to walk, walk to idle, idle to run, and run to idle. This information is also used to choose the queried state besides the check of how much the prediction fits within the range of motion capabilities for each LMG. Idle is the ninth special type of a locomotion state which also needs to use the same selection criteria. To make it recognizable to the animation graph as an idle state, it needs to be a selectable null state without an animation associated to it. Instead, the animations are played by following a ‘force followed’ link from the idle state.

Step 3: Force Follow

If the state that was selected as the queried state in step number two is also the current state of the animation graph and the state has at least one link with ‘Force follow chance’ property set to non-zero value and leads from that state to some other state, then within this step the queried state will be changed to be one of the ‘force followed’ states. Usually the force followed states are non-selectable and as such not part of the list of available states. Still that does not mean they cannot be selected as the queried state – they can, but only in this special case. The values of ‘Force follow chance’ properties of the links are used as weighting values that define the probability to follow a link. A higher force follow chance value means that the link will be more likely force followed, compared to other links with non-zero force follow chance.

Nodes

Each state of the animation graph consists of a number of functional units called animation graph nodes.

There are different types of nodes, where each type controls something specific only for that type of nodes. For example nodes may play an animation, control the animation properties, play facial animations, etc... With only a few exceptions, there can only be one node of a type in one single state.

Set of nodes used to build an animation graph state is defined by the state template on which that state is based eventually extended with one or more of the optional nodes. States are based on only one template, but each template usually defines several nodes at once. Only some types of nodes are optional, and also they can be used as parts of the templates. The only way to make a non-optional node be part of a state is to base the state on a template in which that node is specified as one of the template’s nodes.

Each node has a set of properties which is defined by its type. Properties of the optional nodes can be directly edited in the Animation Graph Editor, while the properties of the non-optional nodes can only be accessed through the template. The template can expose some of the properties of its nodes in the Editor.

List of Existing Types

This is the list of currently implemented animation graph node types:

AnimationLayer1, AnimationLayer2… AnimationLayer9 Pushes an animation at the end of the animation queue for a layer. yes, but only for different layers no
AttachmentEffect Plays a particle effect while the state is active. yes yes
ColliderMode Controls the mode of a character's physics proxy. Can be one of the following: pushable, non-pushable, disabled, disabled except for collision with other players no no
Event Triggers an event yes yes
FacialEffector Plays a looping facial animation, randomly chosen from the list of comma separated animation names. no yes
FallAndPlay Special node used only for the fall&play engine feature. The node prevents leaving the state until the character has left fall&play mode. no no
FreeFall Special node used to jump out of some vehicles. It forces the vehicle exiting to happen earlier, so the character gets detached from the vehicle. Afterwards it prevents exiting the state until the character touches the ground. no no
LookIk Can disable look IK while playing some animations. no no
MovementControlMethod Selects the movement control method. no no
Output Sets the value of an output while state is active. yes yes
ParamsLayer1, ParamsLayer2… ParamsLayer9 Controls parameters for animations in each layer. yes, but only for different layers no
SetInput Changes the value of an input after specified time. It can restore the original value when leaving the state. yes yes
Sound Plays a sound yes yes
TransitionParamsLayer1, TransitionParamsLayer2… TransitionParamsLayer9 Controls additional parameters for animations in each layer. yes, but only for different layers no
WaitForUBAllowed A node used to disallow leaving the ‘nothing’ states in upper body animation graphs. no no

Node Factories

For each type of animation graph, nodes a factory class needs to be registered in the animation graph manager (class CAnimationGraphManager).

For each state the animation graph holds a list of pointers to already created instances of registered factories. Each of those factories will be initialized with properties read from the state template, template properties or extra properties. Factories of same type with exactly the same properties will be instantiated only once and then their single instance will be referenced from multiple states.

Nodes need to be created before entering a state and destroyed after leaving it. As memory allocation, initializing and releasing of memory while the game is running is a very expensive operation, most of the animation graph nodes are implemented in a way that allows one single node instance to be shared between multiple states, multiple animation graphs or even multiple characters. In this case the node cannot store any dynamic data in member variables but instead all dynamic data must be stored in the character entity or in the dynamic part of the animation graph (CAnimationGraphState). In such a case a single C++ class can serve as a factory and as a node at same time. Of course, one object instance will be created for each different set of values for node properties.

Runtime Functionality

All of the nodes of the current state are kept by the animation graph in a list. Some of these nodes will be updated on each frame.

Whenever a transition to another state is needed, the list of node factories of the current state is compared with the list of node factories of the next state. Node factory instances that are in both of these lists will be ignored during this transition and nodes created by those factories will be reused with the next state. All other nodes from the list of current state nodes will be marked as nodes to be exited.

The transition to the next state does not always begin immediately. All of the nodes marked to be exited will be queried, weather a transition is applied or not. Each node has the right to ‘veto’ the transition to the next state. Querying will continue on each frame until all of the nodes ‘agree’ to begin the transition to the next state. Once that happens the transition begins.

At the beginning of a transition to the next state, a notification about the intention to leave will be sent to all of the nodes of the current state first (except to the nodes meant to be reused). Then the list of nodes for the next state will be created using their factories. Each newly created node in that list is notified about the intention to be entered.

At this point the transition is considered as started. On each frame the nodes of the next state will be queried to check if the transition is done. The transition is usually done when the requested animation starts playing or if no animation was requested. In the first case the transition is done when one of the nodes are entered, while in the second case the transition is done, if there are no nodes waiting to be immediately entered.

Once the transition is done (because at least one of the nodes of the next state was entered), the nodes of the current state are notified that to have been ‘exited’ and nodes of the next state are notified to have been ‘entered’. If the transition is done, but none of the nodes of the next state was entered, the nodes of the current state will remain semi-active until a state is entered.

Finally the next state becomes the current state and the list of nodes of the old state is replaced with the new one.

Templates

The state templates defined in .xml files, are all located in folder Game\Libs\AnimationGraphTemplates. The template called ‘Default’ is the only built-in template and does not have to be defined as an .xml file. The ‘Default’ template is actually completely empty (defines no template properties, nodes, guards or selection criteria rules) and is used to create so called null states.

The root node of the .xml file is the only mandatory node. It is named AGTemplate and must specify the name of the template as value of its attribute 'name' .xml file names (without the extension) must match the state template name they are defining. Template names must be unique. There is also one optional attribute named 'extend', used to implement a template based on one or more parent templates, by inheriting all of their child XML nodes. The child nodes can be overridden.

The child nodes of the root node can be specified using one of these XML tags:

Param
Defines one template parameter using two attributes – name and type, where name is the name of the template parameter and type can be either 'string' or 'float'.
SelectWhen
Defines selection criteria rules. Each child node defines a rule, where the tag is the name of the input and depending on attributes a different kind of rule can be defined: no attributes – any value will match this input; value – the specified value will match; min and max – the specified range of values will match
Guard
Defines guards on input values. The syntax is the same as for SelectWhen except that values are specifying the valid values to pass through this state while pathfinding. Also the ‘no attributes’ case doesn’t make sense to be used with guards so that would be treated as an error.
Any animation graph node type name
Defines a node of that type to be part of the states based on this template. All node properties are specified as XML attributes.

State Parameterization

Very often it is necessary to replicate an animation graph state multiple times and to add only a tiny difference in few properties of each copy. Moreover the differences in properties often seem to follow some pattern, or having to be replicated in a different dimension (the tiny difference is in some other set of properties). The number of states and the complexity of the animation graph grows rapidly in a case like this. Sooner or later it can reach the state where no further changes can be made, without spending a lot of time to replicate changes made on the original state to all of the replicated states, or to look for the bugs introduced while copying.

All of these problems can be avoided by using state parameterization – an easy way to create multiple copies of a state. One or more state parameters can be added to each state. For each parameter there is a list of literal values used to define patterns for those tiny differences in some of the properties of replicated states.

The number of states after the replication depends of the number of parameters and the number of values for each of those parameters. The state will be replicated once for each state parameter value if there is only one parameter or once for each possible combination of parameter values if there is more than one parameter. The total number of states after the replication can be calculated as N N1 × N2 × … × NP, where N is the total number of states, Ni is the number of values for parameter number i and =P is the number of parameters for that state.

Parameter values can be used in any of the state properties, namely all strings of form [parameter_name] will be replaced with different parameter values in each replicated state. If for example for the parameter named StateParam1 there are two values defined – valueA and valueB then in each property value:

While the game is running, no information about state parameterization is known. Before the game starts, all parameterized states are replicated with states with same characteristics as they would be created without use of state parameterization. Therefore each of the replicated states needs a unique name and the only way to achieve this requirement is to embed each of the state parameters in the name of the parameterized state, so that all of the replicated states do not contain the parameter values as part of their names. For example the ‘walk’ state after adding the parameters ‘Stance’ and ‘Item’ has to be renamed into something similar to ‘walk_[stance]_[item]’. If there were two values for the ‘Stance’ parameter – ‘Combat’ and ‘Crouch’, and for the ‘Item’ parameter there are two values as well – ‘Pistol’ and ‘Rifle’, then there will be four states present in the graph after the replication, with following names: walk_combat_pistol, walk_combat_rifle, walk_crouch_pistol and walk_crouch_rifle.

Some combinations of parameter values might need to be skipped during replication of parameterized states. For this purpose there is an ‘Exclude from graph’ option.

Sometimes the differences in property values do not follow a pattern, neither for all nor only for some of the replicated states. In this case Template Properties and Selection Criteria properties can be individually set for any possible combination of parameter values.

Linking Parameterized States

Links in a simpler animation graph without any parameterized states are easy to understand as they simply connect exactly two different states and define only one transition between only those two states. However, in a graph where state parameterization is used, things are more complicated. Parameterized states actually represent multiple individual states. Therefore a link between two of such states does not necessary connect only two states. Depending on actual needs a link can connect:

There can even be more possibilities, if there is more than one parameter for parameterized states in the examples above...

These options are called Parameters Mapping and are part of the link properties in case of at least one of the states being connected by a link is parameterized. In such case the link can be limited, to connect only some of the source states to only some of the destination states. Limiting can be defined for each parameter of both source and destination states. There are three possible limiting options for each parameter:

Note that the last option is only available for links connecting two parameterized states.

By default when a new link is created the link is not limited on any of the parameters and connects all possible variations of the source to all possible variations of the destination state, except in case when both source and destination states are parameterized with a parameter named with the same name. In this case the link will be limited to connect only source states where the value of that parameter is equal with the value of the same parameter of the destination state.

Views

Views are used by the UI to present the states and links between them in some visual order. Multiple views per animation graph can exist. Each state can appear in any number of views, but not more than once per view.

Additionally, views are used to manipulate the links between states. Adding, removing and editing of the links can only be done in a view.

Only links between the states shown within the same view will be visible – links coming from or going to states not shown in the view will be invisible unless the connected state is being added to the same view.

UI Reference

Overview

The main application menu option View Open View Pane Animation Graph opens the animation graph editor in a popup window. The position and arrangement of the window just before closing will be remembered and used when the window is opened again.

The animation graph editor consists of the main view (big gray area in the middle of the window), a short menu bar, a status line and several tool windows listed in this table:

States Lists all states, views and inputs defined in an animation graph.
States Editor Lists some common operations and all properties available for the selected state, link, view or input.
State Params Lists all parameter names and values defined for the selected state.
Preview Displays the preview of the animation associated to the selected state or selected animation in the list of available animations in the Preview Options window.
Preview Options Controls the animation played in the Preview window. Also allows choosing the character model for the Preview window.

Each of these windows can be arranged within the Animation Graph editor. Closed windows can be reopened using the View menu.

Menus

Main Menu
Context Menus

States in the list

States in a view

All menu items as for the states in the list, plus:

Links

Note: This context menu is displayed only by right-clicking the small circle in the middle of a link line. Cursor shape changes to indicate that the mouse pointer is inside the circle.

State parameter value lists

Main View

The main view displays the contents of the selected animation graph view – the states added to that view and all the links between them.

Animation graph states are represented as rectangular bars filled with states’ names. Bar’s background is colored green, yellow or red depending on state type or cyan when selected in UI. This is the description of all colors sorted by priority (highest on top):

The states associated with an animation additionally can be displayed (depending on chosen toolbar option) with an icon next to the bar showing the middle frame of the animation.

Links are displayed as curved lines connecting two different states, with an arrow at one of its ends. The arrow is pointing towards the destination state. At the middle of the line a small circle shows the place where the link can be right-clicked to open the context menu. Links with Force-follow chance property set to a non-zero value will display that value next to the circle.

Using the Main View

Only one view can be displayed at a time. To display a view its name should be selected either in the list of existing views in the States window (Views section), or by choosing one of the views listed under Find in Views context menu of the selected state. Any newly created view gets activated and shown automatically. Initially the views are empty – they contain no states.

Drag-dropping a state from the list of existing states into the main view would include that state in the selected view. It can be removed from the view using state’s context menu.

Clicking on a state in the view with the left mouse button selects that state. Dragging the left mouse button starting from some empty area within the view would show the selection rectangle and releasing the button would select all states within the rectangle.

Clicking left mouse button anywhere in the empty area of the view deselects all selected states.

When selecting a state (or multiple states) all previously selected states get unselected unless the user had pressed the Control key when the other state(s) is/are selected.

The position of the state can be adjusted by dragging it with the left mouse button to any other location within the view.

Dragging a state with the left mouse button and Shift key pressed would show a link line leading from that state to the mouse pointer. Releasing the button over some other state in the view creates a new link from the source to the destination state. Doing the same but with the Alt key pressed instead of the Shift key, creates a link with force-follow chance already set to 1.

Animation graph view contents displayed in the main view can be zoomed in and out using the mouse wheel. The contents can also be scrolled in all directions by dragging the mouse using the middle or the right mouse button.

States Window

All states, views and inputs defined in the opened animation graph are listed by name in the States window. It’s a tree view UI control where States, Views and Inputs are three main branches in it.

States are represented with three different icon types:

Using the States Window

The states listed in the window can be selected by selecting their name from the list. The state will be highlighted in the main view if the state is present in the selected animation graph view. Also if the state isn’t visible the view will automatically scroll showing the state in the center. The properties of the selected state will be displayed in the State Editor window and its parameterization options in the State Params window. If there’s an animation associated with the selected state it will be played in the Preview window.

The states can be drag-dropped into the main view in order to add them in the selected view.

Selecting a view from the list activates that view in the main view and shows its properties in the State Editor window.

Selecting an input from the list shows its properties in the State Editor window.

There’s a context menu for the states in the list, but not for the views and inputs.

States Editor Window

States Editor window shows the context sensitive common commands and the properties of a selected state (or multiple states), link, view or input.

Property values that contain the name of a parameter enclosed in brackets will get modified for different state variations. The brackets and the name will be replaced with actual values at loading time, while the rest of the string value remains unmodified. Multiple parameters can be used in one single property value. Most important is to use all parameters in the name of the state so each state variation can have a unique name! Each parameter can be used in three different forms. Here’s the list of the available parameter strings used for replacement in property values (assuming the parameter name is ExampleName):

For a parameterized state the State Editor window shows customized values for properties of a single or multiple parameter values and combinations (depending on selected parameter values in the State Params window). If multiple state variations are selected at same time and not all property values are equal for each of them then the text Different Values Selected is displayed. Only the Template Properties and the Selection Criteria can be customized for a specific or a range of parameter values.

States Editor window shows additional properties for the links connecting at least one parameterized state. For each parameter of the parameterized states one property defines how the link is restricted in respect of that parameter. There are basically three different options for these properties:

When a new links is created between two parameterized states and one or more of their parameters parameters are named same in both states then the link will be by default restricted to connect state variations only when the values of those parameters are equal. Regarding all other parameters the link will be unrestricted.

State Params Window

Parameters of the selected state are displayed in the State Params window. The window allows easy manipulation of parameters and their values. It also serves as state variation selector so that properties of each state variation can be customized, or the animation for a state variation previewed.

Each parameter of the selected state is displayed with its name and a list of defined values for that parameter. There’s also one additional entry in the list of values – [All], which is highlighted by default indicating that the State Editor window is showing the properties for all state variations, at least regarding that parameter.

The State Params window displays no parameters when a non-parameterized state is selected.

Using the State Params Window

The Add Param button can be used to add a new parameter to the selected state. The user must enter a unique parameter name. After that the parameter will be displayed in the window with an empty list of values. The list has a context menu which can be used to add new (unique) values and to rename or delete the values. The rename value dialog box also appears on double-clicking a value.

The parameters can be renamed by simply typing their new name in the edit box where their name is displayed. Parameters can be removed by deleting their name.

Any particular state variation can be excluded by selecting that combination of parameter values and marking the check box ‘Exclude from Graph’. The check box also shows is the selected state variation excluded or not. In case when more than one variation is selected it might be grayed out which indicates that some but not all of the selected state variations are excluded from the graph.


Facial Editor Reference

backtoREF-Index

The facial editor is a tool for creating and editing the various asset files described above (except for the model files, which are created elsewhere). It provides a graphical interface for creating expression libraries and for using those expressions to create sequences.

The image below shows an overview of the FE and its subwindows.

Note! The FE layout is user-customizable, so the editor may appear different for different users.

The facial editor interface is divided into several subwindows or panes, each of which is used to edit a different aspect of the facial animation.

These panes are as follows:

In addition the Facial Editor has a Main Menu containing several pull down menues.

Preview Window

The preview window shows a character on which the selected expressions and animations can be previewed.

It can show any model supported by the engine as long as either the main mesh or an attachment features at least one morph target. The file that is currently being displayed is shown in the title text of the pane.

The model being shown can be changed using the [LINK] option. Various preview options can be changed using the Preview Options Pane.

Preview Options Pane

This pane provides options to control what is shown in the Preview Pane. Many of these options are the same as those provided in the Character Editor.

LookIK Causes the model to look toward the camera, using spine, neck, head and eye bones together.
LookIK Eyes Only If LookIK is enabled, move only the eyes.
Show Eye Vectors Show lines pointing in the direction of the eyes bones. Used for debugging.
Look IK Offset X Specifies the offset of the LookIK Target on the x-axis relative to the center of the camera.
Look IK Offset Y Specifies the offset of the LookIK Target on the y-axis relative to the center of the camera.
Procedural Animation Enable procedural animation of eyes and eyelids for automatic twitches and blinking. (1)
Display Physics Draw the physics meshes of the model.
Wireframe Show the model as wireframe.
Grid Toggles the grid display along the z=0 plane.
Lighting Toggles lighting on the model.
AnimLights Toggle between static light position and orbiting lights in the scene.
BackgroundColor Alter background colour using RGB values.
ObjectAmbient Choose the ambient lighting for the model.
LightDiffuse1 Alter light 1’s diffuse colour using RGB values.
LightSpecular1 Alter light 1’s specular colour using RGB values.
LightDiffuse2 Alter light 2’s diffuse colour using RGB values.
LightSpecular2 Alter light 2’s specular colour using RGB values.
LightDiffuse3 Alter light 3’s diffuse colour using RGB values.
LightSpecular3 Alter light 3’s specular colour using RGB values.
ShowTangents Display lines along the tangents of each mesh vertex.
ShowBinormals Display lines along the binormals of each mesh vertex.
ShowNormals isplay lines along the normals of each mesh vertex.
ShowSkeleton Display underlying bones.
ShowJointsValues Show debugging information for bones.
ShowShaders Display currently used shaders.
ShowSkyBox Unsupported.
ShowTextureUsage Unsupported.
ShowAllTextures
No LOD Always render using base mesh - never use low LODs.
ShowOcclusion
DisableVisibilty
FOV Set the Field of View (can be used to zoom in).

(1) Procedural animation must also be enabled using the console command ca_face_procedural=1 (or 2 or higher).

Effectors Slider Pane

This pane shows a list of expressions in the current library and provides for each of them a slider control.

Manipulating this slider control allows the expression to be previewed in the Preview Pane. Multiple sliders can be manipulated simultaneously, and their effects will be cumulative.

The Effectors Slider pane contains two tabs. The first one is called Morph Targets, and shows only the expressions that are simple morph targets. The second tab is called All Effectors and shows all effectors in the current library.

An expression can be quickly created from the current slider positions using the Effector Library Pane. This can be an efficient way to create new composite expressions.

To the left of each slider is a check box that enables/disables the preview of that effector.

Turning this box off is equivalent to setting the slider position to 0. On the far right of each slider is a control for setting the balance of the effector in the preview window.

Expressions can be dragged from this pane to the Expressions Explorer Pane to add sub-expressions to compounds, or to add an expression to a folder.

To clear all previewed expressions quickly there is a button at the top of the pane called "Clear All".

Effectors Slider Pane Main Menu

Morph Targets Tab

Lists all available morph targets in the character. Weight sliders within this view allow the user to preview each morph by moving the slider to the left (negative values), or to the right (positive values). Balance allows asymmetrical preview of each shape or morph.

Weight Slider to move the morph target from neutral position to negative or positive values.
Val Displays the position value of the slider in numerical form.
Balance Control the balance factor or symmetry or the morph.

All Effectors Tab

Similar to the previous tab, but lists all possible effectors from morphs to expressions.

Weight Slider to move the effector from neutral position to negative or positive values.
Val Displays the position value of the slider in numerical form.
Balance Control the balance factor or symmetry or the effector.

Expressions Explorer Pane

This pane allows the user to browse the expressions in the current library and to edit them. Expressions can also be created or deleted in this way.

There are two halves to the pane. The left half is the Expressions Tree View, showing the composition of the expressions in the library.

The expressions can be grouped into folders for organizational purposes.

Just as expressions are shown as children of folders in the tree view, expressions have their own children - these are the sub-expressions that make up the compound expression. The icon next to each item indicates the type of expression, either a compound or primitive.

Functionality

When an expression is selected, it can be edited in the right half of the pane. The controls available for editting this expression depend on its type. If the expression is a morph target, there is no ability to edit it - it is fully determined by the model asset file.

For a bone or attachment expression, there is an edit box for specifying the bone or attachment to manipulate, and a series of controls for specifying how much to move/rotate the object for each axis. Angles are in degrees.

In the case of compound expressions, the pane shows a small window for each sub-expression, along with a curve that maps the input display value to the display value for that child.

This curve can be either linear or a spline. If it is linear, the only way to edit it is to change the slope of the line.

This can be done by right clicking and selecting change weight.

If the curve is a spline, then it can be editted using the mouse. The spline is determined by placing control points.

A control point is shown on the spline as a small square. These points can be dragged around using the left mouse button.

Double clicking on a point deletes it; double clicking anywhere else on the curve creates a new control point at that position.

Above the sub-expression controls there are two sliders.

The top one is used to preview the expression, by setting the display value somewhere between -1 and +1. The bottom slider is used to set the balance of the expression in the Preview Pane.

Above the sliders there is a toolbar. This toolbar shows the value of the slider as a numerical value.

There is a play button that allows the preview to continue in real-time.

The three buttons on the right can be used to set the preview value to minimum, maximum or zero.

Expressions can be dragged from their current position to another position in the tree.

This will have the effect of adding the expression as a child of the target expression. However it will also remain in its previous position - there will now be an additional reference to it in the library.

Expressions can also be dragged from this pane to the Sequence Pane to add new expression channels to the sequence.

Expressions Tree View

Lists expressions that have been assembled into an expression library.

Within this view the user can define the existing morphs in the character and compose them into expressions using a right click menu interface (below).


New Folder Create a new folder.
New Expression In this case the user is given the option of adding the existing expression as a child of the selected one.
New Bone Control In this case the user is given the option of adding the existing expression as a child of the selected one.
New Attachment Control In this case the user is given the option of adding the existing expression as a child of the selected one.
Rename Rename an expression or folder.
Copy Copy an expression.
Paste Paste an expression.
Remove Remove expression or folder.
Curves Tab

Curves tab allows the user to control how multiple shapes will blend when the expression transitions from minimum amplitude to full amplitude.


Expression Value: Time value from -1.0 to 1.0.


Toggles play button to start at -1.0 (off) or from 0 only (on).


Fixed Value Button: Set slider position to 0.


Fixed Value Button: Set slider position to -1.


Fixed Value Button: Set slider position to +1.

Expression Preview Slider: Top slider sets expression from -1.0 to 1.0.

Expression Balance Slider: Lower slider sets balance from -1.0 to 1.0.


Spline Display. Defines how morph shapes blend in over the time an expression (multiple morphs) transition from minimum amplitude to full amplitude.

Preview Tab

Unsupported

Sequence Pane

This pane is used to edit the sequence itself. It is divided into four main areas: the Sequence Tree View, the Curve Track View,Audio Track and the Sequence View Toolbars.
The Sequence pane displays all related information about the sequence from expressions, to audio and the curves/keyframes themselves.

Sequence Tree View

The left part is a tree view of the channels in the sequence. The channels are shown grouped into folders, which allow them to be logically organized. Allows the creation of a list of available expressions which can be directly animated within the sequence. These are assembled by adding shapes and expressions from the expression library into the tree view.


New Folder Create a new channel folder in the sequence. A dialog is displayed asking the user for the name of the folder to create.
Rename Folder Only appears if a folder is selected. A dialog is displayed asking the user for the new name of the folder.
Remove Remove element such as a folder or an expression.
Add Balance Adds a balance channel to the current folder. This channel will control the balance for all expressions in the same folder as it and any child folders.
Add Selected Expression Creates a new channel referring to the selected expression as a child of the selected folder.
Cleanup Keys This algorithm attempts to delete as many keys as it can without changing the shape of the curve more than a small threshold value.
Smooth Keys Function to smooth over noise. Mostly used for mocap data.
Remove Noise Function to remove noise. Mostly used for mocap data.
Add Phoneme Strength *seems to be only appearing in special cases.
Add Morph Target Vertex Drag Unsupported.
Add Procedural Animation Unsupported.
Add Layer Adds an editing layer onto the channel. See Channel Layers for more information.
Delete Layer Deletes the editing layer of the channel. See Channel Layers for more information.
Collapse Layer Commit changes made within a layer to base curves permanently. See Channel Layers for more information.
Insert Viseme Shapes This is useful for producing fast layouts of visemes for keyframed lip sync. Expressions must have "visim" as a prefix in the name.

Curve Track


Selecting a channel in the tree view causes its curves to be shown in the top part of the curve Track (selecting a folder is equivalent to selecting all of its children recursively). This control displays the splines, similarly to the sub-expression control in the Expressions Explorer Pane.

Curve Track Functionality

Curves can be edited here using the mouse. The curves are controlled by control points or keys, which appear as small squares. These can be dragged using the mouse. Double-clicking on a key deletes it, while double-clicking elsewhere on a curve creates a new key.

Multiple keys can be selected by clicking on an empty part of the control and dragging, creating a selection box. Holding down the control button allows keys to be added to the current selection set. When multiple keys are selected, they can all be dragged around at the same time.

Keys can be copied by holding down control and dragging. This creates a copy of all selected keys and begins dragging them.

Holding down the mouse wheel and dragging allows the display to be dragged around, allowing us to view different parts of the timeline.

The scale of the display can also be changed using the mouse. Scrolling the mouse wheel zooms in or out on the current position. Holding down the shift key and the mouse wheel and dragging the mouse left or right compresses or expands the time scale, while dragging up and down compresses the value axis. Effectively this allows zooming to be done on each axis independently of the other.

Above the curves there is a timeline control. This displays the time values along the time axis. Clicking on the timeline control sets the current sequence time to that position.

It also displays markers at each point on the timeline where a key exists for the currently displayed curves. These markers can be moved around and editted much like the keys can be, except that this restricts movement to the time axis (ie we cannot change the values of the keys), and each marker controls all the keys at that point on the timeline simultaneously.

The markers are also color-coded based on the number of keys at that point in time. A green color indicates that few of the channels in the sequence have keys at that position, while a red color indicates the opposite. Note that this color is determined by reference to all the channels in the sequence, rather than just the visible ones. This functionality allows the user to see whether a key is part of a major pose in the sequence, or whether the key is relatively unrelated to the positions of other keys.

The bottom part of the pane shows the waveform of the current sound, if one is loaded. This can be used to see critical parts of the sound in order to match up movements appropriately.

At the far bottom the current phonemes are displayed. These are usually generated by extracting them from the loaded sound (by right-clicking on the wave control). Once this has been done, however, the phonemes can be edited to improve the overall quality.

Curve Track - Key Bar (highlighted in red below)

The key bar displays any keys within the selected track which can be manipulated in the same way as in the main curve view, though locked to the horizontal axis. This is useful for scaling time of a group of keys without accidentally altering amplitude.

Curve Track - Amplitude (highlighted in red below)

Amplitude displays the entire range accessible for a particular expression or joystick control. Though depending on actual setup ranges below zero may not necessarily have any effect.

Curve Track - Curve Display (highlighted in red below)

The curve display shows both the curve of the selected track as well as the keys themselves.

Audio Track

Audio Track - Right Click Menu

Lip Sync With Text Opens dialogue where text can be entered which matches the spoken audio and will generate an appropriate list of phonemes. If left empty the plugin does it's best to guess the phonemes necessary.
Remove Sound Removes wav file from sound track.

Audio Track- Label Bar (highlighted in red below)

Labels the wav and lip sync portions of the audio track.

Audio Track - Lip Sync Bar (highlighted in red below)

The lip sync bar displays the morphs which have been added through a referenced recording list, or through the “lip sync with text” option. The bar is split into 2 sections. The upper section stores the words that may have been entered to guide the lip synch extraction process and the lower half shows the phonemes that have been used to create the extracted lip synch.

Audio Track - Wav Display (highlighted in red below)

Displays wav files added to the sequence in graphical form as well as the file name and it’s location on disk.

Sequence View Toolbars


Play Sequence – Plays the sequence


Stop Sequence – Stops playback of the sequence


Facial Sequence Properties – Displays start and end times of the sequence or enables Current Sequence Time – shows current sequence time.


Current Frame No – Shows frame number at current time.


Playback Speed – Shows current playback speed in percent.
Animate Skeleton – Plays back selected animation on the character.
Sequence Camera – Plays back camera animation loaded from a “sequence object” saved from a cinematic in trackview.
Overlap Sounds – Allows sounds to overlap when they have been placed in an overlapping fashion. When it is off, sounds are trimmed when a new sound begins to play.


Key All – Creates key for every track selected in tree view.


Zero All – Sets keys for selected tracks in tree view to 0 amplitude.


Amplitude – Adjusts amplitude of curve for a selected range.


Smooth – Smoothes noise of selected keys. Useful for mocap.


Smooth Value – Sets the value used for the smoothing operation. Cleanup Keys – Removes keys based on user defined threshold.


Cleanup Keys Value – Sets value for cleanup operation. Remove Noise – Attempts to remove noise based on user defined threshold.


Remove Noise Value – Sets value for remove noise operation.
The key tangent settings can be manipulated using the key settings toolbar buttons (see image above). There are seven buttons that affect tangents, each of which affects the currently selected keys:


Clear all tangent settings for these keys - the key tangents will be automatically calculated.


Set the incoming (from the left) tangent to 0.


The spline stays at the value of the previous key until it gets to this key.


The incoming (from the left) tangent will be linear to the previous key. If the previous key has a linear out tangent then the line between the two keys will be straight.


Set the outgoing (to the right) tangent to 0.


The outgoing (to the right) part of the curve will be a step - ie the spline will stay at the value of this key until it reaches the next key.


The outgoing (to the right) tangent will be linear to the next key. If the next key has a linear in tangent then the line between the two keys will be straight.


Zoom Extents horizontal


Zoom Extents vertical


Grid snap horizontal


Grid snap vertical

Channel Layers

When dealing with curves that have many keys, such as motion captured data, normal key-frame animation becomes very unwieldy. To help alleviate this situation, animators can make use of channel layers.

A channel layer basically freezes all the keys in the curve and allows the animator to create a new set of keys. These new keys control a new spline that gets added to the underlying data. By doing this, the animator can offset large numbers of keys quickly and intuitively. Once he is done, the layer can be collapsed, which removes the layer and updates all the keys to hold the new values.

Joystick Pane


Joysticks are user defined 2d controllers with a single manipulator that can be assigned to multiple morphs, expressions or other shapes in order to animate them in a graphical way – much like moving a physical joystick.

The Joystick pane is where the user can start assembling joysticks and wire them up to morphs, expressions or visemes that have been made available in the sequence view.


Toggle edit mode to resize or move joysticks in the view.
Toggle create key mode, when a controller is moved a key is automatically created.


Key all joystick tracks.


Zero amplitude of all joysticks.

Joystick Right Click Menu

Joystick Right Click (no expression selected in tree view

Set Joystick Color Alters color of joystick.
Delete Joystick Removes the joystick permanently.
Joystick Properties Views properties page of joystick.

Joystick Right Click (expression selected in tree view

Set Joystick Color Alters color of joystick.
Set Horizontal Joystick Channel Assigns selected expression in tree view to the horizontal channel of joystick control.
Set Vertical Joystick Channel Assigns selected expression in tree view to the vertical channel of joystick control.
Flip Vertical Channel Inverts the control of the Vertical axis.
Flip Horizontal Channel Reverses the control of the horizontal axis.
Delete Joystick Removes the joystick permanently.
Joystick Properties Views properties page of joystick.

Joystick Properties

X Channel displays the expression assigned to the X channel.
Y Channel displays the expression assigned to the Y channel.
Flipped Checkbox Inverts the X or Y channel.
X Scale Scales X component upon import.
Y Scale Scales Y component upon import.
Offset Offsets X or Y component upon import.

Facial Editor Main Menu

The following section describes each pull down menu option and its function within the facial editor.

Project

Note: The project management facilities provided here have not been maintained recently.

Open
Open project.
Save
Save project.
Save As
Save project and specify name/location.

Edit

Redo
Redo operation after undo

Expressions Library

Open
Then the user will be shown an open dialog to select the file to open.
Save
Save expression library.
Save As
The editor will continue to display the previous document. This may change in the future.
Export Selected Expressions
These expressions can then be imported into a different library. The user will be prompted for the filename of the library to export to.
Import Expressions
Batch Update With Selected Expressions
Files should be checked out by the user in Perforce, if necessary, before this operation is performed.
Morph Check
Display a list of all morphs that are referenced in the expression library that are missing in the currently loaded character.

Character

Sequence

Open
He will then be shown an open dialog to pick the sequence file to open.
Save
Save sequence.
Save As
The editor will continue to display the previous document. This may change in the future.
Load Sound
The sound will then be associated with the sequence and used for any subsequent lip-synching operations.
Load Skeleton Animation
The skeleton animation will then be associated with the sequence when it is saved.
Batch Apply Expression
Unsupported.
Export Selected Expressions
The user will be prompted for the filename of the new sequence. If any channel folders are selected, their children will be exported as well.
Import Expressions
If a channel exists in the current sequence, the user will be asked whether he wants to overwrite it or keep the current one.
Batch Update With Selected Expressions
Open a series of sequences and merge the channels that are currently selected in the sequence dialog into each one, replacing the channels if they already exist.
Load Video Extracted Sequence
Load a text file generated by the FaceAnim utility, used for motion capture of an actors face. Both curves and video are imported.
Load Video (Ignore Sequence)
Load a text file generated by the FaceAnim utility used for motion capture of an actors face, but ignore the motion data and loads the video only.
Load Group File
This can then be imported into a facial sequence for use in the Facial Editor.

Joysticks

Open
Open joystick file.
Save
Save joystick file.
Save As
Save joystick file and specify name/location.
Create Expression From Current Positions
Take the expression currently being shown on the character, as defined by the joysticks, and create an entry in the expression library that captures it.

Lip Sync

Batch Process Directory
Batch processes a directory of audio, into fsq files using the same name as the audio file itself.

Facial Editor Use Reference

backtoREF-Index

Overview

This Document describes the initial process of setting up a head in the Facial Editor, and defining its expressions. Furthermore it describes the setup of a Joystick-setup to make animating it more convenient.

Setting up the Head

Loading the Character

When you first load your character into the Facial Editor by using the Character > Load command in the main command bar of the Facial Editor.


In the Effectors Sliders view there should only be the basic morphs visible which have been exported from your 3d package.


In this case we have two different morphs; Brow_lowerer, and Jaw_dropper_01.

It doesn’t matter if you load a head character only, or if you load a cdf-file which has a head character attached to it as a skin attachment.

Creating the Expression Library

Also in the Expression Explorer view, the two available morphs are listed. In the top bar of the Expression Explorer, you can notice that there is already a name for an Expression Library file set, which is automatically named after the loaded character. Mind that this file is only existing in memory by now, and still needs to be saved to your hard drive. This could be done from the main toolbar under Expression Library> Save as


To keep the structure of the library clean, we can organize the different expressions into folders. To create one, right-click the “root”-folder, which is created by default for every character and chose “New Folder”.



Enter the desired name in the text-box that opens and hit “OK”.

Right-clicking the newly created folder, gives you the option to create a new expression.

Type in a name for it and hit “OK”. This creates an empty container which will keep the morphs which should be part of it.

In order to add morphs which define the expression, we switch over to the effectors slider view, and set the sliders of the morph-targets we want to have an influence to the appropriate value. To start from scratch, you can hit the “Clear All” button in the main bar of the sliders view.

Once done, you right-click on the new expression in the Expression Library view, select “initialize from sliders” and confirm the following dialog by selecting “Yes”. This adds the morphs which have a value set other than zero under the expression node.

On the right side of the expression library view, a curve is created for each of the morphs which have been added to the expression while initializing it. The displayed weight curves visualize how strong each morph contributes to the resulting shape of the character.

Right-clicking the curve lets you change the weight of the curves or switch them to non-linear or “spline-based” interpolation. Spline-interpolation gives you the ability to add keys to the curve and change their influence throughout the range of the assembled expression. With this you can simulate non-linear morph mixing, by adding “intermediate” morph-targets and reduces the need to have each morph represented as a single curve in the sequence view.

The purple line represents the “zero” value when the expression is animated in the sequence view later on, going up to “1” on the right side or “-1” to the left. In the example shown above, the “jaw_dropper_01” would have its strongest influence at a keyed value of “0.5” in the sequence view, going back to about 50% when the expression has a keyed value of “1”.

Once you are done with creating all the different expressions you need for your character, you can save the expression library.

To make sure the expression library is loaded correctly next time you use this character, a cal file can be used to define the correct library for each head.

The cal-file for each head needs to be saved to the same folder where the head character is located. It only contains the relative path from your game directory to the Expression library-file.

head.cal: $facelib = objects/characters/human_male/sdk_example_head.fxl

The Sequence View

The sequence view also offers the same functionality to organize your expressions similar to the Expression Library by creating sub-folders, where the different nodes can be placed in. It also shows the “root”-folder by default under which all subsequent folders are created by right-clicking it, and choosing the “New Folder” command.

By highlighting an expression in the Expression Library view, and then right-clicking on one of the folders in the sequence-view, you can use the “Add Selected Expression”-command to add it to this folder.

Now you can start animating the expressions you added by placing keys on its curve, either by double-clicking it, or by using the “R”-shortcut, to place a key at the time-slider position. The structure and animated curves in the sequence view are saved together in the sequence file. Do this by going to Sequence save as, in the main toolbar of the Facial Editor.

The Facial editor also supports bone-driven animations. If the character cdf has bones for head or eye rotation, you can also set them up in the Facial Editor to be controlled and animated through curves and joysticks.

To do that go to the Expression Library, and right-click a folder to create a “New Bone Control”.

When you highlight the newly created bone control, you can see its options on the right side of the expression library view. In the drop down-list beside “Attachment/Bone” you can chose which bone to control with the expression. In the position and rotation settings below you can define an offset for an attachment and the axis and its limits about which the expression can rotate the bone.

Joystick Setup

Another convenient method of animating expressions is by using joysticks. After you added expressions to the sequence view, you can go over to the Joysticks view, and setup joysticks to control their values. Turning on “Edit Layout” in the upper Left corner of the view brings you into edit-mode so you can create new controls by right-clicking in an empty area. While you are in “Edit Layout” mode you can change the shape of the templates by dragging on its sides or corners and arrange them freely in the view. Right-clicking on the template gives you various options to farther change the appearance of the controller like its name, or color i.e.

To activate the joystick, highlight the expression which should be driven by it in the sequence view, right-click on the empty template in the joystick view and select “Set Horizontal/Vertical Joystick Channel” to define which axis should animate the expression.

Now if you move the small white circle a key is automatically set at the current location of the time-slider. Be aware that this also works when you hit the play button, or the spacebar, which could be used to do a quick mouse movement capture session. Slowing down the playback speed can help with that.

After you saved the joystick setup from the main toolbar under joysticks >save as, make sure you also save the sequence, because the joystick-setup-file is referred in the sequence file so that the connections to the expressions in the sequence view are maintained.

This concludes the basic requirements to set up a head for facial animation. To be able to re-use already done expression libraries, or joystick-files and sequences, it is advisable to keep the naming convention for the morphs the same for all your head characters.


Facial Editor Menus and Options Reference

backtoREF-Index

Overview

The following sections document the Facial Editor, its functions and views.

Menus


The following section describes each pull down menu option and its function within the facial editor.

Project

Edit

Expressions Library

Character

Sequence

Joysticks

Lip Sync

Views

Preview Options


Preview Options contain a list of functions from debug display modes to general display options.

Effectors Sliders

Expressions Explorer

Sequence View

Sequence view displays all related information about the sequence from expressions, to audio and the curves/keyframes themselves.

Sequence View Toolbars



Play Sequence – Plays the sequence


Stop Sequence – Stops playback of the sequence


Facial Sequence Properties – Displays start and end times of the sequence or enables


Current Sequence Time – shows current sequence time.


Current Frame No – Shows frame number at current time.


Playback Speed – Shows current playback speed in percent.


Animate Skeleton – Plays back selected animation on the character.


Sequence Camera – Plays back camera animation loaded from a “sequence object” saved from a cinematic in trackview.


Overlap Sounds – Allows sounds to overlap when they have been placed in an overlapping fashion. When it is off, sounds are trimmed when a new sound begins to play.



Key All – Creates key for every track selected in tree view.


Zero All – Sets keys for selected tracks in tree view to 0 amplitude.


Amplitude – Adjusts amplitude of curve for a selected range.


Smooth – Smoothes noise of selected keys. Useful for mocap.


Smooth Value – Sets the value used for the smoothing operation.


Cleanup Keys – Removes keys based on user defined threshold.


Cleanup Keys Value – Sets value for cleanup operation.


Remove Noise – Attempts to remove noise based on user defined threshold.


Remove Noise Value – Sets value for remove noise operation.



Reset all tangent settings.


Set the incoming tangent to 0.


The spline evaluates to a constant value until it gets to this key.


Allow the spline not to be smooth as it reaches this key.


Set the outgoing tangent to 0.


The spline evaluates to a constant value after this key.


Allow the spline not to be smooth as it leaves this key.


Zoom Extents horizontal


Zoom Extents vertical


Grid snap horizontal


Grid snap vertical

Joysticks View

Joysticks are user defined 2d controllers with a single manipulator that can be assigned to multiple morphs, expressions or other shapes in order to animate them in a graphical way – much like moving a physical joystick.

The Joystick view is where the user can start assembling joysticks and wire them up to morphs, expressions or visemes that have been made available in the sequence view.


Toggle edit mode to resize or move joysticks in the view.
Toggle create key mode, when a controller is moved a key is automatically created.


Key all joystick tracks.


Zero amplitude of all joysticks.

Joystick Right Click Menu

Create Joystick – Creates a basic joystick without any active connections.

Joystick Right Click (no expression selected in tree view)

Edit Joystick Name
Renames joystick.
Set Joystick Color
Alters color of joystick.
Delete Joystick
Removes the joystick permanently.
Joystick Properties
Views properties page of joystick.

Joystick Right Click (expression selected in tree view)

Edit Joystick Name
Renames joystick.
Set Joystick Color
Alters color of joystick.
Set Horizontal Joystick Channel
Assigns selected expression in tree view to the horizontal channel of joystick control.
Set Vertical Joystick Channel
Assigns selected expression in tree view to the vertical channel of joystick control.
Flip Vertical Channel
Inverts the control of the Vertical axis.
Flip Horizontal Channel
Reverses the control of the horizontal axis.
Delete Joystick
Removes the joystick permanently.
Joystick Properties
Views properties page of joystick.

Joystick Properties

Channels Group

X Channel
displays the expression assigned to the X channel.
Y Channel
displays the expression assigned to the Y channel.
Flipped Checkbox
Inverts the X or Y channel.

Video Import Group

X Scale
Scales X component upon import.
Y Scale
Scales Y component upon import.
Offset
Offsets X or Y component upon import.

Video Frame

The video frame displays video loaded through the sequence menu in 2 ways. Either individual videos can be loaded using the “Load Video (Ignore Sequence)” option, or by explicitly loading both captured data (from the Faceanim tool) and video using the “Load Video Extracted Sequence” option.


Track View Editor Reference

backtoREF-Index

Animated movie sequences can be created with ease in the CryEngine2 Sandbox editor.

Overview

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.

Introduction - Key Concepts

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:

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.

Track view editor overview/elements

  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

Sequence Tool Bar - Icons and their functions

The cut scene editor has no pull down menus, although each icon does have a roll over hint to remind you what it does.
The Sequencer Tool Bar

Track view properties window


Drop down selection box for selecting which scene is to be worked on.


Add selected Node, adds a selected Entity to the track view.


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.

Playback controls

Track view Navigation

Useful shortcuts

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.

Adjusting key frames

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.

Adjusting multiple key frames

Click and drag in the empty space to group select key frames for adjusting multiple keys at a time

Zooming the timeline.

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

Duplicating keys on a track.

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.

Copy and paste functionality between two entities.

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.

Tracks and properties

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, animObject1 with multiple tracks

Position
animates the entities position in world space
Rotation
animates the entities rotation in world space
Event
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
Scale
nimates the entities scale in world space
Visibility
animates if the entity is visible or not Sound, plays a sound at the specific times, can be and effect or dialogue
Animation
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.
Camera
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


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.

Sound
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
Sequence
the sequence track is used for embedding other Track view sequences within the scene.
Console
the console track enables various console variables “CVars” to be set and adjusted over time, for example r_gamma.
Music
enables a music mood to be set.

Adding and Removing tracks on an entity

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.

Adding an additional Track

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.

Note its also possible to double click an entity in the tree view to select it.

Key Properties

.nce 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.
Tension
raising the tension increases the influence this key has over time
Continuity
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.
Bias
shifts the animation paths influence to either side of the key.
Time
indicates which time the frame occurs on in the timeline.

Look IK key properties

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.


Animation track key properties

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.

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

Sequence
input field for sequence to play.
StartTrigger
when triggered will start the scene.
StopTrigger
when triggered will stop the scene.
BreakOnStop
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.
BlendPosSpeed
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.
BlendRotSpeed,
same as above but for rotational values.
PerformBlendOut
blends the end camera position to the player position, smoothing out transition from cutscene to gameplay.

Outputs on right

Started
triggers output when the scene has started.
Done
triggers output whether the scene has finished by itself or if skipped by the user.
Finished
only triggers if scene finishes with out being interrupted by user.
Aborted
only triggers if the scene if stopped or skipped by user.

Grouping entities

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

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.

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,


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,

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,

The Track view above has an AreaTrigger “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 AreaTrigger 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 AreaTrigger’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.

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.

Cryengine 2 incorporates a system for frame by frame capturing that can later be compiled 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.

fixed_time_step

used to the lower the game speed to achieve a constant frame rate. fixed_time_step 0.0 for 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

capture_frames 1, enables capturing of frames capture_frames 0, disables capturing of frames

capture_file_format

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.

Layers

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.


The layer panel in the RollUpBar

For each cinematic first create a new external layer.

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.


Material Editor Reference

backtoREF-Index

Overview

This tutorial will show you how to use the material editor in CryENGINE®2 with all its features.

Open material editor

You can open the material editor in two different ways. Either use the editor menu or just press the M key.

To open it via the editor menu, you have to select VIEW in the menu then select the subfolder Open View Pane. There you find the material editor button.

Layout

On top of the window is the toolbar . Under the toolbar you find two further windows. The material browser on the left and the material settings on the right side.

Toolbar

You find the toolbar on top of the material window.

Create a new material

You create a new material by pressing the new item button.

Now you have to save the material into your desired folder.

You can see that the material you have created was added to the material browser.

You can also add a material by right clicking into the empty material editor space. A[add new material] option box appears where you can press the [add new material] button.

T[remove item] delete a material select it and click on the [remove item] button.

Create a new multi material

If you want to have a material with more than one material ID you have to create a multi material. To[add new multi material]create a multi material right click into the empty material editor space and press the [add new multi material] button. You now have to set the number of sub materials / material IDs you want to have. R[set number of sub materials]ght click the material you created and select [set number of sub materials]



You can set the numbers of material IDs by pressing the arrows or typing in the desired number.

Toolbar icons

In the upper left corner of the material editor you find some shortcut icons.

Material browser

In the material browser, which you can find at the left side of the material editor, you can browse all your material. In the option box above you can select which materials you want to see in the browser.

All materials for example shows all materials that are in your working folder, no matter if they are checked in or not.

Used in level shows just the materials which are used in your level.
In the material browser right click menu you can find most of the functions that can be found in the toolbar, and some perforce commands.
The functions you can find there, beside the perforce commands, are all basic commands like copy/paste/delete. They will only influence the selected material.

Material settings window

You can find the material settings of a selected material on the right side of the material editor next to the material browser. On top of the material settings window you can see a preview window for each material ID / sub material. You can open the setting menus by clicking on them.

Material settings

Mat_wood:

Mat_metal:

Opacity settings

These settings are important if you use alpha channels for transparency, like leaves and wire fences, for example.

Opacity: With the opacity value you can switch between alpha blend and alpha test.

<EMIT </img>

Opacity value: 0-99 -> alpha blend Opacity value : 100 -> alpha test

With alpha blend you can get very soft and semi transparent results, but it is more expensive than alpha test. Here with an opacity value of 50:

If you want to use the less expansive alpha test you have to set the opacity value to 100 and the Alpha test value to 50. 50 is the default value. If you choose a value below 50 it will tend more to the white color of your alpha map. If you choose a value above 50 it will tend more to the black color of your alpha map.

Alpha test = 50 - default

Alpha test = 10 - default

Alpha test = 90 - default

Additive: If you use a semi transparent material like glass you can use the additive function. The material color will be added to the background color. The resulting color will be brighter then.

Lighting settings

In this section you set up your material color and specular settings.

Diffuse color: Here you can set up your material diffuse color by double clicking the color square. The default RGB value is 128.128.128.


You choose the color on the left side by clicking your desired color. With the slider next to it you set up the brightness. You can also type in the RGB code in the fields below. Sat. saturation / Lum. luminance

You can also use the color picker to choose your color. Therefore you have to open the color window. In the bottom right corner you find the color picker icon. Click it and chose a color in your scene.


If you are using a texture map for your material you can colorize it by changing the diffuse color, in this case with a blue color.

Specular color: The specular color is the reflecting or shining color of your material when light shines onto the object. It is some kind of simplified reflection effect. You choose the specular color the same way you choose your diffuse color. The brighter your specular color is the shinier your material will look like.

Here an example with a black (left), a grey (middle) and a white (right) specular color.

You can also colorize the reflected color by choosing a color in the color window.

Glossiness:

With glossiness you define if you want to have a sharp or a scattered specular reflection. The default value is 10. With a value <10 you will get a scattered specular reflection. With values > 10 you will get a sharp specular reflection.

Glossiness 2 (left) / Glossiness 10 (middle) / Glossiness = 20 (right)

Specular level: Specular level works like some kind of specular multiplier. The default value is 1. A value smaller than 1 would result a less strong specular reflection. A value higher than 1 would result a much stronger specular reflection.

Spec.level 0.5 (left) / Spec.level 1 (middle) / Spec.level = 5 (right)

Emissive color: The emissive color makes the material emit light. If this is used in a dark scene the material would glow in the dark (black emissive color on the left and a red color on the right side of the screenshot in the example below).

Texture maps

In the material editor you have got different slots for your texture maps to control the shader effects, depending what kind of shader you are using.

To add a texture to the material slot you have to click the folder icon on the right side or copy paste the texture path into the empty slot.

Texture map submenu / tiling, rotating, oscillating

All texture map slots have got sub menus where you control the rotation, the offset and the tiling of the texture. They work the same in all map slots.

Tiling: You can tile your texture for U and V axis separately by using die arrow button, the slider or the text field. Here a texture with a tiling of 1,1 a tiling of 5,5



and finally a tiling of 1,3


Offset: You can move the texture on the model in the U and V direction separately. In the example below the texture is moved 1.32 in U and 2.17 in V direction.


Rotate: You can rotate the texture on a model in U and V direction separately. In the example below the texture is rotated about 45 degree into U and V direction.


Rotator: With the rotator you are able to create a rotating/shifting texture animation. You can choose between three different types of rotation by clicking the option box.

No change: If you choose this type the rotator is deactivated.
Fixed rotation : Fixed rotation is a static rotation, no animation. It is similar to the rotation function of the tiling menu.

Constant rotation: The rotation will be constant rotating/shifting in one direction and back.

Oscillated rotation: The rotation will be oscillating from the minimum to the maximum and back.

If you have chosen your rotation type you can control its behavior by adjusting rate / phase / amplitude separately for U/V.

Rate: Rate or frequency defines the number of complete rotation cycles per unit of time. Or in case of oscillating rotation it defines the rate of change of direction.

Phase: The phase of an oscillation or wave is the fraction of a complete cycle corresponding to an offset in the displacement from a specified reference point at time t = 0.

Amplitude: The amplitude defines the maximum value of your oscillation/wave.

Oscillator: Like the rotator, you can animate your texture. You can choose between different types of oscillation.

Fixed moving : Fixed moving is a static oscillation, no animation.

Constant moving: The texture will be shifted endlessly in the adjusted direction.

Jitter moving: The texture will be shifted endlessly in the adjusted direction with jittering added. It will have some kind of stroboscope effect.

Pen moving: The texture will be shifted in the adjusted direction until the maximum amplidude is reached and back until the minimum amplidute is reached. It is comparable to a pendulum movement.

Stretch moving: It is comparable to pen moving with the difference that the texture will be stretched and not shifted to the adjusted direction until the maximum amplitude is reached and back until the minimum amplitude is reached.

Stretch-Repeat moving: It is comparable to stretch moving with the difference that the texture stretching restarts at 0 when the maximum amplitude is reached.

The rotator and oscillator functions are only available for diffuse and decal textures because of technical limitations! You can create a lot of cool effects like animated glow by using the decal slot. It will be explained a bit later.

Specular map

Specular maps represent the specular intensity and color of material highlights. It defines the "shinyness" and color of specular reflections. The brighter the specular map is the, more shiny is the resulting material.

You can use both, black/white and colored specular maps.

Bump map

Bump mapping adds an illusion of depth to your material. There for you need a grayscale texture map. The darker the bump map the more distinctive is the illusion of depth.

Normal map

Normal maps define the direction of normals on a surface. The normal direction for each pixel of your texture is stored in the RGB color normal map. You can create a normal map in two different ways. You can convert a bump map into a normal map or calculate the normal map out of a highpoly mesh.

grayscale bump map: converted normalmap with Nvidia Photoshop plugin:

Environment Map

To make a material reflective we need an environment map or cubemap.

To activate the environment map you have to set the flag in the “shader generation params”.

For the ilum shader the flag is called “Specular EnvCM ”.

For the metal shader it says “environment map”.

If you set the flag and added a cubemap to the “environment map” slot You can adjust the environment map by using the “shader params”.

Reflection Amount: The reflection amount defines the intensity of your reflection.

Fresnel scale and Fresnel bias: Both parameters affect the reflection. It is simulating a realistic reflection depending on the view angel of the camera. The flatter the angle the more intense the reflection is.

Teapot rendered in CryENGINE®2 without environment map.

Teapot rendered with environment map

Teapot rendered with environment map, combined with a normal map.

Detail map

Detail mapping allows us to add more detail to surfaces. It works like a second material layer and it is not affected by the mapping of the model it is used for.

We can use any tileable RGB texture as a detail map.

You can easily tile the detail map by using the “tileU/V” function in the sub menu. All other texture maps stay as they are if you adjust the tiling of the detailmap.

Detail bump map

Detail bump maps are similar to detail maps with the difference, that they add depth to your material. Detail bump maps are, like normal maps, affected by light.

To use a detail bump map add a tileable normal map to the detail map channel and set the “detail bump map” flag in the “shader generation params”.



You can adjust the detail bump map settings in the “shader params”.

As detail maps, you can tile detail bump maps.

Detail bump scale defines the bump intensity.

Decal

The decal slot has different functions depending what kind of shader you are using. It is working with Ilum / Metal / Cloth shader.

Decal for Ilum and metal shader:

For metal and ilum shader it is linked to the glow feature. You can use it to add animated glow to your material without touching the diffuse map. First you have to add a glow texture to the decal slot in the material editor.


You have to add a glow amount value to make the effect visible. Now you can see the glow texture on your model. You can use both, black/white and color glow textures.


You can also animate the glow texture. Therefore you need to set up the oscillator in the decal slot sub menu.

To make the decal glow texture visible on just some specific areas, you have to paint an alpha map for it. Save the alphamap in the alphachannel of the diffuse map.White will represente the area where the glow will be visible, black will hide the glow. Here an example. The area where the glow is visible is controled by a texture stored in the alphachannel of the diffusemap:

Decal for cloth shader

In combination with the cloth shader you occlude or illuminate your model by using an occlusion map as a decal. You can also add dirt to cloths for example. You can use any RGB texture. It will be blended into your diffuse map with a mode that is almost comparable to photoshop’s hard light blend mode.

Without decal assigned with decal assigned

The decal you use will be tiled the same way as the diffuse map is tiled. If you change the tiling of the diffuse map you also change the decal tiling.

Opacity

The opacity function is not working at the moment.

Shader params

Here you can set up all CryENGINE®2 shaders.


You can adjust, depending on what kind of shader you are using, different things like:

Shader generation params


In the Shader generation params menu you can de/active all features a shader offers. In the screenshot you can see all ilum shader features. These are the default shader features, there will be some features added depending on what kind of shader you are using. You can adjust the activated shader in the Shader params menu.

Gloss map DifAlpha

It is quite the same as a specular map with the difference, that the texture is stored in the alpha channel of the diffuse map. You can only use grayscale textures. To activate the “ Alpha channel gloss map ” set the flag in the Shader generation params.

Specular Env Cubemap

See "environment map"

Per Pixel spec shinies

Very often you have got different types of materials on one texture, especially in case of character textures. In this case we have got metal and cloth on one texture sheet. “Per Pixel shines” offers the opportunity to add different glossiness values to our material. Cloth normally has other glossiness attributes than metal. But if you have both materials on your texture sheet it is often very difficult to make both materials look good just by tweaking the specular map. We can use a map in the alpha channel of the specularmap to control the glossiness value. The darker the color the smaller is the glossiness value. A gray color represents a glossiness value of ~10. It is very important that you don’t use RGB 255.255.255 white and RGB 0.0.0 black in this map, this is not possible because of technical reasons and would break the material.

On the left side is the specular map with a simple glossiness intensity map in the alpha channel (right). The darker color below means that this part will have a smaller glossiness value than the part above.


To activate the “Per Pixel Spec Shinies” function you have to set the flag in the “Shader Generation Params”


The left picture above shows the material without “Per Pixel Shinies” activated”. The right one shows it with the activated function. You can see that the cloth glossiness value is lower and the specular reflection is much wider in this area, because the value set for this area is darker than the metal area.

Disable rain layer

You can disable the rain layer for your material by setting the flag.

Glow in Diffuse Alpha

It is comparable with “Gloss in Diff Alpha”. In this case the glow map is stored in the alpha channel of the diffuse map. Save your diffuse map with a grayscale glow map in the alpha channel and set the flag in the “Shader generation params” to activate this function.


You can adjust the intensity in the material settings with the “ glow amount ” slider.

Detail bump mapping

See "detail bump map"

Offset bump mapping


Offset bump mapping is a combination of bump mapping and normal mapping. You can get a better depth effect than with normal mapping. You need a normalmap and a heightmap. The heightmap has to be stored in the alphachannel of the normalmap. To activate offset bumpmapping set the flag in the “shader generation params menu”. To adjust the displacement effect use the OBM Displacement slider in the “shader params menu”.

Hightmap has to be in the alphachannel of the normalmap.

Here you can see a normalmap with the heightmap. The dark areas in the heightmap represent the deep areas in the material.

On the left side you see a material without offset mapping and on the left side a material with offset mapping.

Vertex colors


You can display the exported vertex colors of your model by activating this function. You can fake ambient occlusion by using vertex colors, or just add a bit more depth and contrast to your model. Vertex colors have to be added to your model in 3dsMax or any other modeling tool.

Here a model in max colored just with vertexcolors, no texture assigned.

An example of an object with vertex colors activated:

You can use vertex colors to make the areas in the corners much darker. So you get a pretty fast and cheep ambient occlusion fake especially if you are using tilable textures and you can not paint shadows and light into your texture. You can also bake a light into the vertex color of your object in max.

Decal

You activate this function if you use a decal. Decals planes are normally placed very close to other geometry. If you activate “decal” you avoid typical problems when faces are close to each other like flickering and z-fighting. The decal position will be adjusted and the render priority will be changed. In the picture below rust was added to a wall with a decal.

Parallax occlusion mapping

Parallax occlusion mapping is an advanced version of offset mapping. It is also more expensive.

To use parallax occlusion mapping you need to do exactly the same things you have to do to use offset mapping. You need a normal map with a hight map in the alpha channel. The only difference is that you have to set another flag in the “Shader Generation Params”.


Here you can also adjust the parallax occlusion effect. POM displacement sets the intensity of the POM effect. Self shadow strength sets the brightness of the shadows.

Parallax occlusion mapping works fine on flat surfaces like terrain and walls for example.

Vertex Deformation


The “Vertex Deformation” function offers the opportunity to influence geometry. You can choose between different types, each of them will deform your model in a different way.


You can adjust the vertex deformation separately for the x and y axis.

Wave length x/y: This value sets the wave length of the wave the deformation is based on. A good default value for the wave length is 1.

On the left side you can see a deformed sphere with a wave length of 0.01. On the right side you can see a deformed sphere with a wave length of 1.

You maybe have to play around with the settings a bit, to get the desired result.

Material Layers

You can add different layers to your material in this menu.

Frozen layer: Frozen layer that is used in Ice levels. Your object will have snow on top and frost on the sides. It is normaly used for static objects. If an object is rotating, the layer won’t rotate and the snow will always face into Z-direction.

Dynamic frozen: Frozen layer for dynamic objects. Snow will no always face in positive Z-direction. If an object is rotating, the layer will rotate as well.

Wet layer: Will add an animated texture to your model that fakes water dripping on the model.

Cloak layer: Will activate the nanosuit cloak effect for the object.

Example of an object with wet layer assigned:


Particle Editor Reference

backtoREF-Index

Overview

The Particle Editor can be found in the Database View/Particles tab.

You can use the Particle Editor to create particle effects and tweak their parameters, but also manage and store them.

In order to use a particle effect you can either drag and drop an effect into the perspective view or you assign the effect to a selected particle entity. This entity determines the basic location, angle, scale, and or link information with other entities.

User Interface Overview


Properties


Save
If you save the level the particle library is saved as well, a faster method is using this save button
Add
Creates a new library
Delete
Removes the currently selected library. You need to manually delete it from the hard drive if you want to permanently remove it.
Library Selection
Allows you to select an available library
Reload
Reloads the current library

Clone Item
Clones the currently selected entry
Remove Item
Deletes the currently selected entry
Reload Item
Reloads the currently selected entry
Assign To Selected
Assigns the selected entry to the currently selected level object
Find Selected in Library
Finds the currently selected level object within the library

Remove Sub Effect
Removes the selected sub effect.
Enable/Disable All Sub Effects
Enables or Disables all sub effects from the selected (sub-) effect.

Editing Concepts

Base Parameters

Besides the input of the base value, most numeric parameters can be randomized and varied through extra values. They allow random variation and evolution over particle and/or emitter lifetime.

To access the variation controls, click on the expand (+) widget next to the value. When closed, this widget is colored if any variation values are non-default.

A variable parameter can have the following components:

Base value:
This is also the maximum value the parameter can be (any variations only reduce this value).
Var Random:
This is the maximum fractional amount that the Base value will randomly reduce by.
Var Emitter Life:
A spline curve that modifies the Base value of a particle or emitter parameter over the Emitter's life time. This only works for emitter's with finite (non-zero) lifetime.
Var Particle Life:
A spline curve that modifies the Base value of a particle parameter over the Particle's life time. This only works for particle's with finite (non-zero) lifetime.

Control Curve

You have the following controls to edit some of the control curves

Moving a point
Left-click on a point and drag it around
Changing a point's tangents
Select the point and press Space This toggles the spline tangents at that point between continuous and non-continuous. Continuous tangents move more smoothly through a point (ease in/out), while non-continuous tangents are more abrupt. To make a given spline segment completely linear, set both end-points to non-continuous.
Deleting a point
Double-click an existing point, or select it and press Delete

Color Parameters

The Color parameter works a little differently

Random Var
Is a percentage value that varies the Base Color, separately in each component.
Life Curves
are color curves that multiply the Base Color. Thus, they don't show the resultant color directly (unless the base color is white). They are edited with a color gradient control.
Moving a point in time
Left-click on a point and drag it around
Editing a point's color
Double-click the existing point
Changing a point's tangents
Right-click on the point to toggle the tangents between continuous and non-continuous
Deleting a point
Select the point and press Delete

Child Effects

An effect can have any number of child effects, created and shown in the Item View as nested sub-effects. They can be nested to any level. There are 2 kinds of child effects:

Particle effect creation Workflow

Like many other elements in Cryengine2, particle effect data is saved in a Library file (xml). Default place to put it is game/Libs/Particles. All particle effects in game are managed in this way, and then you can find any particle effect in game in this folder. All effects are classified into each library as it looks, like water, or smoke_and_fire. The first thing you have to do is make new library, and save it in to appropriate place. After this, you add your new Groups or Items in it.

Group and Item

Every particle effects are belonging to Group. At first, you have to make new group to add new Item on your library.

Prepare Texture and apply materials

Texture is most important element of the particle effect. It is not too much to say that more than half of the weight to make effect looks great, is on the quality of texture

Edit Parameters

After you set texture to the new item, then next you tweak parameters. If you intend some problem which more easy to solve on texture at this time, don't hesitate to back to texture editing

Implement into Game

Finally you implement your particle effect into game. You save your library and tell new effect name to someone who need it.

For most of case, your work is done at this time. But sometimes you also do implementation work by your self, like put emitter on to scene and link it to asset, or control it by the Flow Graph, or Track View. Also you can setup Material Effect to tell the engine a correct bullet impact effect depends on hit point’s material, or make full screen effect on Flow Graph and implement it into particle effect. You can use Entity Library tab on Database View, to implement effect into any props in game, or Vehicle Editor to implement into any event of the vehicle, like trail or damage effects.

Toolbar Buttons

Library editing functions

Load Library
Open the browser and pick up the particle library you want to open.
Save Modified Libraries
Save On-Memory Libraries to the disk. This button saves whole libraries on memory if there are any changes, not only the current one.
Add Library
Add new library. New library is remaining until close the editor. If you want to keep it, use Save Modified Libraries before you close the editor.
Remove Library
Remove current library. A warning will pop up. It doesn’t remove the library file from the disc, just remove current library from on-memory library list. If you want to redo the edit of current library without restarting editor, then you can remove library at once and open it again.
Library Selector
Select the current library from on-memory library list.
Reload Library
Reload current library. A warning will pop up. If you want to redo the edit of current library without restarting editor, then you can reload library.

Item editing functions

Add New Item
Add new item on current library. New Particle Name window will pop up, to set group name and item name.
Clone Library Item
Clone current item and all of sub items, and then put it to the clip board.
Remove Item
Remove current item. A warning will pop up. It doesn’t change the actual library file on disc, just remove item from on-memory current library.
Assign Item to Selected Objects
Assign current item to the selected items on the scene. Only work when you selecting a top node of the each item in the Item View .
Get Material From Selection
Sort material from selected item on the scene, and make it current on the particle editor. Only work when selected item correctly has a particle parameter.
Reload Item
The button name is Reload Item, but its reload current library currently. A warning will pop up. If you want to redo the edit of current library without restarting editor, then you can reload library.
Copy Item
Copy current item and all of sub items, and then put it to the clip board.
Paste Item
Paste items on clip board to the selected item.
Add Sub Effect
Add a sub (child) item to the selected item. New effect item will created, which totally set as the default value to all of the parameters.
Remove Sub Effect
Remove current item and all of sub items at once.
Enable/Disable All Sub Effects
Toggles enable and disable on current item and all of sub items at once.

Item View

Overview

In the Item view you can access and organize your particle effects.

Right Click Menu

Cut
Cut current item and all of sub items, and then put it to the clip board.
Copy
Copy current item and all of sub items, and then put it to the clip board.
Paste
Paste items on clip board to the selected item.
Clone
Clone current item and all of sub items, and then put it to the clip board.
Rename
Rename current item.
Delete
Delete current item and all of sub items.
Enable/Disable All
Toggles enable and disable on current item and all of sub items at once.
Assign To Selected Objects
Assign current item to the selected items on the scene. Only work when you selecting a top node of the each item in the Item View.

Preview Window

Overview

Positioned at the left bottom place. This can preview each item separately, by just make it current.
known problems

Emitter Tab

Overview

Parameters in this tab control the emitting situation of the particle.

Functions

Enabled
Toggles enable/disable current item.
Continuous
If false, all particles are emitted at once. If true, particles are emitted gradually in duration of Emitter Life Time . Once all particles have been emitted, particles continue to emit, maintaining amount number of particles at all times.
Count
Control the total number of particles on current item. When Continuous is on, work as total numbers of particle at any frame.
Var Random
Adds some random value (0-1, 1 means 100%).
Var Emitter Life
Applies additional life time curve in duration of Emitter Life Time.
Emitter Life Time
Specifies a time limit on emitter life if have any value (1 means 1 sec), or infinite life time if 0. Does not apply to non-Continuous effects , which are always disappear as soon as they emit their particles.
Var Random :
Adds some random value (0-1, 1 means 100%).
Spawn Delay
Add some delay time to the start of the spawning of current item.
Var Random
Adds some random value (0-1, 1 means 100%).
Pulse Period
Set interval duration of restarting emitter. If the Emitter Life Time set to 1 and Pulse Period set to 0.2, then this item will restart 5 times in its life time.
Var Random
Adds some random value (0-1, 1 means 100%).
Particle Life Time
Set life time to individual particles. Even the emitter expire its life time, spawned particles live out their life time.
Var Random :
Adds some random value (0-1, 1 means 100%).
Var Emitter Life :
Applies additional life time curve in duration of Emitter Life Time.
Remain While Visible
When it’s on, force the current item to visible until they finish every life time events, if the camera is in the bounding box of the current item. There are some parameters which decrease particles to optimize performance. When it’s on, current item ignores these parameters.

Appearance Tab

Overview

Parameters in this tab control the basic appearance of the particle. Should be tweak at first, because this tab also including Texture, which is the most important parameter, generally used in almost all of particles.

Functions

Facing

Applies only to 2D particles, Determine how the sprite is oriented in space. Texture orientation is further modified by rotation parameters.

Orient to Velocity

Forces Texture X axis aligned to direction of movement. Rotation parameters can rotate it further.

Blend Type

Apply only to 2D particles. Determine how the texture blended on to the sprite.

Texture

Browse and chose texture to use on current item. Display preview of the texture when the mouse cursor is over the input box.

Texture Tiling

Controls multiple usages of the multiple images (tiles) per texture, for variation or animation.

Material
Browse and chose material to use on current item.
Geometry
Browse and chose 3D object to use on current item.
Geometry In Pieces
If true, and the Geometry asset contains multiple sub-objects, then the geometry will be emitted in split-up pieces, one set per particle Count , originating at each piece's location in the asset. If false, each particle will use the entire geometry (all sub-objects together).
Soft Particle
Apply a rendering technique that softens the intersection between sprites and nearby objects, to prevent unnatural seams.
Ocean Particle
For particles spawned on or near the ocean surface, uses a rendering technique that softens the intersection with the ocean.

Lighting Tab

Overview

Parameters in this tab control the lighting of the sprite.

Functions

Alpha

Control the alpha value of the sprite, in addition to texture’s alpha value.

Var Random Adds some random value (0-1, 1 means 100%).

Var Emitter Life Applies additional life time curve in duration of Emitter Life Time.

Var Particle Life Applies additional life time curve in duration of Particle Life Time.

Color

Control the base color of the sprite, in addition to texture’s color value. Can use color picker or pallet by clicking the color preview box next to the text “Color”.

Var Random Adds some random value (0-1, 1 means 100%).

Random Hue When on, randomizes the hue value of the sprite color.

Var Emitter Life Applies additional life time color curve in duration of Emitter Life Time.

Var Particle Life Applies additional life time color curve in duration of Particle Life Time.

Diffuse Lighting

Controls the multiply value to the particle color for dynamic (diffuse) lighting.

Diffuse Backlighting

Control the fraction of diffuse lighting that is applied to particle normals in all directions. 0 is standard diffuse lighting, where the normals facing the light are lit the most. 1 is omnidirectional diffuse lighting, where lights affects all normals equally. This can make translucent appearance particle by adding some value.

Emissive Lighting

Controls the multiply value to the particle color for constant emissive lighting. This can make glowish appearance particle by adding some value.

Emissive HDRDynamic

Controls the power to apply to engine HDR multiplier, for emissive lighting in HDR. This can make glowish appearance particle by adding some value.

Receive Shadows

When turned on, Shadows will be cast on current item.

Cast Shadows

Current item will cast shadows.

Light Source Intensity

Controls the intensity for a fill light (cheap dynamic light) created at particle position.
br /> Var Random Adds some random value (0-1, 1 means 100%).

Var Emitter Life Applies additional life time curve in duration of Emitter Life Time.

Var Particle Life Applies additional life time curve in duration of Particle Life Time.

Light HDRDynamic

Control the power to apply to engine HDR multiplier, for particle light source in HDR.

Var Random : Adds some random value (0-1, 1 means 100%).

Var Emitter Life : Applies additional life time curve in duration of Emitter Life Time.

Var Particle Life : Applies additional life time curve in duration of Particle Life Time.

Light Source Radius

Control radius of the particle fill light.

Var Random Adds some random value (0-1, 1 means 100%).

Var Emitter Life Applies additional life time curve in duration of Emitter Life Time.

Var Particle Life Applies additional life time curve in duration of Particle Life Time.

A summary of how lighting and blend parameters determine particle color

Size Tab

Overview

Parameters in this tab control the size and shape of the sprite.

Functions

Size

Spawning Tab

Overview

Parameters in this tab control the spawning conditions of the sprite. By default, particles emit from the emitter center in all directions equally. The following parameters change this behavior.

Functions

Movement Tab

Overview

Parameters in this tab control the movement of the sprite.

Functions

Angels Tab

Overview

Parameters in this tab control the focus direction (which is by default the emitter's Y axis) and rotation value of sprites.

Functions

Physics Tab

Overview

Parameters in this tab control the physics setup for the particles.

Functions

Physics Type
Determines how the particle interacts physically.

None: No collisions or other physics.

Simple Collision: Particle collides with selected environment using simple physics. This is most simple mode.

Simple Physics: Particle created as entity in the physics system, and collides using a spherical particle model.

Rigid Body: Particle created as entity in the physics system, and collides using full geometry. A geometry asset must be set as physicalized model in engine for this particle. This is most expensive mode.
Collide Terrain
When it’s on, includes terrain in particle collisions.
Collide Static Objects
When it is on, includes non-terrain static objects in particle collisions. This is expensive calculation.
Collide Dynamic Objects
When it's on, includes non-terrain dynamic objects in particle collisions. This is very expensive calculation.
Surface Type
Determine surface material type for collision behavior. If set, overrides Bouncinessand Dynamic Friction below.
Bounciness
Only affect in case Physics Type is set to Simple Collision . Control the elasticity for collision response. Overridden by Surface Type if set. Special value: if -1, particle dies on first collision.
Dynamic Friction
Only affect in case Physics Type is set to Simple Collision . Controls the drag value when sliding, in units of 1/seconds. Overridden by Surface Type if set.
Thickness
Only affect in case Physics Type is set to Simple Physics . Control the fraction of the particle's visible radius to use for the physical radius.
Density
Only affect in case Physics Type is set to Simple Physics or Rigid Body . Control the density of particle, in kg/m^3. An example of the value which physically collect, is for Water = 1000.
Max Collision Events
Only affect in case Physics Type is set to Rigid Body . Limits the number of collisions the particle can have in its physics simulation.
Force Generation
Adds an additional force generated by the emitter.

None Doesn't add any force.

Wind Creates a physical wind force, approximately following the velocity, direction, and volume, and timing of the emitter's particles. This wind affects all particles and objects in its region, except particles in the emitter group. Setting the emitter's Speed to negative will create the wind force in the opposite direction, which can be used to create a sucking force.

Gravity Creates a physical gravity force, similar to , but creating a gravitational acceleration instead of wind velocity.

Target Creates an attractive target for all sub items of current item.

Sound Tab

Overview

Parameters in this tab browse and control the sound files. Not so many things can do on sound currently.

Functions

Sound
Browse and chose the sound file to use on current item. Assigned sound starts at the time when the emitter starts.
Sound FX Param
Modulate value to apply to the sound. Its effect depends on how the individual sound's "particlefx" parameter is defined. Depending on the sound, this value might affect volume, pitch, or other attributes.

Advanced Tab

Overview

Parameters in this tab Includes advanced appearance and movement settings, and optimization settings.

Functions

Draw Last
Modifies draw order of sub effects. Sub effects are rendered by lowest Draw Last value first, or in list order if equal.
Sort Oldest First
Reverses default sort order of particles (newest first).
Visible Indoors
Determines the show/hide setting of the particles, depends on if the particles spawn at indoor or outdoor.
If_True: Hides particles when outdoors.

If_False: Hides particles when indoors.

Both: Show particles always.
Visible Underwater
Determines the show/hide setting of the particles, depends on if the particles spawn on (in) the water or not.

If_True: Hides particles when above water.

If_False: Hides particles when under water.

Both: Show particles always.

*Disable Vis Clipping Force to disable Vis Area clipping on current item. There is the Vis Area function in the engine to optimize the drawing performance of particles. Usually, particles can exist in only one Vis Area where they born. When they get out from their Vis Area and get in to neighbor, they starts shrink down and disappear before they get in to it. Only one Vis Area can activated at once in the engine, depends on the camera position. This system often causes unexpected pop out of the particles. When it's on, current item ignores Vis Area clipping.

This Function can see on build No.5681, but it's already disabled. Will be removed from the future builds. There will be another solution in future.
Not Affected By Fog
When it's on, current item ignores scene fog.
Ignore Attractor
When it's on, current item ignores any attractor that is applied to the emitter.
Draw Near
When it's on, Current item rendered in the special "Near" rendering pass. Usually use for 1st person weapon's effects.
No Offset
This is for the 3D geometry particle. When it's on, Current item uses geometry's origin as particle position. Default is to use geometry bounding box's center.
View Distance Adjust
Controls value to the distance of automatic fade-out. When the sprites get close to the camera and fill out the screen, it causes serious drawing cost problem (this cost called as Fill Rate Cost ). To avoid this, particles start fade out when they get closer than 1m distance from camera by default. If you need to draw more near area sprite, try to decrease this value.
Fill Rate Cost
Controls the max screen fill allowed per emitter. This value is the "cost" of the fill, so making it smaller allows particles more visible.
Motion Blur Scale
Control the degree of the motion blur on particles.
Bind Emitter To Camera
Forces to relocate current items position to the camera position, and then link them. Useful to making rain or snow effect, which the player can not passes by.
Move Rel Emitter
Forces particle motion in emitter space; particles will move with its emitter.
Space Loop
Particles loop within a region around the camera, defined by Camera Min/Max Distance. This is useful to make rain or snow effect, which has the infinite spawning area.
Encode Velocity
Used for a special shader only; encodes particle velocity in vertex data.

Configuration Tab

Overview

Parameters in this tab controls advanced configurations. These settings limit an effect to only be enabled on certain platform configurations. This allows you to create variant effects for different configurations.

Functions

Config Min
Set the minimum system configuration level for the current item.
Config Max
Set the maximum system configuration level for the current item.
DX10
Set the configuration about DirectX 10.

If_True: Enables the current item only on DX10.

If_False: Enables the current item only on pre-DX10.

Both: Enables the current item always.
GPUCompulation
Set the configuration depends on if the GPU-based particle computation is supported or not.

If_True: Enables the current item only when GPU-based particle computation is available.

If_False: Enables the current item only when GPU-based particle computation is not available.

Both: Enables the current item always.
Multi Thread
Set the configuration depends on if the Multi-thread computation is supported or not.

If_True: Enables the current item only when particle multi-threading is available.

If_False: Enables the current item only when particle multi-threading is not available.

Both: Enables the current item always.

Advanced Techniques

Attaching Particles to Geometry

Here is a description of the various ways you can attach particle emitters to other geometry, with particular emphasis on breakable geometry.

Basic Attachment

To attach particle effect to the other entity, use Link Object tool on editor and link particle effect entity to the source object entity at first. Then set AttachType and AttachForm in the particle effect entity parameter appropriately, not on particle editor. There are also AttachType and AttachForm in particle editor's parameter, but they only affect on the Second Particle from other geometry particle. For more details about Particle Effect Entities.doc

Second Generation Effects

You can attach emitters to the parent particles, as part of the parent particle effect. If the parent effect has geometry , then the Second Generation effect can optionally emit particles from that geometry, based on its parameters. In this case, AttachType and AttachForm parameter are controlled from the Particle Editor.

Breakable Objects

There are several ways to create breakable geometry in the engine. All are based on a CGF authored with multiple parts. All optionally allow secondary particle effects to be spawned on the broken pieces.

Generating Particles from Surface Properties (Material Effect)

Surface properties specify events that occur when something happens to an object with a particular physical material (surface) type. Surface types are identified by names (such as "wood" or "metal"). They can be specified on a render Material, and also on individual pieces or surfaces of a CGF. The properties for each surface type are specified in LUA scripts, stored in the directory. Many of these properties specify particle effects which are spawned based on events such as "bullet" hit or "walk". The effect spawned when a geometry piece breaks off of an entity is specified on the section of the script. This section has the following parameters:

Performance Tips

The total number of particles in a scene is actually not very critical. Much more important are total fill-rate, physics, and (to some extent) spawn rate. So, in a framerate-challenged scene, try to avoid these things:

*Large Overdraw For example, using several large particles (Count > 1 or 2, Size > 1m), additively blended to achieve dense, chaotic glows, refractions, etc. Instead of multiple overlaid sprites to provide chaotic variation and overall density, try the following techniques: Use an Alpha texture with high average opacity instead of Additive.

Use just 2 particles at a time, and carefully tune the lifetime, rotation rate, and set curves for Alpha, Color, Size, so that they combine in chaotic ways.

Large full screen particles should have the Fill Rate Cost set at 1 or above, as far as possible.

Soft Particles

Soft Particles and expensive shaders, such as refractive materials. These are quite expensive when used with several large particles. Use Soft Particles only on sub-emitters that are near the ground, and have only small particles. Create similar sub-emitters higher up, that emit particles that never intersect the ground, and don't need soft particles.

For fire, use a horizontal glow texture. Combine that with some glow billboard sprites emitted higher up that don't intersect the ground. None of them need Soft Particles.

Small particles don't need soft particle.

High-resolution textures

Use lower-res textures (if sharp details are not required), and texture compression.

High-count second-generation

Each 2nd-gen effect causes an emitter to be created for each particle in the parent effect. This can be quite nice, but somewhat expensive, so use sparingly.

Physics Parameters

Simple physics and rigid bodies are very expensive, even simple collision costs a lot of performance. In the event of wanting many colliding objects its best to clone the emitter with the colliding particles and make one only spawn about 20% of the other, and enable collisions only on this emitter. As long as some particles are colliding it will look like everything is colliding. If simple terrain collision is enough, set Bounciness > 0, and don't use rigid body. Consider splitting an effect into sub-effects, so that only a few particles (perhaps large ones) have Real Physics for appearance, and the rest just go through the ground or fade out quickly.

Geometry Particle

Drawcalls are added from using geometries as particles, one drawcall per mesh spawned. Where possible just use non camera aligned sprites using full rotations to resemble meshes at least in their rotation.

Small Particles

Small particles like sparks can have a max distance applied to them to make sure they aren't rendered even as very small, single pixel particles. Especially those with collisions, should be turned off for the lowest spec.

Turn off Diffuse Lighting

Diffuse lighting should not be used unless it is needed, for self lighting effects like sparks and explosions where they would create their own light the diffuse lighting slider should always be set to low.

Keep Short Duration

Keeping effects short in their lifetime obviously helps performance but it also makes the effect more powerful, coupled with a good sound. For explosions the shorter the fire stage of the explosion is the more believable it is. You don't have a chance to see the obvious textures used to create the structure of the effect. This applies to most effects in the game.

Attaching Particles to the vehicles

There is a Vehicle Editor in the sandbox2, to edit vehicle's behaviors and events. This editor also supporting implement particle effects into any event of the vehicles, like trail or damage effects. For more information, see the Vehicle Editor reference.

Making Muzzle Flash Effect

To use an effect as a muzzle flash, there is a rule to correctly attach effect to the helper of the weapon.

Set Enabled as True

Top node of the effect should be set true on Enabled .

Set Count as 0

Top node of the effect should be set 0 on Count .

Bind To Emitter

Top node of the effect should be set true to Bind To Emitter .

Kill particle when they collide

There is a special value for the Bounciness Physics

Use Simple Collision:
Set Physics Type as Simple Collision.

Set Bounciness:
Set Bounciness to -1. This is a special value to kill particle when they collide.

Use Force Generation

You can add some physical force by using Force Generation parameter in Physics tab. These are some examples of the Force Generation .

*Hierarchal Attracted Effect As written in Basics/Child Effects above, you can make hierarchal effect. When you use Target to Force Generation parameter, you can make hierarchal attracted effect which has a specific, impressive movement.

You can see every sub particles are attracted to the parent effect's particle position through their life time. By repeating this procedure and do some tweak, you can make impressive effect which has very complex movement. Only Target force has a special rule that it's affect only on sub effects of its self.

Wind Force Effect

By adding wind force to the effect, you can blow the particles and vegetations around the spawning point of it. It's a powerful function to make explosive effects like hand grenade.

Open Vehicle_fx library, then drag and drop Damages_Land.USTank_engine_smoke_a to the scene.
Open explosions library, then drag and drop Grenade_SCAR.soil to the next of smoke, somewhere around in 5 meter distance.
Select grenade effect entity and press Reload Script . Grenade effect spawns, and smoke effect will blown by it.
Look inside of the grenade effect, and see an item which name is wind . This item has no Count , but has radial emission setting and high Speed value, and Force Generation is set to Wind .

Appearance of particle it self doesn't has any effect on force generation. You can add Count Value and tweak appearance if you want. Intensity of the wind force is controlled by the Speed value of the wind force effect, and affected effects must have value on Air Resistance .

Gravity Force Effect

You can also add gravity force to the effect. Intensity of the gravity force is controlled by the Gravity Scale value of the gravity force effect, and affected effects must have value on Gravity Scale .


Terrain Ambient Occlusion Intro

backtoREF-Index

What is this and how does it work

Terrain Ambient Occlusion system controls ammont of ambient light in scene. Classic example - dence forest has less ambient light near the ground becasue most of sky light is stopped by trees. In current implementation occlusion information is stored in textures and effect is applyed to scene in deffered way.


disabled


enabled

Amountt of effect is controlable in 'Time of Day' window

Make sure 'Calculate terrain sky accesibility' check box is enabled during terrain texture generation.

Console variables

r_TerrainAO 0 = OFF
r_TerrainAO 7 = ON
r_ShowRenderTarget 11 = visualize ambient occlusion mask (together with SSAO mask)

Time of Day Window Reference

backtoREF-Index

Overview

The time of day window is used to setup lighting and overall environment settings of a level. All values can be animated over time so the level will look different as time advances.

User Interface

Time of Day Window Main Menu

Time of Day Tasks
Import From File
Use this function to import time of day settings as .xml files
Export to File
Use this function to export time of day settings as .xml files
Expand all
Used to expand all rolldown bars
Collapse all
Used to collapse all rolldown bars
Current Time
Start time:
The start time that will be used in the mission can be specified here
End time
The end time that will be used in the mission can be specified here. If its set to 23.59 the time will loop, starting the next time of day cycle once a day is over.
Play Speed
Specifies the speed at which the time advances. (0.005 is a good value)
Update Tasks
Play
Starts or resumes play back of time of day sequence in the editor. If the current time is not within the specified (Start time, End time) time frame play back starts at Start time.
Stop
Stop play back of time of day sequence in the editor.
Force sky update
Checking this box forces a full update of the sky light calculations each frame (either during play back of time of day sequence or when the user manually drags around the time slider). Sky light calculations are otherwise distributed over several frames to reduce workload on the CPU.

Parameter List

HDR dynamic power factor

The dynamic power factor is applied to all light sources when rendering in HDR. This is done in order to automatically achieve a vibrant HDR like look without having to tweak each individual light source. It also compensates for a loss of brightness and contrast that otherwise occurs during tone mapping. If your title needs to support both HDR and LDR lighting it is advisable to tweak all settings for standard LDR rendering first and then adjust this value for the given time span to avoid re-tweaking values which might have been set too high for LDR rendering (i.e. colors run into saturation) and could be more easily achieved via the HDR dynamic power factor. For more details please refer to CryEngine2HDRSupport page in the CryENGINE®2 wiki. .

Sky brightening & SSAO

Sky brightening - Range: 0.0 to 1.0

This value specifies how much ambient occlusion on terrain, under trees, etc should be visible. A value of 0.0 results in full ambient occlusion whereas a value of 1.0 results in no ambient occlusion at all (ambient term is equal to current Sky color).

SSAO - Screen space ambient occlusion - Range: 0.0 to 2.5

This value specifies how strong the effect of screen space ambient occlusion should be. A value of 0.0 removes the effect of SSAO from the final rendering whereas a value of 2.5 yields very strong visibility of ambient occlusion.


The combined effect of sky brightening and SSAO (using default materials for better illustration). Rows toggle sky brightening (1.0 left, 0.0 right), columns toggle SSAO (0.0 top, 1.0 bottom).

Sun and Sky color
Sun color
This RGB value specifies the sun color. It gets internally multiplied by Sun color multiplier.
Sun color multiplier - Range: 0.0 to 16.0
The sun color multiplier.
Sky color
This RGB value specifies the sky color. It gets internally multiplied by Sky color multiplier.
Sky color multiplier - Range: 0.0 to 16.0
The sky color multiplier.

Volumetric fog

Fog color
This RGB value specifies the fog color. It gets internally multiplied by Fog color multiplier. Please note that when using a dynamic sky this value will be added to an internally computed fog color that is directly influenced by the sky light parameters below. Which means that if a dynamic sky is to be used you don't necessarily need to setup this value in order to get properly colored fog for a given time of day.
Fog color multiplier - Range: 0.0 to 16.0
The fog color multiplier.
Volume Fog: Global density - Range: 0.0 to 100.0
This value specifies the global density of volumetric fog. Higher values produce denser fog.
Volume Fog: Atmosphere height - Range: 0.0 to 30000.0
Defines the atmosphere height above sea level (specified in the terrain editor via "Modify -> Set Water Level"). The higher the atmosphere the less visible the effect of fog layers (vertical gradient). At the same time fog in the distance will become stronger which can be regulated by reducing Volume Fog: Global density.

Atmosphere height set to 1000.0 (left) and 5000.0 (right)

Volume Fog: Density offset - Range: 0.0 to 100.0

This parameter shifts the fog density computed per pixel by the given amount. As an result objects in close proximity appear less foggy. Be careful though! As this parameter has no real physical meaning its effect can vary greatly when changing other fog related parameters.

Density offset set to 0.0 (left), 0.5 (middle) and 1.0 (right).
Other fog settings constant remained constant (atmosphere is 2000.0, fog density is 0.5).

Sky light

Section can be ignored if a static sky is used.

Parameters under this section are solely used to compute sky light and to control the atmosphere appearance of a dynamic sky. They don't directly affect rendering of objects in the world (e.g. colors used for diffuse or specular shading). However, they're used to internally compute an approximate fog color to automatically fog the entire scene in appropriate colors. For a static sky only Fog color is used. For further information on the scattering parameters listed below please refer to the following page.

Sky light: Sun intensity
A RGB value specifying the sun color. It gets internally multiplied by Sun intensity multiplier to yield the current sun intensity.
Sky light: Sun intensity multiplier - Range: 0.0 to 1000.0
The sun intensity multiplier. Higher values will result in brighter skies. Fading down this value during day time could be used to simulate an eclipse.
Sky light: Mie scattering - Range: >= 0.0 [a good default is 4.8]
A constant for Mie scattering. Mie scattering is caused by aerosols in the lower atmosphere (up to 1 km). It is wavelength-independent and responsible for haze and halos around the sun on foggy days. Smaller values result in a clearer sky. Bigger values make the sky appear hazier.

A Mie scattering constant of 2.0 (left), 100.0 (middle) and 2000.0 (right)

Sky light: Rayleigh scattering - Range: >= 0.0 [a good default is 2.0]
A constant for Rayleigh scattering. Rayleigh scattering is caused by particles in the atmosphere (up to 8 km). It is wavelength-dependent. For the default value it produces typical earth-like sky colors (blue sky during the day, reddish/yellowish colors at sun sets, etc). Higher values cause a denser atmosphere with sky colors shifting towards red/yellow. Smaller values produce a bluer sky.

A Rayleigh scattering constant of 2.5 (left) and 4.8 (right)

Sky light: Sun anisotropy factor - Range: between (but not including) -1.0 and 1.0 [good default is -0.995]
The anisotropy factor controls the sun's appearance in the sky. The closer this value gets to -1.0 the sharper / smaller the sun spot. Higher values cause more fuzzy and bigger sun spots.

A sun anisotropy constant of -0.999 (left) and -0.8 (right)

A triple defining the wavelengths (in nm) of the RGB primaries. Tweaking these values will color-shift resulting gradients to produce different kinds of atmospheres. This can be very useful in combination with Rayleigh scattering if you choose a sun intensity of pure bright white!

RGB wavelengths of r 650.0, g 570.0, b = 475.0 (left)
and r 750.0, g 601.0, b = 555.0 (right)

Night Sky

Section can be ignored if a static sky is used.

Night sky: Horizon color
This RGB value specifies the horizon color of the night sky gradient. It gets internally multiplied by Horizon color multiplier.
Night sky: Horizon color multiplier - Range: 0.0 to 16.0
The horizon color multiplier.
Night sky: Zenith color
This RGB value specifies the zenith color of the night sky gradient. It gets internally multiplied by Zenith color multiplier.
Night sky: Zenith color multiplier - Range: 0.0 to 16.0
The zenith color multiplier.
Night sky: Zenith shift - Range: 0.0 to 1.0
This value shifts the night sky gradient. Small value shift it more towards the bottom. Higher values shift it more towards the top.

A zenith shift of 0.2 (left) and 0.8 (right)

Night sky: Star intensity - Range: 0.0 to 3.0
A value controlling the overall brightness of stars. Please note that flickering of stars due to atmosphere turbulences is completely procedural and cannot be controlled.
Night sky: Moon color
This RGB value specifies the Moon's emissive color. It gets internally multiplied by Moon color multiplier.
Night sky: Moon color multiplier - Range: 0.0 to 16.0
The moon color multiplier.
Night sky: Moon inner corona color
This RGB value specifies the color of the moons inner corona. It gets internally multiplied by Moon inner corona color multiplier.
Night sky: Moon inner corona color multiplier - Range: 0.0 to 16.0
The moon inner corona color multiplier.
Night sky: Moon inner corona scale - Range: 0.0 to 2.0
Controls the size and blurriness of the moons inner corona. Smaller values will produce a bigger blurry corona. Higher values will produce a smaller focused corona.
Night sky: Moon outer corona color
This RGB value specifies the color of the moons outer corona. It gets internally multiplied by Moon outer corona color multiplier.
Night sky: Moon outer corona color multiplier - Range: 0.0 to 16.0
The moon outer corona color multiplier.
Night sky: Moon outer corona scale - Range: 0.0 to 2.0
Controls the size and blurriness of the moons outer corona. Smaller values will produce a bigger blurry corona. Higher values will produce a smaller focused corona.

Different moon corona scales (inner/outer): 0.5/0.01 (left), 0.5/0.05 (middle), 1.5/0.05 (right)

Cloud shading

Cloud shading: Sun light multiplier - Range: 0.0 to 16.0
Cloud shading: Sky light multiplier - Range: 0.0 to 16.0
All types of clouds supported in the engine (distance clouds, impostor clouds, volume objects) use the current sky and sun color along with per material albedo to shade clouds. Since sun and sky color can be a bit too bright or dark in certain scenarios these two parameters provide the means to correct the cloud shading brightness for a given time of day.

Sun shafts and rays

Sun shafts visibility: - Range: 0.0 to 1.0
Controls the visibility of sun shafts. Higher values accentuate shadow streaks cause by sun light penetrating objects.
Sun rays visibility: - Range: 0.0 to 10.0
Controls the visibility of sun rays. Higher values cause brighter rays around the sun.
Sun rays attenuation: - Range: 0.0 to 10.0
Controls the attenuation of sun rays. Higher values cause shorter rays around the sun.


Sun shafts and sun rays combined (sun shafts visibility/sun rays visibility/sun rays attenuation).
0.0/0.0/1.0 (top left), 1.0/0.0/1.0 (top right), 1.0/2.0/1.0 (bottom left), 1.0/2.0/0.5 (bottom right)

Sun shafts and sun rays combined (sun shafts visibility/sun rays visibility/sun rays attenuation). 0.0/0.0/1.0 (top left), 1.0/0.0/1.0 (top right), 1.0/2.0/1.0 (bottom left), 1.0/2.0/0.5 (bottom right)

Advanced Terrain Layer Painting Techniques

backtoREF-Index

Overview

This official tutorial from Crytek will cover a series of topics to create effective, aesthetically pleasing and detailed terrain textures with a few outlined techniques. The tutorial takes for granted that you are knowledgeable on texturing terrain; if you are not familiar with this technique, visit the article on the basics of doing so here.

Basic Layer Distribution

Example Setting

In this section we've got a brief description of the kind of painting techniques and material choices you're going to want to make when painting for different surfaces. This is split into Basic Layers and Detail Terrain Layers.

Basic Layers
Detail Terrain Layers
Initial Painting
  1. As a test environment for the techniques, we're going to layout a generic Crysis scene; jungle, grassy areas offset with a beach and a road running through the jungle.
  2. Next to this is a basic cliff area detailed with cliff rocks to add some depth to the cliffs.
  3. When choosing the colours for your layers, make sure you choose a base colour and make sure its applied with the "To Layer" button so that when applying different tones you maintain a good base layer.

Shading

This section of the tutorial will cover shading in the layer painting you've done with various tones of the existing colours, added for variation to the base layer.

Bright Tones
  1. Disable the wall rock brushes on the cliffs for a better view of the layers below (if you have any in the scene).
  2. Paint the base layers with a higher brightness in a more or less random pattern as seen in the image below.
  3. Use different brush sizes to increase the random variation of the textures; this choice also depends on the size of the area you are painting.

Dark Tones
  1. Perform the same steps as above, except use a darker shade of the colour than your default brightness.
  2. Don't paint around the brighter areas; paint as random as you did initially in order to make the effect seem even more natural.

Middle Tones
  1. With this shading, switch back to the main default brightness that you used on the base layer.
  2. Reduce the "Hardness" so that the harder edges are softened.
  3. The distribution of darkness to brightness should now look a lot softer than previously seen.
  4. In general this is useful as the softer the shading the less objects need to be used to cover the patchy appearance.

Road Details

In this section, we are going to look at adding detail layers around the road areas in a level; this is done to break up repetition in road materials and to enhance roadside terrain.

Unaltered Start

Evidently noticeable about the existing scene below is the lack of mud and dirt variation.
The colour is just brown, with no real variation in base colour, and the added dirt border around the roads is too even.

Mud and Stones
  1. Paint over and around the road texture with another mud/dirt texture as variation. Try to match the colour tone to the road material colour.
  2. Use different brightnesses of the new mud/dirt textures, similar to the tone difference in the base layer painting.
  3. Work with different hardness levels to blend in new detail textures more effeciently.
  4. Use the small pebble texture to create little highlights around various areas of the road.
  5. Finally, make sure the borders around the roads are not even to make a more varied detail layer.

Vegetation
  1. This will be used to add small patches of greenery to the otherwise dull road detail layer.
  2. Use a mixture of grass and small leaf textures between the mud and the forest.
  3. Don't paint it too evenly.
  4. Work with a very small brush size, and use low hardness levels so that the patches blend in better.
  5. Use only as much green as looks good; don't overdo this aspect of the layer painting.

Rock Details

With this part of the tutorial we're going to cover the areas where rock meets ground; this can often look unsightly so is an important aspect of level texturing here.

Unaltered Start

As can be seen in the image below, there's a very hard noticeable edge between the rock and other ground layers.
There's also a very low variation on the detail layers that already exist in the scene.

Stones and Dirt
  1. Start with the dirt and mud textures as a basis, and lightly paint around the hard edge between the two layers.
  2. Spice up the area with a few pebbles and river rock layers.
  3. Colour the lower edges of the rock with the same brownish tone that is used with the mud and dirt to help it blend in with the ground better.

Vegetation
  1. As with the roads, we're going to spice up the immediate area with a bit of vegetation variation using grass and small leaves.
  2. Additionally to the ground, lightly paint the rock with a green colour to help blend the vegetation in.
  3. Don't go overboard with the green; as before, only use as much as is needed.

Single Rock
  1. Generally try to use different techniques around bigger, single brush or vegetation rocks that you have placed.
  2. Since you can't paint directly on to the stone, adjust the pebbles and stone layers so that they match the colour of the brush material, and paint accordingly.
  3. On the upper edge use small leaves; the procedural vegetation added should help to hide the edge between brush and terrain.

Surface Details

This section of the tutorial will deal with how to detail the larger areas of plain surface layer with varying textures and colours.

Grass - Unaltered Start

The plain surface is very large and boring, with no great variation.
The different shading alone, although it has some effect, is not enough to create detail.

Grass - Detailing
  1. Carefully spice up the plain surface with the mud/dirt, small pebbles and small leaf textures.
  2. Use a low hardness to help these new textures blend in to the terrain as much as possible.
  3. Keep larger plain grass areas here and there to add some variety.

Sand - Unaltered Start

The surface is again very large and boring, with the material tiling clearly visible.
The different shading by itself is not enough to draw away from the plain material.

Sand - Detailing
  1. In general, paint all sand details with a low hardness.
  2. Paint pebble, rock, mud or dirt textures with increased brightness and compensate their brownish base colour with, for example, a mild blue so that it blends in accordingly.
  3. Only use a few small leaves surrounded by mud, dirt and stone textures.
  4. Put more small leaf and mud textures closer to the grass and jungle to give a feeling of progression.
  5. More small pebble and river rock textures closer to the main water mass.

Jungle
  1. In this example the jungle surface is not really big enough to show any major differences, but shows some of the main techniques.
  2. From time to time paint some small leaves into the layer with a very low hardness.

Borders

The borders section of the guide will go through how to cover up layer borders with a variety of other layer textures and colours.

Jungle - Unaltered Start

Quite a hard edge visible between the grass and jungle layers, contrasting with the road and cliff borders closeby.
A very low variation of details.

Jungle - Grass and Forest
  1. Start off by mixing the jungle and grass layer with different colours and layers with high hardness.
  2. Afterwards, smooth over the border by applying a low hardness to the various layers.

Jungle - Detail
  1. To add detail the now smoothed border, start adding small leaves with the painter.
  2. Use a low hardness whilst doing so to avoid hard edges and/or dots when painting.

Beach - Unaltered Start

A very noticeable hard edge between the grass and sand, as well as no varying layers.
Very little detail visible on the border between the two layers.

Beach - Sand and Grass
  1. First off, start mixing the sand and grass layer with a high hardness.
  2. Afterwards, smooth both layers down by painting both with low hardness.
  3. Alternatively, you can start with only low hardness, as the strong contrast between the grass and bright sand requires extra careful attention for a smooth result.

Beach - Stones, Small Leaves and Dirt
  1. Mix up the border with some dirt and mud to have some contrasting brown tones between the sand and grass.
  2. Afterwards, spice it up with a few areas of small stones for some variation.

Decals

The last section of the layer painting tutorial focuses on adding decals; these are one polygon textures which can be added to terrain and objects in a game to provide extra detail at a low performance cost.

Beach
  1. Use dark and light dirt decals to add detailed shading to the beach.
  2. Very effective on plain beach areas, as there is nothing covering the surface compared to vegetation covered jungle areas.
  3. Use the "beach_dirt" category of decals for dirt just above the waterline.

Roads
  1. The main goal is to hide the repetition of the road material.
  2. Use the slightly transparent dirt decals and adjust their colour to the road and terrain layer tone.
  3. Use water puddle, deep mud and other decals as variation and highlights.
  4. Use multiple decals with different size and rotation. Place them close together to avoid the "square-decal" look.

Results

The initial unaltered scene, with plain boring areas and harsh borders.

The completed scene with completed layers and decals.
I need the LayerPaintingTechniques25.jpg in higher resolution, Ben Bauer made this tutorial - maybe someone has the 500px version of this image?


stuff to integrate

sandhesten quotes

There are a few ways to contain the AI. Defend position. You can tell a group of AI to defend a certain location. This is an example from the first settlement in the Island level. The AI will start defending the GPS jammer when they are alerted. Remember that if you send this signal to one AI dude, all members of his group will defend the spot, so keep an eye on your groupIDs. What actually happens is that the AI dudes are turned into Camper characters. Remember to add lots of cover points around the defend spot. When the jammer is destroyed we don't want them to defend anymore. The second option is to draw an AIShape around the AI group you want to contain and give it AnchorType COMBAT_TERRITORY. This will tell the AI to only look for cover within this area. Have a look at the AIShape called Settlement_AIShape in the Island level to get an idea. Also notice in the flow graph above that this shape is disabled when the GPS jammer is destroyed so the AI can hunt us down.

If you have trouble selecting objects you can hold down SPACE. This will display small, but easily selectable, squares at the pivot points of all objects. If you still can't select him he might be frozen. Edit --> UnFreeze All will unfreeze all objects. Also, he might be on a layer that is frozen. Go to the layer tab in the RollUpBar and make sure all layers are visible and selectable (the eye and arrow icons next to each layer).

The procedural vegetation system should only really be used for small non-gameplay related objects such as pebbles, grass, branches, low bushes. Anything that breaks, has an AIRadius set or have to be used for cover should be placed manually.

The best way to debug your flow graphs is to use the debug message nodes in the HUD folder to print small messages on the screen when certain nodes in the flow graph have triggered. Add a HUD:DisplayTimedDebugMessage and type something into the Message field. Now try to hook the HUD:DisplayTimedDebugMessage up to different nodes in your flow graph and test your level to find out where the problem lies. Place the HUD:DisplayTimedDebugMessage node before and after important actions such as the AI:AIGoto nodes and see if the message appears or not. Repeat until you have nailed down exactly what part of the flow graph that isn't triggering.

As a general rule you should never have to modify the files inside the .pak files. Individual files can be extracted however, which will still keep the original inside the .pak file. Normally the game will only load assets inside the .pak files so even if you extract them it shouldn't affect the pure game mode. But when you run in the editor or in -devmode the engine will use the extracted file instead and ignore the one in the .pak file. So, you could for example extract an equipment pack to Game/Libs/EquipmentPacks and edit it in the editor. Or if you wanted to tweak the ocean shader you could extract that to Game/Materials/Ocean and edit it in the material editor. When the full game is released you can also create a Mod, which basically tells the game to use another directory than /Game as the root. So if you want a level to use specific assets you could put the level in your mod directory together with all your modified files that you took from the main .pak files or created your self.

The only consolation about editor instability I can give is that it happens to us as well, even with 64-bit windows and 4 GB ram. Editing levels in real time is a complex process and so many things can go wrong.
A few things to keep in mind:
-Save often. I save after every major editing operation and especially before jumping into game mode.
-Make safety copies of your levels often so you can roll back if something bad happens.
-Keep an eye on memory consumption in the lower right corner of Sandbox. When the icon turns red, you are in the danger zone. Restart the editor.
-Don't chain load levels in the editor. If you want to switch to another level, restart the editor and then load the other level.
-Some operations are more memory intensive than others. Terrain editing and layer painting are in the top 3.

Here is how to setup the shark: -Draw a shape where you want the shark to appear (RollUpBar --> Area --> Shape). The shark works best in deep waters with no terrain around. Move the shape all the way to the bottom of the ocean and give it a height in its properties. It should extend some meters up in the air over the ocean surface.
-Place an AreaTrigger (RollUpBar --> Entity --> Triggers --> AreaTrigger).
-Select the Shape and "pick" the AreaTrigger.
-Place a WaterKillEvent (RollUpBar --> Entity --> Others --> WaterKillEvent).
-Place some AIAnchors (RollUpBar --> AI button --> AIAnchor) with AnchorType SHARK_ESCAPE_SPOT in the water off the coast. The shark will swim to the nearest one when he is disabled.
-Create a flow graph under the AreaTrigger.
-Add the AreaTrigger and the WaterKillEvent to the flow graph.
-Connect the two in flow graph as follows:
Now when you enter the shape a shark will spawn behind you, circle a few times and kill the player. The shark will disappear again if the player leaves the shape.
For some reason the shark didn't make it into the demo, so it will only work in the full version.
You can however still check out how it was done in the demo level. The setup is there.

If the AI dude has the laser sight and/or the flash light in his equipment pack they can be turned on and off with flow graph.
Use AI:AISignal node for this.
Here are the signals:
PATROL_FLASHLIGHT_ON
PATROL_FLASHLIGHT_OFF
TARGETLASER_ON
TARGETLASER_OFF

Try checking with AI_debugdraw 79 if the links between AIPoints are white and if the entry/exit point connects to the normal triangulation outside.

You should use the archetype scouts from DataBase view. They are already pre-setup for you. You also need flight navigation. Draw an AINavigationModifier around your gameplay area and choose the NavType "Flight". Then regenerate flight navigation. If it is a ScoutMOAC archetype, then give it the behavior ScoutMOACIdle. Otherwise it will not work correctly.

We use a technique where the engine outputs screen shots that are then composited into a video with a fixed frame rate. Note: This will not give you any sound! The console command capture_frames 1 will make the engine start outputting individual frames as screen shots to a CaptureOutput folder in your Crysis root directory. The screen shots can then be composited into a video in Premiere or with a shareware program like Jpg2Avi. The video will probably look like the game is running on steroids, because the capture process can't keep up with the game (a video made at 30 FPS from frames captured at ~10 FPS). This is where the console variable fixed_time_step 0.03333 comes in. It will lock the update rate of the game at 30 FPS. Enter this console command before starting the capture process and set it to 0 when finished.

LayerID just identifies the individual layers for the engine. It is nothing you should ever worry about. You will see that if you switch layerID of two layers in the Texture dialog that they will switch detail textures in perspective view. You shouldn't have more than 14 surface types in a single level. Base layers goes up to 128 I think, well, more than enough at least.

I am not an artist so my knowledge of the art pipeline is limited. But I can tell you what I know. We mainly use 3DSMAX and ZBrush for modeling, rigging and exporting to the game. I don't know exactly what the SDK will come with, but I am pretty sure it will explain how to get new characters into the game. About the AI, I'm no programmer either but I do know that the core of the AI system is C++ code while behaviors are in LUA script. So yes, editing/expanding on behaviors should be possible.

The AI can usually only do one action at a time.
However there is a way to get an AI dude to fight while moving to a certain location. He might not move extremely fast, but he will get there eventually.
-Place a tag point (RollUpBar --> AI button --> TagPoint) where you want the AI dude to go to.
-In your flow graph add an AI:AIExecute node and an Entity:EntityID node.
-Assign the AI dude to the AI:AIExecute node and the tag point to the Entity:EntityID node.
-Connect the Entity:EntityID node to the ObjectID port on the AI:AIExecute node.
-Select the action set_defend_pos in the AI:AIExecute node.
Trigger the action however you want.
A few things to keep in mind:
What this actually does is change the AI dude's behavior to Camper and set a specific position for him to defend. If he isn't at that position yet he will try to get there as soon as combat starts. Remember that this will make all members of that group do this action so keep an eye on his and other AI dudes' groupID.

Here is how to setup and AreaTrigger correctly:
-Draw a shape (RollUpBar --> Area --> Shape).
-Place an AreaTrigger (RollUpBar --> Entity button --> Triggers --> AreaTrigger).
-Select the Shape.
-Click the Pick button in the properties of the Shape.
-Click the AreaTrigger.
You should now see a line going from the Shape to the AreaTrigger in perspective view. This means that they are connected correctly. Try triggering something simple like a message on the HUD with HUD: DisplayTimedDebugMessage. Test it in the editor. Export to game (CTRL+E) and load you map.

The AreaTrigger works 100%, otherwise half of Crysis wouldn't work.

A ProximityTrigger doesn't need an AreaShape, only AreaTriggers do. The ProximityTrigger has properties for size in it.

Seeing my arms -
Try clicking the button next to AI/Physics. "No Follow Player" I think it is called. See if that helps.

You need to run the game in devmode to make use of modified libraries. Make a shortcut to your crysis.exe file and right click it and select properties. Add -devmode after crysis.exe. There might also be a .bat file to start Crysis in devmode, but I am not sure if it was removed for the retail version.

Don't worry about that error message when editing equipment packs. You can answer yes by the way. It just removes old unused weapon and ammunition types.

For navigation on catwalks and stairs and such I would recommend checking out the crusher building in the Mine level. Have a look at how AIPoints and AINavigationModifier are set up around that building.

Here is how to create an empty level in space. First create a new level. Untick Use Terrain. Do the following in RollUpBar --> Environment tab --> Environment button -Untick ShowTerrainSurface. -Clear the Material field under Ocean. -Clear the Texture field under Moon. Then go into the time of day settings (Terrain --> Time Of Day) and do the following: -Click the record button. -Tick Force Sky Update. -Set Current Time, Start Time, End Time to 00.00 and Play Speed to 0. -Set Volumetric fog: Global density to 0. -Set Night sky: Horizon color multiplier to 0. -Set Night sky: Star intensity to 3. Voila!

If you want to change the physical flow of water, tweak the speed parameter in the river. Remember that negative values are supported. If you want to change the way it looks you have to change shader settings in the material editor. Go into material editor and duplicate whatever material you were using. Then assign this material to you river. Open the Shader Params of the river material and tweak "Waves movement speed". This too supports negative numbers.

Time to explain the tanks!
Important! Always make sure that the behavior matches the character of the tank. So:
Tank --> TankIdle
TankFixed --> TankFixedIdle
TankClose --> TankCloseIdle
TankFixed:
This is for fixed tank positions. A good example is "AB1_defense_tank2" in the level Tank. As you can see in the flow graph DisableMovement is triggered after it has been enabled and driver and gunner has entered. This will make sure the Tank doesn't go anywhere.
TankClose:
This makes the tank always stay on a specific AIPath drawn by the designer. The tank will try to adjust to the best position on the path to fight its target. This will minimize the risk of the tank getting stuck in geometry. A good example is "Asian_tank_close_8" in the Tank level. For the AIPath untick "Road" and select PathNavType "Road". Then copy the name of the AIPath into the sValue field of the AI:AISignal node with Signal=TANKCLOSE_PATHNAME.
Tank:
This is unused in Crysis and therefore may not work. We only used TankFixed and TankClose.
Tip: We use the TankClose character/behavior for boats and LTVs as well.

AI:AIFollowPathSpeedStance just tells the tank to follow a path and then... nothing. Like sending an AI dude to a tag point. The TANKCLOSE_PATHNAME AI:AISignal node tells the tank to stay on the AIPath that is specified in sValue. The tank will never deviate from this path while moving around and fighting.

TOD
-Click the record button.
-Make you changes.
-Click the record button.
-Export to game.
Remember to set start and end time and play speed. P.S. There is no need to export the TOD settings themselves. This is just if you want to save a specific set of TOD settings so you can import them again later or in a different level.

Yeah, Vista might not like that you try to install the editor to this location. Instead of fiddling around with UAC you can just install Sandbox to another folder and then copy it in manually. That is what I did when I tried installing the demo+editor on my home machine.

When you create a new level you have to save it, quit Sandbox and then load it up again before being able to go into game mode. Don't ask me why...

The best is to first flatten the terrain where you want the river to be and then draw it on top of the terrain. Tweak the properties a bit. You probably want a wider river than the default. 20 is maybe a good value. Remember to set TileLength to the same value to avoid weird texture tiling. Then edit the terrain around the river with the terrain tool until you have the result you wanted. You can also move the river up and down a bit. It can be a tricky process, but after a few times it should be getting easier.

You need a VTOL, a pilot and two tag points, one where the VTOL should land and one where it should fly to after the player gets out. I placed the VTOL a couple of meters above the terrain over the landing spot. Try implementing the following flow graph: On start the player and the grunt will be beamed into their respective seats. The Input:ActionFilter will disable certain player actions, in this case exiting and switching seats of a vehicle. One second later the VTOL will perform a landing and open the door. The Input:ActionFilter is disabled. The Vehicle:VehiclePassenger node will output the ID of any entity that exits the vehicle assigned to the node. The Math:Equal node will compare this to the player's ID and if it is the player, then, after 1 second delay, the VTOL fly to the second tag point. You can edit the delays, add more characters inside the VTOL etc.

First of all: A lot of the errors can be ignored. You should never load two levels in a row in the editor. This can lead to unpredictable results and produce errors in the level. Always close the editor and open it again if you want to switch level. The AI errors will go away after the first time you generate navigation. AI --> Generate All Navigation.

Let's say you want to attach the fire to a barrel.
-Place your fire particle effect on the barrel.
-Select the particle effect.
-Group --> Attach.
-Click the barrel.
The particle effect will now move around with the barrel.

Thread: Retrieve vehicle entering player's id Use the Vehicle:VehiclePassenger node and assign the vehicle you want to check. The ActorIn port will output the entityID of the character that entered the vehicle. The ActorOut port will do the same for when characters exit the vehicle. You can use this entityID to give an equipment pack to that character.

Most physics objects are resting until activated by an impulse. Otherwise the game would run at a much lower frame rate. You can artificially apply an impulse with the Physics:ActionImpulse node. Assign the object and set the impulse to something low like 1,1,1. Now trigger the Physics:ActionImpulse however you want.

The material editor is integrated into our source control application. Since you guys don't have this it might function a bit weird. To work around this, the best is to extract all materials from GameData.pak. Here is how: -Open GameData.pak with WinRar. -Drag the Materials folder into you Game folder so it sits next to other folders like Levels, config, Localized etc. -Right click the materials folder and choose Properties. -Un-tick Read Only. -Click OK. -Restart your editor. As you can see the materials no longer have the little lock symbol on them. This means that they can be edited. You should be able to duplicate and add new ones as well.

You can check how it was done in the Tank level. There are two instances where a VTOL comes in and gives the player support from the air. The first one is at the train station where a VTOL (AB1_VTOL_1) comes in and drops troops and then takes off and circles the train station with the gunner firing at the enemies below. When the train station objective is completed the VTOL flies off. The second one is at the village in the end. The VTOL (AB2_VTOL_2) starts circling the village and fires at the enemies below. When the player engages the last road block the VTOL follows to give support there. The basic idea in both cases is to make the driver ignorant and follow a designed path while the gunner AI automatically shoots at any targets within range.

Export

When linked correctly, the LOD's do not need to be added to the list window of the exporter.
"Merge all Nodes" needs to be unchecked in the exporter settings.

When you export your .cgf from Max, the LOD's are embedded inside the .cgf. The engine is able to then pull these LOD's from the one .cgf at run time, but for a final released build, the Resource Compiler should be setup to extract the LODs from the base .cgf (with the /splitlods command) and create separate LOD .cgf's from them. If you look inside the shipped GameSDK .pak files, you'll see _lod1.cgf, _lod2.cgf assets alongside their parent .cgf.

Old LOD Setup in 3D Packages

Kept for backwards compatibility - You can also create a separate .cgf object with the same object name plus the post fix _lod1, _lod2, etc.
The engine will automatically use these external LOD's. But this method is not recommended and might be removed in future releases.
Examples: