An After Effects tool that allows you to quickly relight a scene
Tutorial: https://www.youtube.com/watch?v=RzH9I8wUUOc
Author: https://www.youtube.com/@shy_rikki
Report a bug: https://discord.gg/AAJxThhbBf
Free AE project: https://t.me/works_by_rikki/68
If you wish to donate ❤️: https://boosty.to/shy_rikki
- Point Light
- Spot Light
- Rect Light
- Directional Light
- Rim Light
- Ambient Occlusion (edge shadows)
- Position Pass
- Normal Pass
- Normal Remap
- Clamp (clamps values to 0-1 range)
- Unmult (removes black)
- After Effects 2019/2021-2025 (The tool doesn't work in AE 2020)
- NVIDIA GPU that supports CUDA
- EXR Depth Map
- Camera Data
- Normal Pass (Optional)
What can meet the requirements?
Games: CS2, CSGO, COD4 (partially, cuz bad depth)
3D Software: almost any (Blender, Cinema 4D, Unreal Engine 5 etc)
- Download the tool: https://github.com/eirisocherry/relighting/releases
- Move
r-relightingfolder andr-relighting.jsxscript to:
C:\Program Files\Adobe\Adobe After Effects <version>\Support Files\Scripts\ScriptUI Panels - Move
Rikkifolder that contains plugins to:
C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore - Restart After Effects
First Steps
- Launch After Effects, go to
Window, scroll down and open ther-relighting.jsxscript
- Set Rendering Engine to
Mercury GPU Acceleration (CUDA)
- Set project to
32 bit
- Set expressions engine to
JavaScript
CSGO & CS2
- Record the required layers: game, exr depth, camera
CSGO Tutorials: https://www.youtube.com/watch?v=PtdO_I-fBRo&list=PLiyMyFJsq2_VbQNn3nL4sYAXbaIQRQsZH
EXR Depth Guide (10:49): https://youtu.be/NE5nAPHn_P4?list=PLiyMyFJsq2_VbQNn3nL4sYAXbaIQRQsZH&t=649
CS2 Tutorials: https://github.com/eirisocherry/cs2-editing/wiki - Import layers, camera data and setup an exr depth: https://www.youtube.com/watch?v=FWEqkaiXNM0
- Select a depth map and create a setup by pressing
[+]button
- Adjust
Depth Settings:
Depth Black Is Nearwhether a black color is near on your depth map or not:unchecked
Depth Farthe farthest depth point value:25000(the same value you set inEXtractoReffect)
- a) Select
Depth Projectiondepth layer and useProject On Pointcursor to select where you want to project an object
b) Select something from the dropdowm menu, ex:Point Advanced
c) PressProjectand wait a bit... Done!
COD4
[NOTE]
"Auto Orient" function, Shadows, Ambient Occlusion, Rim Light and Depth2Normal are not going to work correctly, because COD4's depth map has low precision.
- Record the required layers
Tutorial by Politoo: https://www.youtube.com/watch?v=VjyNZsYzVWg
CODMVM: https://codmvm.com/
mvm_output_directory "S:\Screens" // output directory
mvm_avidemo_fps 0 // disables default screen recording
mvm_streams_fps 125 // fps to record layers in
mvm_streams_passes mvm_w mvm_wd mvm_wn // layers: game, depth, normal
mvm_streams_depthFormat 2 // depth format: 2 - rainbow (more precise)
mvm_export_format avi // output format must be set to avi, otherwise depth format will not work
mvm_streams_aeExport 1 // export camera
mvm_streams_aeExport_sun 1 // export sun
- Convert the layers using my
ftool-converter.bat
Download: https://github.com/eirisocherry/ftools/blob/main/ftool-converter.bat
Guide: https://github.com/eirisocherry/ftools/tree/main - a) Download: https://github.com/gmzorz/MVMAETools/blob/main/Support%20Files/Scripts/ScriptUI%20Panels/MVMTools.jsx
b) MoveMVMTools.jsxscript to:
C:\Program Files\Adobe\Adobe After Effects <version>\Support Files\Scripts\ScriptUI Panels
c) Import the layers, camera data and convert a depth - a) Rename Normal Map to
Normal Pass 1
b) ApplyNormal Remapeffect to theNormal Pass 1layer
c) Copy the settings
Input Is Normalized: `Checked`
X -> -X
Y -> -Z
Z -> -Y
Normalize Output: `Checked`
- Select a depth map and create a setup by pressing
[+]button
- Adjust
Depth Settings:
Depth Black Is Nearwhether a black color is near on your depth map or not:unchecked
Depth Farthe farthest depth point value:4080
- a) Select
Depth Projectiondepth layer and useProject On Pointcursor to select where you want to project an object
b) Select something from the dropdowm menu, ex:Point Advanced
c) PressProjectand wait a bit... Done!
̷B̷O̷2̷
Sorry. The relighting tool doesn't work with Black Ops 2.
Why? Because its normal map is broken and depth has low precision.
I knew while recording the tutorial that the game had a normal map, but had no clue it was unusable. My bad.
Blender
[NOTE]
"Why would I use the relighting tool with 3d software?" You might ask.
The only benefit I see is quick object placement.
You can easily place nulls and link anything to them: images, overlays, flares and more.
- Export and import the camera to after effects: https://www.youtube.com/watch?v=V1ZpQJ2jZ8Q
Blender Camera Exporter Script: https://github.com/sobotka/blender-addons-contrib/blob/master/io_export_after_effects.py
Remember the scale value, it will be used for "Depth Far" parameter later:
- Render the required layers:
a) Render settings:
b) Color Managment settings (set to your liking):

- Import the layers, setup them and rename as on the screenshots:
Beauty
OpenColorIO plugin: https://www.fnord.com/
Normal Pass
Depth
- Select a depth map and create a setup by pressing
[+]button
- Adjust
Depth Settings:
Depth Black Is Near:checked(yes, visually the depth is white, but because the depth's range is not 0-1, you need to check it)
Depth Far:100(because, when exporting the camera, scale was set to 100)
- a) Select
Depth Projectiondepth layer and useProject On Pointcursor to select where you want to project an object
b) Select something from the dropdowm menu, ex:Point Advanced
c) PressProjectand wait a bit... Done!
Unreal Engine 5
[NOTE]
"Why would I use the relighting tool with 3d software?" You might ask.
The only benefit I see is quick object placement.
You can easily place nulls and link anything to them: images, overlays, flares and more.
- Export UE camera as fbx and import it to Blender: https://www.youtube.com/watch?v=zcAIfq8WfNU
- Export Blender camera and import it to After Effects (check the "Blender" category I wrote above)
I haven't tested this workflow yet, but, theoretically, it should work just fine.
- The script is heavy and may crash your After Effects, but don't worry!
It automatically saves your project before doing any actions, so even if your AE will crash, you will not lose any of your progress - During the process AE may freeze time by time, don't panic, just wait. It happens because light effects have hundreads of parameters and expressions, AE needs some time to process them.
