After Effects & Blender workflow - eirisocherry/csgo-editing GitHub Wiki
Perfect masks with cryptomatte & emission passes: ...
Perfect masks with z-depth: ...
CSGO map to Element 3D: https://www.youtube.com/watch?v=BqCBHPktTWU
I will show the After Effects & Blender workflow by using CSGO as an example
For other games process should be similar
Getting started
- Record some CSGO cinematics with a z-depth and camera layer:
https://github.com/eirisocherry/csgo-editing/wiki/How-to-make-CSGO-edit - Learn how to make perfect 3d tracking in CSGO:
https://github.com/eirisocherry/csgo-editing/wiki/Perfect-3D-tracking-for-CSGO - [Optional] Relighting tutorial: https://www.youtube.com/watch?v=W4bK-22gUEk
- [Optional] Camera Time Remapping tutorial: https://www.youtube.com/watch?v=DuCIjltDq1I
AE camera to Blender
After Effects to Blender export script: https://github.com/adroitwhiz/after-effects-to-blender-export
- Export after effects camera via after-effects-to-blender-export script
![]()
- Import exported camera to blender via after-effects-to-blender-export addon
![]()
CSGO map to Blender
>>> Exporting CSGO map and importing it to Blender
- Install Blender 4.2.2 (3d software): https://download.blender.org/release/Blender4.2/blender-4.2.2-windows-x64.msi
- Download BSPSource (csgo map extractor): https://github.com/ata4/bspsrc/releases
Extract a CSGO map (ex: de_mirage.bsp) via BSPSource, all you need is .vmf file (mesh of the map)- Install Plumber 1.1.2 (csgo map importer for blender): https://github.com/lasa01/Plumber/releases/tag/v1.1.2
![]()
- Import a CSGO map to Blender via Plumber addon:
![]()
- Fix skybox: ...
>>> Rotating the map by 90 degrees, so imported after effects camera faces the right direction
- Move 3d cursor to the center of the world, so new objects spawn here
![]()
- Add a null (empty "plain axes")
![]()
- Select the map
3.1. Holding CTRL select the empty (the latest selected object will be the parent for all previous selections)
3.2. Make sure you selected everything correctly, pressCTRL + Pand make the empty a parent for the map
Be patient! The process may take a long time!
![]()
- Select the empty and rotate it by 90 degrees
![]()
Passes
>>> Emission
>>> Cryptomatte
With cryptomatte pass you can mask any objects in 1 click
ProEXR (ae plugin that allows you to work with .exr): https://www.fnord.com/
- Move 'Cryptomatte.aex', 'EXtractoR.aex', 'IDentifier.aex' with replacement to:
C:\Program Files\Adobe\Adobe After Effects CC <version>\Support Files\Plug-ins\Effects- Move 'OpenEXR.aex' with replacement to:
C:\Program Files\Adobe\Adobe After Effects CC <version>\Support Files\Plug-ins\Format
Rendering
Best choise if you only wanna render emission + cryptomatte passes
Renderer: evee Samples: 16 Shadows: disabled Raytracing: disabled
Output folder: any File format: OpenEXR MultiLayer Color Depth: Float (Full) Codec: ZIP (lossless) // if you wanna compress the size you can choose DWAA (lossy) but it may cause artifacts
Work in progress...
>>> Misc
On EEVEE renderer transparent textures appear on z-depth pass incorrectly, to fix this, you need to adjust these two options:
>>> Backlot
If you want to add a backlot to the camera:
If you want to see the original colors of the video in a viewport:
>>> Z-depth combine
Blender z-depth + CSGO z-depth
EFX Z Depth Tools (After Effects plugin): https://drive.google.com/file/d/1s9RA8GCvXfkevTXd6VQoXw7LzJasvyyS/view?usp=sharing
CSGO map to Element 3D
Element 3d plugin): https://www.videocopilot.net/products/element2/
Plumber scale 0.01
OBJ scale 501.78
Element 3d orientation y 180->270
Element 3d alignment from model
Element 3d group position:
x = thisComp.layer("HLAE CamIO Camera").transform.position[0]*effect("Slider Control")("Slider");
y = thisComp.layer("HLAE CamIO Camera").transform.position[1]*effect("Slider Control")("Slider");
[x, y];
z = thisComp.layer("HLAE CamIO Camera").transform.position[2]*effect("Slider Control")("Slider");
z;
Slider control value -11.545
- Record a cinematic with camera layer enabled and import it to after effects
- Extract a csgo map (ex: de_mirage.bsp) with BSPSource, all you need is .vmf file (mesh of the map)
- Import a csgo map to blender via plumber addon with 0.01 scale
- Export the map as .obj with
501.78scale

- Import the .obj into element 3d
- Rotate the map by 90 degrees
y 180->270and set alignment (anchor point)from model
- Apply expressions and add slider control with
-11.545value
Make sure you camera name is "HLAE CamIO Camera", otherwise expressions will not work.
- If the imported map doesn't perfectly fit the footage, try different slider control values from
-11.540to-11.550
8.1. If the map is completely off, make sure you properly imported hlae camera:
Before importing the camera, composition's fps must be set to the original fps of a footage (ex: 300fps) and time remapping sholdn't be applied. - If you did everything correctly, you can enjoy your perfectly 3d tracked obj map.











