After Effects & Blender workflow - eirisocherry/csgo-editing GitHub Wiki

Video tutorials

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
  1. Record some CSGO cinematics with a z-depth and camera layer:
    https://github.com/eirisocherry/csgo-editing/wiki/How-to-make-CSGO-edit
  2. Learn how to make perfect 3d tracking in CSGO:
    https://github.com/eirisocherry/csgo-editing/wiki/Perfect-3D-tracking-for-CSGO
  3. [Optional] Relighting tutorial: https://www.youtube.com/watch?v=W4bK-22gUEk
  4. [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

  1. Export after effects camera via after-effects-to-blender-export script
    Screenshot_1
    Screenshot_2
  2. Import exported camera to blender via after-effects-to-blender-export addon
    Screenshot_3
    Screenshot_4

CSGO map to Blender
>>> Exporting CSGO map and importing it to Blender
  1. Install Blender 4.2.2 (3d software): https://download.blender.org/release/Blender4.2/blender-4.2.2-windows-x64.msi
  2. 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)
  3. Install Plumber 1.1.2 (csgo map importer for blender): https://github.com/lasa01/Plumber/releases/tag/v1.1.2
    Screenshot_84
    Screenshot_83
  4. Import a CSGO map to Blender via Plumber addon:
    image
    image
  5. Fix skybox: ...

>>> Rotating the map by 90 degrees, so imported after effects camera faces the right direction
  1. Move 3d cursor to the center of the world, so new objects spawn here
    image
  2. Add a null (empty "plain axes")
    image
    image
  3. Select the map
    image
    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, press CTRL + P and make the empty a parent for the map
    Be patient! The process may take a long time!
    image
  4. Select the empty and rotate it by 90 degrees
    image


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/

  1. Move 'Cryptomatte.aex', 'EXtractoR.aex', 'IDentifier.aex' with replacement to:
    C:\Program Files\Adobe\Adobe After Effects CC <version>\Support Files\Plug-ins\Effects
  2. Move 'OpenEXR.aex' with replacement to:
    C:\Program Files\Adobe\Adobe After Effects CC <version>\Support Files\Plug-ins\Format


Rendering

Super fast renderer settings

Best choise if you only wanna render emission + cryptomatte passes

Renderer: evee Samples: 16 Shadows: disabled Raytracing: disabled

Render settings

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 image

Render

image


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: image


>>> Backlot

If you want to add a backlot to the camera:
image
If you want to see the original colors of the video in a viewport:
image


>>> Z-depth combine

Blender z-depth + CSGO z-depth
yep

EFX Z Depth Tools (After Effects plugin): https://drive.google.com/file/d/1s9RA8GCvXfkevTXd6VQoXw7LzJasvyyS/view?usp=sharing



CSGO map to Element 3D

After Effects plugin

Element 3d plugin): https://www.videocopilot.net/products/element2/

Settings

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

Step by step

  1. Record a cinematic with camera layer enabled and import it to after effects
  2. Extract a csgo map (ex: de_mirage.bsp) with BSPSource, all you need is .vmf file (mesh of the map)
  3. Import a csgo map to blender via plumber addon with 0.01 scale
  4. Export the map as .obj with 501.78 scale
    Screenshot_85
    Screenshot_86
  5. Import the .obj into element 3d
    image
  6. Rotate the map by 90 degrees y 180->270 and set alignment (anchor point) from model
    image
  7. Apply expressions and add slider control with -11.545 value
    Make sure you camera name is "HLAE CamIO Camera", otherwise expressions will not work.
    image
  8. If the imported map doesn't perfectly fit the footage, try different slider control values from -11.540 to -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.
  9. If you did everything correctly, you can enjoy your perfectly 3d tracked obj map.

⚠️ **GitHub.com Fallback** ⚠️