Difference between revisions of "Documentation/Tools/SCS Blender Tools/Animation system"
< Documentation | Tools | SCS Blender Tools (→SCS Skeleton Panel) |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
<li><p>'''Program driven animations''' which mostly expects animation range from 0 to 1 if not stated differently in animation definition files. This means that first frame will be used as 0 state and last frame will be used as state 1, any state between this range is interpolated across whole keyframe range of animation. Example of these animations are truck interior animations in Euro Truck Simulator 2 which are defined inside each truck definition folder (example path: ''"def/vehicle/truck/man.tgx/interior/animations.sui"'').</p></li> | <li><p>'''Program driven animations''' which mostly expects animation range from 0 to 1 if not stated differently in animation definition files. This means that first frame will be used as 0 state and last frame will be used as state 1, any state between this range is interpolated across whole keyframe range of animation. Example of these animations are truck interior animations in Euro Truck Simulator 2 which are defined inside each truck definition folder (example path: ''"def/vehicle/truck/man.tgx/interior/animations.sui"'').</p></li> | ||
<li><p>'''Static loop animations''' used by so called "mover" objects. Movers can be placed all around the game world with the help of map editor. Examples for mover objects are: windmills, pedestrians, animals etc. To create your own mover you should create new ''"def/world/mover.\<id_of_your_mod>.sii"'' file and define mover in that file by the template from original ''"def/world/mover.sii"'' file.</p> | <li><p>'''Static loop animations''' used by so called "mover" objects. Movers can be placed all around the game world with the help of map editor. Examples for mover objects are: windmills, pedestrians, animals etc. To create your own mover you should create new ''"def/world/mover.\<id_of_your_mod>.sii"'' file and define mover in that file by the template from original ''"def/world/mover.sii"'' file.</p> | ||
− | <blockquote> | + | <blockquote>{{Note|Special type of movers named "walkers" can also use forward movement in their animation which can be animated as movement of skeleton object on Y axis.}}</blockquote></li></ol> |
− | Regardless of the SCS Animation type, creation pipeline within Blender Tools is the same for both above types. To create SCS Animation you will have to use standard Blender procedure of [ | + | Regardless of the SCS Animation type, creation pipeline within Blender Tools is the same for both above types. To create SCS Animation you will have to use standard Blender procedure of [https://docs.blender.org/manual/animation/armatures/introduction.html armature creation], [https://docs.blender.org/manual/animation/armatures/skinning/parenting.html#with-empty-groups vertices skinning], [https://docs.blender.org/manual/en/latest/animation/armatures/posing/introduction.html bones posing] and [https://docs.blender.org/manual/en/latest/animation/keyframes/introduction.html setting keyframes]. |
− | <blockquote> | + | <blockquote>{{Note|Only location, rotation and scale manipulation of bones will be exported during SCS Animation export, anything else will be ignored even if it will be animated and played inside Blender.}} |
</blockquote> | </blockquote> | ||
− | After you successfully animate bones with Blender action you will have to set up SCS Animation in SCS Animations panel. Once setup is done you can export your SCS Game Object as you did before and animations will be exported with it. | + | After you successfully animate bones with Blender action you will have to set up SCS Animation in [[#SCS Animations panel]]. Once setup is done you can export your SCS Game Object as you did before and animations will be exported with it. |
− | <blockquote> | + | <blockquote>{{Note|Remember that for export of animated model you have to enable '''''Animated Model''''' in SCS Root Object properties, switch can be found in the locators panel [[Documentation/Tools/SCS Blender Tools/Root objects|Root objects]].}} |
</blockquote> | </blockquote> | ||
+ | |||
+ | |||
= SCS Animations panel = | = SCS Animations panel = | ||
− | To export created Blender action into the game you will have to define SCS Animations with usage of SCS Animations panel which you can find inside Blender | + | To export created Blender action into the game you will have to define SCS Animations with usage of SCS Animations sub-panel which you can find inside Blender properties window in ''Object'' tab under ''SCS Object'' panel. The panel will appear only if the currently selected object is armature. |
− | [[File:SCS_Tools_Object_Specials_-_Animations.png]] | + | [[File:SCS_Tools_Object_Specials_-_Animations.280.png]] |
− | <blockquote> | + | <blockquote>{{Note|When seeing "No 'SCS Root Object'!" message instead of animations list make sure to parent armature object to SCS Root Object.}} |
</blockquote> | </blockquote> | ||
+ | |||
=== Custom Export Path === | === Custom Export Path === | ||
Line 32: | Line 35: | ||
=== SCS Animations list === | === SCS Animations list === | ||
− | SCS Animations list contains all animations used on current SCS Game Object. For creation or deletion of SCS Animations use | + | SCS Animations list contains all animations used on current SCS Game Object. For creation or deletion of SCS Animations use <span style="color:#FFFFFF">{{Blender Button|'''+'''}}</span> and <span style="color:#FFFFFF">{{Blender Button|'''−'''}}</span> buttons on the side of the animations list. Furthermore, animations can be imported with import button ( <span style="color:#FFFFFF">{{Blender Button|'''⤓'''}}</span> ), which will place you into the file browser to select SCS Animation for importing. |
Each SCS Animation entry features: | Each SCS Animation entry features: | ||
+ | * export inclusion property will exclude animation used in that line from exporting, if it's unchecked and you are exporting whole SCS Game Object, | ||
* name of SCS Animation which will be also used as the name of exported animation file (PIA), | * name of SCS Animation which will be also used as the name of exported animation file (PIA), | ||
− | * export operator | + | * export operator button for direct export of animation used in that line via file browser. |
− | |||
=== Active Animation Settings === | === Active Animation Settings === | ||
Line 49: | Line 52: | ||
* '''End''' - frame in action which will be used as an end of SCS Animation, | * '''End''' - frame in action which will be used as an end of SCS Animation, | ||
* '''Length''' - SCS Animation duration in seconds, | * '''Length''' - SCS Animation duration in seconds, | ||
− | * '''Increase Animation Step ( | + | * '''Increase Animation Step ( <span style="color:#FFFFFF">{{Blender Button|+}}</span> )''' - stretches action by factor 2 and increases '''''Export Step''''' by 1 to compensate scaling. This gives you better control on sub keyframes and distribution of transformations over time, |
− | * '''Decrease Animation Step ( | + | * '''Decrease Animation Step ( <span style="color:#FFFFFF">{{Blender Button|−}}</span> )''' - shrinks action by factor 2 and decreases '''''Export Step''''' by 1 to compensate scaling. This removes each second keyframe, which decreases control over the animation, |
* '''Export Step''' - number of frames to step in Blender action for each iteration during export. | * '''Export Step''' - number of frames to step in Blender action for each iteration during export. | ||
Line 57: | Line 60: | ||
To preview currently selected SCS Animation you can use Animation Player, which is nothing more than wrapped interface from multiple Blender editors for already existing settings. | To preview currently selected SCS Animation you can use Animation Player, which is nothing more than wrapped interface from multiple Blender editors for already existing settings. | ||
− | |||
− | |||
First row consist from '''Start''', '''End''' and '''Current''' frame of animation playback. While second row gives you possibility to use playback controls and set FPS for animation playback. | First row consist from '''Start''', '''End''' and '''Current''' frame of animation playback. While second row gives you possibility to use playback controls and set FPS for animation playback. | ||
− | <blockquote> | + | <blockquote>{{Note|Changing FPS manually will invalidate preview of currently selected SCS Animation as FPS is calculated by set '''''Start''''', '''''End''''' and '''''Length''''' of SCS Animation.}} |
</blockquote> | </blockquote> | ||
Line 68: | Line 69: | ||
There is also additional panel for setting custom skeleton file path inside SCS Project Base Path and name of skeleton file (PIS) which will be created in the case of exporting animated SCS Game Object. | There is also additional panel for setting custom skeleton file path inside SCS Project Base Path and name of skeleton file (PIS) which will be created in the case of exporting animated SCS Game Object. | ||
− | [[File:SCS_Tools_Object_Specials_-_Skeleton.png]] | + | [[File:SCS_Tools_Object_Specials_-_Skeleton.280.png]] |
This custom path and name come handy again in the case of creating sequence of animations for walkers, as all of your walkers can use the same skeleton and thus you may export skeleton in different directory. | This custom path and name come handy again in the case of creating sequence of animations for walkers, as all of your walkers can use the same skeleton and thus you may export skeleton in different directory. | ||
If both paths remain empty, skeleton file (PIS) will be saved beside other exported files and will use SCS Root Object name as the name of the file. | If both paths remain empty, skeleton file (PIS) will be saved beside other exported files and will use SCS Root Object name as the name of the file. |
Latest revision as of 15:07, 5 December 2019
Animations used in SCS games are driven by skeletons and keyframe animations (which are manipulating bones in the skeleton). There are two types of these animations:
Program driven animations which mostly expects animation range from 0 to 1 if not stated differently in animation definition files. This means that first frame will be used as 0 state and last frame will be used as state 1, any state between this range is interpolated across whole keyframe range of animation. Example of these animations are truck interior animations in Euro Truck Simulator 2 which are defined inside each truck definition folder (example path: "def/vehicle/truck/man.tgx/interior/animations.sui").
Static loop animations used by so called "mover" objects. Movers can be placed all around the game world with the help of map editor. Examples for mover objects are: windmills, pedestrians, animals etc. To create your own mover you should create new "def/world/mover.\<id_of_your_mod>.sii" file and define mover in that file by the template from original "def/world/mover.sii" file.
Note: Special type of movers named "walkers" can also use forward movement in their animation which can be animated as movement of skeleton object on Y axis.
Regardless of the SCS Animation type, creation pipeline within Blender Tools is the same for both above types. To create SCS Animation you will have to use standard Blender procedure of armature creation, vertices skinning, bones posing and setting keyframes.
Note: Only location, rotation and scale manipulation of bones will be exported during SCS Animation export, anything else will be ignored even if it will be animated and played inside Blender.
After you successfully animate bones with Blender action you will have to set up SCS Animation in #SCS Animations panel. Once setup is done you can export your SCS Game Object as you did before and animations will be exported with it.
Note: Remember that for export of animated model you have to enable Animated Model in SCS Root Object properties, switch can be found in the locators panel Root objects.
Contents
SCS Animations panel
To export created Blender action into the game you will have to define SCS Animations with usage of SCS Animations sub-panel which you can find inside Blender properties window in Object tab under SCS Object panel. The panel will appear only if the currently selected object is armature.
Note: When seeing "No 'SCS Root Object'!" message instead of animations list make sure to parent armature object to SCS Root Object.
Custom Export Path
Custom export path should be used to store your animation files somewhere else than the rest of the files when exporting SCS Game Object.
This path may be useful when you are creating sequence of animations for walkers, as all of your walkers can use the same skeleton and animations and thus you may export them in different directory.
If custom path remains disabled, all of the SCS Animations will be exported beside the rest of the files.
SCS Animations list
SCS Animations list contains all animations used on current SCS Game Object. For creation or deletion of SCS Animations use + and − buttons on the side of the animations list. Furthermore, animations can be imported with import button ( ⤓ ), which will place you into the file browser to select SCS Animation for importing.
Each SCS Animation entry features:
- export inclusion property will exclude animation used in that line from exporting, if it's unchecked and you are exporting whole SCS Game Object,
- name of SCS Animation which will be also used as the name of exported animation file (PIA),
- export operator button for direct export of animation used in that line via file browser.
Active Animation Settings
This panel area is place where you link Blender action (animation) and set various properties to currently selected SCS Animation in list.
Properties of SCS Animation:
- Start - frame in action which will be used as a start of SCS Animation,
- End - frame in action which will be used as an end of SCS Animation,
- Length - SCS Animation duration in seconds,
- Increase Animation Step ( + ) - stretches action by factor 2 and increases Export Step by 1 to compensate scaling. This gives you better control on sub keyframes and distribution of transformations over time,
- Decrease Animation Step ( − ) - shrinks action by factor 2 and decreases Export Step by 1 to compensate scaling. This removes each second keyframe, which decreases control over the animation,
- Export Step - number of frames to step in Blender action for each iteration during export.
Animation Player
To preview currently selected SCS Animation you can use Animation Player, which is nothing more than wrapped interface from multiple Blender editors for already existing settings.
First row consist from Start, End and Current frame of animation playback. While second row gives you possibility to use playback controls and set FPS for animation playback.
Note: Changing FPS manually will invalidate preview of currently selected SCS Animation as FPS is calculated by set Start, End and Length of SCS Animation.
SCS Skeleton panel
There is also additional panel for setting custom skeleton file path inside SCS Project Base Path and name of skeleton file (PIS) which will be created in the case of exporting animated SCS Game Object.
This custom path and name come handy again in the case of creating sequence of animations for walkers, as all of your walkers can use the same skeleton and thus you may export skeleton in different directory.
If both paths remain empty, skeleton file (PIS) will be saved beside other exported files and will use SCS Root Object name as the name of the file.