Skip to content

mirv_agr

mirv_agr

This article is focused on Source engine, for GoldSrc additionally see [[GoldSrc:mirv_agr]].

Table of contents

Supported Games

  • Counter-Strike: Global Offensive
  • Counter-Strike: Source
  • Counter-Strike: Source v34
  • Team Fortress 2

What does it do?

  • AdvancedFX Game Recording (AGR) is a recording method which allows you to import recorded motion data into the 3D software Blender.

Things you should know

Commands

Counter-Strike: Global Offensive ONLY with [[mirv_streams|Source:mirv_streams]]

host_timescale 0
host_framerate 30
mirv_streams record agr enabled 0|1
mirv_streams record agr recordPlayers 0|1
mirv_streams record agr recordInvisible 0|1
mirv_streams record agr recordWeapons 0|1
mirv_streams record agr recordProjectiles 0|1
mirv_streams record agr recordCamera 0|1
mirv_streams record agr recordPlayerCameras -1|0|<PlayerIndex> - should be used in freecam view
mirv_streams record agr recordViewmodels -1|0|<PlayerIndex> - should be used in freecam view

CS:GO, CS:S, CS:S v34, TF2

host_timescale 0 
host_framerate 30

mirv_agr debug 0|1|2 - Debug level
mirv_agr enabled 0|1 - Enable / disable recording (Has to be enabled before loading the demo if you want to use AGR!).

mirv_agr recordCamera 0|1
mirv_agr recordPlayers 0|1
mirv_agr recordWeapons 0|1
mirv_agr recordProjectiles 0|1
mirv_agr recordInvisible 0|1
mirv_agr recordViewmodel 0|1
mirv_agr recordPlayerCameras -1|0|<PlayerIndex> - CSGO exclusive, should be used in freecam view
mirv_agr recordViewmodels -1|0|<PlayerIndex> - CSGO exclusive, should be used in freecam view

mirv_agr start <FilePath\Name.agr>
mirv_agr stop - Stop recording.

Import Scripts

In order to import an AGR file to Blender, you have to download and install the AFX-Blender-Scripts and Blender Source Tools.

Requires Blender 2.8 or later:

Example (CSGO)

1. Choose your commands

host_timescale 0
host_framerate 30
mirv_streams record agr enabled 1
mirv_streams record agr recordPlayers 1
mirv_streams record agr recordInvisible 0
mirv_streams record agr recordWeapons 1
mirv_streams record agr recordProjectiles 0
mirv_streams record agr recordCamera 0
mirv_streams record agr recordPlayerCameras <PlayerIndex>
mirv_streams record agr recordViewmodels <PlayerIndex>

To get the Playerindex use the command:

mirv_listentities isPlayer=1

With these commands you will record the character, viewmodel and weapon models. Grenades(Projectiles) are disabled in this example for better performance, but can be enabled for sure!

Pros and Cons for not recording Viewmodels and Weapons

Pros:

  • Smaller file size
  • Decreasing import time
  • More flexibility in terms of Animations (e.g. custom death animations)
  • Changing Weapon (e.g. using a M4A4 instead of AK-47)

Cons:

  • You have to do the PoV and PoV-bobbing manually (How the weapon bounces while running)
  • Weapon drop animations (dropping and dying) have to be done manually

2. Recording

  • Make sure that you record in free camera. Do not spectate in first or third person, if you record PlayerCameras and Viewmodels!
  • The default save path is .
  • Follow the [[Source:Smoother-Demos]] before recording, which prevents your demo from lagging.
  • Commands for the CS:GO mirv_stream method:
mirv_streams record start
mirv_streams record end

3. Decompiling Models

Method 1:

  • 1: Download GCFScape and Crowbar
  • 2: Open the with GCFScape inside your folder
  • 3: Go to and right-click extract the folders.
  • 4: Open Crowbar, enable the option and decompile the Player / Weapons folder, recommended to enable "Bone animation SMD files".
  • 5: Create a new folder called e.g. , create another folder inside called and move the decompiled Players and Weapons folders inside there.

Method 2: Download Devostated's Decompiled Models with fixed .SMDs for fewer errors and extra models and animations.

4. Setting up Blender and importing AGR

  • 1: After installing and enabling both Blender scripts, delete the Default Scene (Cube, Light and Camera) change the frame rate to 30 fps and go to .
  • 2: Enable the console to see any errors and progress.
  • 3: Go to
  • 4: Open the folder of your AGR .
  • 5: Add the path of your Decompiled Models folder (e.g. and get your import settings.

Import settings

  • 5.1: You can change different options such as:
    • Asset Path (Path to decompiled models)
    • Add interpolated key frames (Creates interpolated key frames for frames in-between the original key frames)
    • Scale (Scales everything by this value. 0.01 is default, cause it works with most map importers. A value of 2.54 would be correct size.)
    • Scale invisible to zero (recordInvisible 1 will be hidden if it's not supposed to be, e.g. Running Players after death)
    • Skip Physic and Shared_Player_Skeleton meshes (Skips collision boxes, so you don't have to remove them manually and leads to faster import time)
    • Skip Stattrack and Stickers (Skips Stattrack and Stickers of weapons)
    • Bones (skeleton) only (This will decrease the time to import. I recommend to you use it, if you plan to export your AGR to another program like UE4, Maya or C4D)
    • Model instancing (Instances Models instead of reimporting the same models again.
    • Keyframe interpolation (Changes the interpolation, which can result into a significantly import time decrease, but also possible animation errors. Needs more testing)
  • 6: Double click the AGR file or click Import to import the AGR file.
  • 7: Enjoy your AGR.

5 Export

You have two ways of exporting your AGR as FBX.

5.1 Single FBX

For the export of your AGR to other 3D programs you need following settings:

  • 1: Select everything (Shortcut: A)
  • 2: Go to: Object -> Relations -> Make single user -> Object & data

MakeSingleUser

  • 3: Export with the recommended settings

Export

5.2 Multiple FBX

  • 1: Go to File -> Export -> HLAE AGR Batch Export (.fbx)
  • 2: Export with settings that fit your needs

Export settings

6. Importing maps in Blender

lasa01's map importer

See also

  • [[Source:Commands]]
  • [[Source:mirv_streams]]
  • [[Source:Smoother-Demos]]
  • [[GoldSrc:mirv_agr]]

Made with ❤️ by Advancedfx