Reyhard/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
* APR naming convention
* APR naming convention
}}
}}
-->{{Feature|important|Before going any further, make sure that [[Arma_Reforger:Enfusion_Blender_Tools#Installation|'''Enfusion Blender Tools Data''']] is installed correctly. Without it, '''export profiles will be missing'''!}}APR files are used for animations export. These files contain export profiles. Profiles can be found in {{hl|anims\export_profiles}}. The export profile defines which bones to export and how to export them. Export profiles have to correspond with the used skeleton in the take.
-->{{Feature|important|Before going any further, make sure that [[Arma_Reforger:Enfusion_Blender_Tools#Installation|'''Enfusion Blender Tools Data''']] is installed correctly. Without it, '''export profiles will be missing'''!}}APR files are used for animations export. These files contain export profiles. Profiles can be found in {{hl|anims\export_profiles}}. The export profile defines which bones to export and how to export them. Export profiles have to correspond with the used skeleton in the action.


It exports animation data for Enfusion. To have an animation created in Blender in Enfusion, follow these steps:
It exports animation data for Enfusion. To have an animation created in Blender in Enfusion, follow these steps:
Line 26: Line 26:
==Animation==
==Animation==
===Export Animation from Blender===
===Export Animation from Blender===
TXA Export is available in top section of 3D viewport if you have at least one Armature & one Action present in the current scene. From that top bar, select '''Enfusion Tools -> Export -> Enfusion Animation (.txa)''' to initiate animation export.
TXA Export is available in top section of 3D viewport if you have at least one '''Armature''' & '''Action''' present in the current scene. From that top bar, select '''Enfusion Tools -> Export -> Enfusion Animation (.txa)''' to initiate animation export.{{Feature|important|Since '''0.9.7''' version of Enfusion Blender Tools, '''running Workbench''' with '''net API enabled''' is required}}[[Image:armareforger-blender-txa-export-toolbar.jpg|800px]]
 
[[Image:armareforger-blender-txa-export-toolbar.jpg|800px]]


Once that button is pressed, following window should be visible:
Once that button is pressed, following window should be visible:
Line 39: Line 37:
Top section contains following things:
Top section contains following things:


* '''Save location''' - folder where the exported actions will be stored
* '''Save location''' - folder where the exported actions will be stored. You can either type in the location or use '''Change save location''' button located on the right side
* '''Folder with export profiles -'''  
* '''Folder with export profiles -''' folder with animation export profiles which should be currently used. This list populated through '''Export Profile Folder''' parameter located in  '''Enfusion Blender Tools settings.'''
* '''Armature name -''' name of the armature which will be used for export. Bone transformations from this armature are processed by the exporter and stored in exported TXA file. In
* '''Armature name -''' name of the armature which will be used for export. Bone transformations from this armature are processed by the exporter and stored in exported TXA file.
* '''Secondary armature name''' ''(optional)'' '''-''' name of the secondary armature which will be used during export . This is parameter is useful when armature, which you want to transform, is constrained to another armature. In case of Rigify rig, in this field should be selected name of the Rigify control rig.
* '''Secondary armature name''' ''(optional)'' '''-''' name of the secondary armature which will be used during export . This is parameter is useful when armature which you want to export, is constrained to another armature and doesn't have any motion itself. In case of Rigify rig, in this field should be selected name of the Rigify control rig.


==== Action list ====
==== Action list ====
Line 50: Line 48:


==== Action export list ====
==== Action export list ====
[[File:armareforger-blender-txa-export-export-list.png]]
Action export list is the hear of TXA exporter. Over there you can add define how given action will be exported. New  
Action export list is the hear of TXA exporter. Over there you can add define how given action will be exported. New  


* '''Enable checkbox -''' control if this export is active or not. In inactive state '''no txa''' will be generated
* '''Enable checkbox -''' control if this export is active or not. In inactive state '''no txa''' will be generated
* '''Profile -''' [[Arma Reforger:Animation Export Profiles|animation export profile]] which will be used on this export
* '''Profile -''' [[Arma Reforger:Animation Export Profiles|animation export profile]] which will be used on this export. By default, assuming [[Arma_Reforger:Enfusion_Blender_Tools#Installation|Enfusion Blender Tools Data]] was correctly installed, there should be dozens of available animation exports which were used on Reforger assets. Selected profile has to correspond with the skeleton - otherwise no animation will be exported.
* '''File''' - name of resulting txa file
* '''File''' - name of resulting txa file
* '''Diff pose''' ''(optional)'' - name of the action which will be used as difference target for additive transformations. If you are using animation profile which doesn't have any additive transformations, you can leave that field empty
* '''Diff pose''' ''(optional)'' - name of the action which will be used as difference target for additive transformations. If you are using animation profile which doesn't have any additive transformations, you can leave that field empty
* '''Diff pose frame''' ''(optional)'' -  frame  
* '''Diff pose frame''' ''(optional)'' -  frame of '''diff pose''' which will be used as a base for additive animations export
{{Feature|warning|Selecting proper '''export profile''' is crucial for correct export of animation! In case of custom rig, it might be necessary to create '''custom animation export profiles'''}}
{{Feature|warning|Selecting proper '''export profile''' is crucial for correct export of animation! In case of custom rig, it might be necessary to create '''custom animation export profiles'''}}


 
Once all desired animation actions are selected and properly configured for export (meaning they have '''correct animation export profile''' selected), it is now possible to finally perform export to TXA. To do so, press '''OK''' button in bottom section of the export window.
In '''export section''' all animation takes related to selected Armature (picked in '''Armature name''' option) should be listed. By clicking on '''Show exports''' checkbox next to desired action name, it is possible to enable export of that animation and further define what action should be exported.
 
In '''export options''' section it is possible to change following things:
*Pick animation '''[[Arma Reforger:Animation Export Profiles|export profile]]'''. All the profiles have to be in {{hl|anims\export_profiles}} or in a subdirectory. By default, assuming [[Arma_Reforger:Enfusion_Blender_Tools#Installation|Enfusion Blender Tools Data]] was correctly installed, there should be dozens of available animation exports which were used on Reforger assets. Selected profile has to correspond with the skeleton - otherwise no animation will be exported.
*Select animation for difference animations. This is only used if additive animation export profile is used.
*Change '''file name''' of exported animation. If this field is empty, plugin will use action name for creation of new txa
Location of where TXA files will be generated can be changed by selecting different directory in the '''save location''' field in the top section of export window.
 
Once all desired animation actions are selected and properly configured for export (meaning they have '''correct animation export profile''' selected), it is now possible to finally perform export to TXA. To do so, press '''Export TXA''' button in bottom right section of the export window.
====Default Profile====
====Default Profile====
If you create a new rig, you will need to create a new set of export profiles for it. As this can get tedious, you can generate a new export profile from the Workbench:
If you create a new rig, you will need to create a new set of export profiles for it. As this can get tedious, you can generate a new export profile from the Workbench by following instructions located on [[Arma_Reforger:Animation_Export_Profiles#Creation|Arma Reforger:Animation Export Profiles]] page.


in the model's import settings, check the "Generate Default Profile" option that will generate a sample profile. This default profile will export the transformation and rotation of each bone as absolute values. You can build your own profiles based on this profile.
===Import Animation to Enfusion===
===Import Animation to Enfusion===
Once TXA is generated, there are two ways how to convert TXA into .ANM file:
Once TXA is generated, there are two ways how to convert TXA into .ANM file:

Revision as of 14:19, 30 November 2022

Animations for Enfusion are exported into an intermediate human-readable format TXA. This format needs to be further compiled by the Enfusion engine into ANM - a binary format used during the runtime.

Before going any further, make sure that Enfusion Blender Tools Data is installed correctly. Without it, export profiles will be missing!

APR files are used for animations export. These files contain export profiles. Profiles can be found in

anims\export_profiles

. The export profile defines which bones to export and how to export them. Export profiles have to correspond with the used skeleton in the action.

It exports animation data for Enfusion. To have an animation created in Blender in Enfusion, follow these steps:

  1. Export the FBX model from Blender with an armature matching the animation you want to export
  2. Import the FBX model into Enfusion
  3. Export the animation from Blender (TXA format)
  4. Import the animation TXA file into the Enfusion
If you are trying to make animation to already existing character then you can skip directly to Export Animation from Blender paragraph

FBX

Export FBX from Blender

Set the pose mode to rest for a given skeleton to export the rig. When exporting this FBX, make sure that you uncheck Add leaf bones option.

Import FBX to Enfusion

Import settings inside Workbench

armareforger-blender-txa-export-register-as-anim.png Import the model "As Model" and afterwards set import to import skinning too.

Animation

Export Animation from Blender

TXA Export is available in top section of 3D viewport if you have at least one Armature & Action present in the current scene. From that top bar, select Enfusion Tools -> Export -> Enfusion Animation (.txa) to initiate animation export.

Since 0.9.7 version of Enfusion Blender Tools, running Workbench with net API enabled is required

armareforger-blender-txa-export-toolbar.jpg

Once that button is pressed, following window should be visible:

armareforger-blender-txa-export-animation3.png

Top section

armareforger-blender-txa-export-animation-top-section.png

Top section contains following things:

  • Save location - folder where the exported actions will be stored. You can either type in the location or use Change save location button located on the right side
  • Folder with export profiles - folder with animation export profiles which should be currently used. This list populated through Export Profile Folder parameter located in Enfusion Blender Tools settings.
  • Armature name - name of the armature which will be used for export. Bone transformations from this armature are processed by the exporter and stored in exported TXA file.
  • Secondary armature name (optional) - name of the secondary armature which will be used during export . This is parameter is useful when armature which you want to export, is constrained to another armature and doesn't have any motion itself. In case of Rigify rig, in this field should be selected name of the Rigify control rig.

Action list

armareforger-blender-txa-export-animation-list.png

Action list contains actions found in the scene. Actions marked as assets are hidden from this list. Each individual action has Show exports checkbox, which controls the visibility of Action export list - this option is quite useful when dealing with large amount of actions like on example picture above.

Action export list

armareforger-blender-txa-export-export-list.png

Action export list is the hear of TXA exporter. Over there you can add define how given action will be exported. New

  • Enable checkbox - control if this export is active or not. In inactive state no txa will be generated
  • Profile - animation export profile which will be used on this export. By default, assuming Enfusion Blender Tools Data was correctly installed, there should be dozens of available animation exports which were used on Reforger assets. Selected profile has to correspond with the skeleton - otherwise no animation will be exported.
  • File - name of resulting txa file
  • Diff pose (optional) - name of the action which will be used as difference target for additive transformations. If you are using animation profile which doesn't have any additive transformations, you can leave that field empty
  • Diff pose frame (optional) - frame of diff pose which will be used as a base for additive animations export
Selecting proper export profile is crucial for correct export of animation! In case of custom rig, it might be necessary to create custom animation export profiles

Once all desired animation actions are selected and properly configured for export (meaning they have correct animation export profile selected), it is now possible to finally perform export to TXA. To do so, press OK button in bottom section of the export window.

Default Profile

If you create a new rig, you will need to create a new set of export profiles for it. As this can get tedious, you can generate a new export profile from the Workbench by following instructions located on Arma Reforger:Animation Export Profiles page.

Import Animation to Enfusion

Once TXA is generated, there are two ways how to convert TXA into .ANM file:

  • Drag and drop the TXA file into the Resource Browser.
  • Click on TXA with Right Mouse Button and select "Register and Import" option from the Context Menu.

Once animation is imported, .ANM file will be automatically regenerated every time Workbench detects change in .TXA. If TXA was modified when Workbench was closed, manual reimport might be necessary.