This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

How-Tos for Tracker

Here you can find tips how to animate some parameters depending on their type: for example, how to move nodes, change material parameters, etc. (See also basic principles how to work with Tracker).

How to Create a Key Frame from Editor Parameter

After the parameter is added to the Tracker to be animated, a track controls its value. You cannot change it in the Editor while the track is enabled.
In order to tweak such parameter in the Editor and after that add a new key frame based on it, follow these steps:

  1. Disable the track with the parameter by pressing .
  2. Tweak the parameter (change its value, move the node, etc.).
  3. Create a snapshot of the parameter in the Tracker:
    1. Set the time slider in the position where a key frame is to be created.

    2. Select the track with the parameter.
    3. Click     to add a key frame with value grabbed from the Editor.
  4. Enable the track again and play the animation.

How to Move a Node

To move a node (for example, to animate a platform so that it moves up and down), follow these steps:

  1. Click to add a new track.
  2. Choose node -> position track.
  3. Select a node to be animated. Key frames will be automatically created at the track start from the current position of the node.
  4. Disable the track with the parameter by pressing .
  5. Press X to enable node moving mode in the editor. Move the node to a new position.
  6. Create a snapshot of new position from the editor (see how to do it).
  7. Enable the track by clicking again.
  8. See the created track path in the world:
    • Enable the track graph    , if disabled.
    • Enable editor Visualizer (Helpers -> Visualizer), if disabled.
  9. You can edit the path in the world by dragging arrow manipulators for each key frame point. To be able to drag the node in all directions, add key frames for all axes.
  10. If necessary, in the Type field of the track choose velocity and follow the axis modes.

Tip for Follow mode If you want to control the orientation of the node for follow the axis mode (without having to reexport the mesh, for example) you can use a dummy node:
  1. Create a dummy node.
  2. Add your node as its child.
  3. Orient and position it relative the dummy however necessary.

How to Change Materials

Setting another material To change the materials set to an object surface, follow these steps:
  1. Add node -> object -> material track.
  2. Choose a node.
  3. In the Surface field of the track, choose a surface to change material for.
  4. Double click on the track line to select the material (from the loaded material libraries) to be applied.
Changing material setting To change a materials setting over time (toggle the state or change a parameter), follow these steps:
  1. Press M to open Materials settings and choose the material. Check, if the setting you want to animate is a state (a checkbox or a drop-down list), a parameter or a texture.
  2. Add a material track in the Tracker:
    • For one of common material settings, simply select it in the list.
    • For a material state with a checkbox, select stateToggle.
    • For a material state with a drop-down list, select stateSwitch.
    • For a material parameter with a slider, select parameterSlider.
    • For a parameter with a color picker, select parameterColor.
    • For a material texture, select textureImage.
  3. Choose a material which setting is to be animated. (It should be an inherited material, as base materials cannot be changed!)
  4. Unless the common setting is added, you will see a drop-down list titled State, Parameter or Texture for the track. Select the setting that the track will control.
  5. Double click on the track line to create a key frame:
    • For one of common material settings or stateToggle, double click enables and disables the setting.
    • For stateSwitch:
      • To set the 1st state from the drop-down list in Materials settings, set 0 as track Value.
      • Track Value of 1 means the 2nd state in the drop-down list.
      • Track Value of 2 means the 3rd state in the drop-down list, etc.
    • For parameterSlider, set the Value.
    • For parameterColor, pick a color.
    • For textureImage, choose a file.

How to Change Properties

Setting another property To change the property set to an object surface, follow these steps:
  1. Add node -> object -> property track.
  2. Choose a node.
  3. In the Surface field of the track, choose a surface to change property for.
  4. Double click on the track line to select the property (from the loaded property libraries) to be applied.
Changing property setting To change a property setting over time (toggle the state or change a parameter), follow these steps:
  1. Press O to open Properties editor and choose the property. Check, if the setting you want to animate is a state (a checkbox or a drop-down list) or a parameter (a checkbox, a drop-down list, a float value, a text string, or a color picker).
  2. Add a property track in the Tracker:
  3. Choose a property which setting is to be animated. (It should be an inherited property, as base properties cannot be changed!)
  4. Unless the common setting is added, you will see a drop-down list titled State or Parameter for the track. Select the setting that the track will control.
  5. Double click on the track line to create a key frame:
    • For intersection, collision, stateToggle or parameterToggle, double click enables and disables the setting.
    • For stateSwitch or parameterSwitch:
      • To set the 1st state or parameter from the drop-down list in Properties editor, set 0 as track Value.
      • Track Value of 1 means the 2nd state or parameter in the drop-down list.
      • Track Value of 2 means the 3rd state or parameter in the drop-down list, etc.
    • For parameterFloat, set the Value.
    • For parameterString, set a string.
    • For parameterColor, pick a color.

How to Play Sounds

Switching on a sound source To play the sound from a positional sound source:
  1. Add node -> soundsource -> play track.
  2. Choose a sound source.
  3. Double click on the track line to start or stop playback of sound source sound.
Switching on all sounds To switch on or off sounds in the world (ambient and positional sound sources):
  1. Add sound -> enabled track.
  2. Double click on the track line to enable or disable all sounds.
Controlling Sound Volume To increase or decrease the volume of all sounds played in the world (ambient and positional sound sources):
  1. Add sound -> volume track.
  2. Double click on the track to set the volume of all sounds:
    • By the minimum 0, there are no sounds.
    • By the maximum 0, sounds are played at the maximum volume.

How to Create Cutscenes

Preparing for cutscenes creation Before you start creating your cinematics, follow these steps:
  1. Add a camera into the world (     Add a node ->     Player node). This could be:
    • A Dummy player (a free-flying camera)
    • A Persecutor player (if a camera needs to follow one specific node).
  2. Open the cameras viewport widget (     Camera on the editor panel at the top). Here, you can switch between the current players in the world by choosing them in the drop-down list.
  3. After that, you can edit the cameras and see the result in the viewport widget right in the editor.
Switching between cameras in game To select the camera that views the world in the game mode:
  1. Add game -> player -> node track.
  2. Double click on the track line to set the player to render the screen at the given time.
  3. Choose one of players in the list.
Creating fade-in and fade-out effects To add fade-in or fade-out effects:
  1. Add render -> fadeColor track.
  2. A key frame with 0 alpha will be automatically created.
  3. Double click on the created key. This color has 0 alpha value channel, which means it is absolutely transparent.
  4. Set alpha (A slider) to 255 to create a solid color (for example, black) and click Ok.
  5. Double click on the track line to create another key frame. This color should have 0 alpha.
  6. Key frame colors are smoothly interpolated from solid color to completely transparent one (revealing a screen image).
    • To create a fade-in effect, position a solid color key first and after that a transparent key frame.
    • To create a fade-out effect, position a transparent key frame first and after that a solid color key.
Moving a camera
  1. Go to Tools -> Common tab and uncheck Game camera box.
    Notice
    Otherwise, cameras will be synchronized with the camera position in the editor and Camera viewport widget will not show the final in-game result.
  2. Add node -> position track.
  3. Select the camera you want to move. Position key frames will be automatically created at the track start based on the current position of the player.
  4. Choose Follow Z mode. (All cameras face in the negative Z direction by default.)
  5. See the created track path in the world:
    • Enable the track graph    , if disabled.
    • Enable editor Visualizer (Helpers -> Visualizer), if disabled.
  6. Disable the track, drag the camera into a new position and create position parameter snapshot.
  7. As a final step, set the camera to be used in-game.
Rotating a camera Rotating the camera is much the same as moving it. After that, disable the track, rotate the camera to view at different angle and create rotation parameter snapshot.
Following a node with a camera A camera can follow a node in the world and keep it in view wherever it moves if Persecutor player is used.
  1. Add node -> player -> persecutor -> target track.
  2. Select the Persecutor player.
  3. Double click on the track line. Choose a node that this player will follow.
  4. By default the camera will focus on the center of coordinates of the node. You can change the point of focus:
    1. Add node -> player -> persecutor -> anchor track.
    2. Double click on the track line to set anchor values: they change coordinates of the point of focus by X, Y and Z axes.
  5. Adjust the distance between the node and the persecutor. For that, add node -> player -> persecutor -> distance track.
    Notice
    The distance can only be within Min - Max distance range set for the persecutor (Nodes -> Persecutor tab).
  6. As a final step, set the camera to be used in-game.
Changing cameras settings To set up players (change field of view of cameras or their clipping plane distances), you can use one of the following ways:
  • Set up in-game player parameters. That is, they will be applied to the camera currently used in the game.
  • Set up player node parameters. These parameters control settings for each separate camera.
For example, it could be more convenient to set the field of view for each camera and after that simply change in-game cameras than to create one track that changes FOV for in-game camera, no matter what it is.
Applying postprocesses To apply postprocesses, you can choose one of the following ways:
  • Add postprocesses for in-game player (game -> player -> postMaterials track). When cameras are switched, the postprocess will still be applied to the current in-game camera.
  • Add postprocesses via render settings (render -> postMaterials track). They are applied to the screen image (all cameras) and can be used together with players postprocess materials.

How to Mix Different Tracks

Let's say, you have created track files that control day-night cycle and a number of tracks that control weather conditions (windy, cloudy and rainy weather). If you want to mix different weather conditions together (for example, make a sunny morning, cloudy day and rainy evening), you can use tracks called track.

Here is one of possible scenarios that you can use for mixing tracks:
  1. First of all, press Save button in Tracker to save the list of tracks into separate *.track files. For example, create separate track files for:
    • Day-night cycle with sunny weather (0-20 units time range)
    • Day-night cycle with cloudy weather (0-20 units time range)
    • Weather condition track with rain (0-1 units time range)
  2. Clear the Tracker from tracks by clicking Clear button.
  3. Click     to set time limits:
    • Set Min time to 0.
    • Set Max time to 20.
    This way, our day-night cycle racks can be played with the same speed as they were created.
  4. Add a track named track.
  5. Double click on the track line to create a key frame.
  6. Choose a *.track file to load. For example, first of all we will load a sunny day-night cycle track.
  7. Let's say, the time range of the loaded track is from 0 to 20 and we want this track to be played at the same speed as it was created. For that Time line is used.
    1. Double click on the Time line and set Time = 0 and Value = 0. This means, that all day-night cycle tracks will be played from the very beginning.
    2. Create another key frame on Time track with Time = 20 and Value = 20. Thus on the 20th time unit of the track all internal tracks will also be at their 20th time unit.
  8. Add cloudy day-night cycle track:
    1. Add a track track.
    2. Double click on the Track line to load a cloudy day-night cycle track.
    3. The same as for the first sunny track, on the Time line, create two key frames to set the linear time scale for playback. One should have Time = 0 and Value = 0, and another should have Time = 20 and Value = 20.
  9. Now we need to specify when a sunny track is to be played and when a cloudy one using track weights:
    1. Double click on the Weight line to add its weight. We will use 0 (track has no influence) and 1 (track controls what is rendered on the screen).
      Notice
      1 is used for for for convenience sake: it can be any value (only proportion matters).
    2. To create smooth transition between from the sunny morning to the cloudy day, add the following weights:

  10. After that, we can mix in weather conditions (rain).
    1. Add a track track.
    2. Double click on the Track line to load a rain track.
    3. On the Time line, add a time interval during which it is raining (see the picture below).
    4. On the Weight line, add a weight with value of 1. Otherwise, the track will not be played. Cloudy cycle and rain will be properly mixed together.

Last update: 21.12.2017
Build: ()